stream: show the source provider of the current track
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
96a1ba89e6
commit
bfa7cc1046
3 changed files with 40 additions and 5 deletions
|
|
@ -29,7 +29,13 @@ def annotate_uri(path: Path, track: Track) -> str:
|
|||
def esc(value: str) -> str:
|
||||
return value.replace("\\", "\\\\").replace('"', '\\"')
|
||||
|
||||
fields = [f'title="{esc(track.title)}"', f'artist="{esc(track.artist)}"']
|
||||
fields = [
|
||||
f'title="{esc(track.title)}"',
|
||||
f'artist="{esc(track.artist)}"',
|
||||
# Provider that produced the track (subsonic, ytdlp…), surfaced by the
|
||||
# stream so the player can show a discreet source indicator.
|
||||
f'origin="{esc(track.origin)}"',
|
||||
]
|
||||
# Web page the track was pulled from, so the player can link back to the
|
||||
# source. Only http(s) locators qualify (yt-dlp tracks); a Subsonic song id
|
||||
# is opaque and points at no public page.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue