change to api, making WEB

Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-07-11 00:44:08 +03:00
1 parent 97dc183bdf
commit e7573fbcd0
6 files changed
+193 -22

No files matched your search

+29 -1
View File
@@ -69,7 +69,34 @@ namespace Echoion::Api
// Library (appended)
GetPlaylist, // playlist contents by id
GetHistory, // recently played tracks
GetStats // playback statistics
GetStats, // playback statistics
// Web UI (appended)
GetFavorites, // authenticated user's favorites
AddFavorite, // add a track to favorites
RemoveFavorite, // remove by track url
VoteSkip, // vote to skip the current track
Announce, // admin: broadcast an announcement
GetAggregateStats, // server-wide dashboard statistics
// Web UI round 2 (appended)
AuthenticateByAddress, // sign in by matching the caller's IP against
// online subscribers' TeamSpeak addresses
RestartWebInterface, // admin: stop+start the web server in place
ToggleAutoplay, // admin: flip radio mode (autoplay)
// Web UI round 3 (appended)
GetUserPrefs, // per-user preferences (language, …) from the kv store
SetUserPrefs, // update per-user preferences; keys shared with the
// chat commands (e.g. !lang) so both stay in sync
// Web UI round 4 (appended): custom emojis for watch chat/reactions
GetCustomEmojis, // list custom emoji names (+ mime)
AddCustomEmoji, // admin: add/replace a custom emoji (base64 image)
RemoveCustomEmoji, // admin: delete a custom emoji
// Web UI round 5 (appended): lyrics for the current track (lrclib)
GetLyrics // plain + time-synced lyrics for the now-playing track
};
struct RpcRequest {
@@ -113,6 +140,7 @@ namespace Echoion::Api
std::chrono::milliseconds playbackPosition;
BotConfig config;
std::map<std::string, std::string> sessionData;
bool autoplay = false;
[[nodiscard]] bool shouldPreservePlayback() const noexcept
{