This PR addresses the issues mentioned in #259 regarding the Backend features. Now server can be compiled with less or same features as playback. Some more details:
Add new PlayerTrait function media_info to get the current media's title (works on mpv and gst for both radio and normal music, in rusty for now only in radio)
mark the Backend enum as non_exhaustive, meaning any case where a match against a backend is done, now it needs to be handled if a backend has not been accounted for in the downstream crate
move applying the prefix Current Playing: from backend-specific to TUI where used (fixes mpv not having the prefix)
tui lyric: avoid some clones / allocations if possible
note the new playback::MediaInfo struct and method playback::PlayerTrait::media_info has been designed so that we can add new fields without having to add a new function every time (for example if we should start parsing & storing the artist metadata or other metadata from the backend / decoder).
also note that the compile error for no backend being compiled-in (in playback) has not been removed.
This PR addresses the issues mentioned in #259 regarding the Backend features. Now server can be compiled with less or same features as playback. Some more details:
PlayerTrait
functionmedia_info
to get the current media's title (works on mpv and gst for both radio and normal music, in rusty for now only in radio)Backend
enum asnon_exhaustive
, meaning any case where amatch
against a backend is done, now it needs to be handled if a backend has not been accounted for in the downstream crateCurrent Playing:
from backend-specific to TUI where used (fixes mpv not having the prefix)note the new
playback::MediaInfo
struct and methodplayback::PlayerTrait::media_info
has been designed so that we can add new fields without having to add a new function every time (for example if we should start parsing & storing the artist metadata or other metadata from the backend / decoder).also note that the compile error for no backend being compiled-in (in playback) has not been removed.