Skip to content

Play cue sheets and use Telegram audio details (1.13.0) - #3

Merged
mateof merged 1 commit into
mainfrom
feat/cue-sheets-audio-info
Dec 4, 2026
Merged

mateof merged 1 commit into
mainfrom
feat/cue-sheets-audio-info

Conversation

@mateof

@mateof mateof commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Needs TelegramFileManager with files.cue and files.audioInfo (mateof/TelegramFileManager#172). Everything checks the capabilities first, so older servers see no change.

Cue sheets

An album ripped to a single FLAC or MP3, with a .cue next to it.

  • Where they show up:
    • in the music view, as "Album (cue sheet)" rows;
    • in manage mode and in shared collections, a .cue opens as an album, and its details sheet has "Open as album".
  • Album dialog:
    • title, performer, date and genre;
    • play all, play from a track, add everything or one track to the queue;
    • tracks whose file is missing are disabled, with a note.
  • Each track is a clip of its file:
    • position, duration, seeking and the lock screen work in track time;
    • when a track ends, the next track of the same file continues without reloading;
    • repeat-one goes back to the start of the clip.
  • Shared with the file: cache, offline downloads, ReplayGain and the cover come from the file and are shared by all its tracks. The cue track keeps its own title, artist and album.
  • Identity: each cue track has its own key, cue:{channel|local}:{cueId}:{n}.
    • Favourites, history and resume points for cue tracks stay on the device. The server's player model can only describe a whole file.
    • Cue tracks are left out of playlists, for the same reason.

Telegram audio details

Telegram keeps the title, performer, duration and cover of each audio file.

  • When they are asked for: channel folder listings, shared collections and channel search ask for them in the background, in batches of 500, kept in memory.
  • Rows show "Performer – Title" and the duration.
  • Queued tracks start with that title, artist, duration and cover before the file is downloaded. The embedded tags can still refine them later.

Other

While a prepared track takes over, its duration is now pushed to the store. No event fired for it before.

Checks

  • tsc -b: clean.
  • Lint: 0 errors, 6 warnings, all in files this branch doesn't touch.
  • Tests: 148 passing.
  • npm run build: OK.
  • New tests cover:
    • cue to queue tracks;
    • clip behaviour: offset, relative time, same-file continuation, end of clip, repeat-one;
    • audio-info batching and caching;
    • capability gating;
    • cue favourites staying on the device.

Not checked in a browser or against a real server.

Version 1.13.0.

Cue sheets (servers with files.cue): a .cue next to a FLAC/MP3 album is shown
as an album in channel folders, local files and shared collections. Its tracks
play, go to the queue and resume one by one. Each one is a queue track that
plays a slice (clip) of the file: the engine starts at the clip start, moves to
the next track at the clip end and reports position and duration relative to
the track to the UI, the lock screen and the keyboard shortcuts. Consecutive
clips of one file keep playing on the same element. Cache and downloads stay
per file; favourites, history and resume points of cue tracks stay on the
device, and they are not added to playlists (both store whole files).

Telegram audio details (files.audioInfo): channel listings and search ask the
server in the background for the title, performer, duration and cover Telegram
keeps, show "Performer - Title" and the duration in the rows and use them as
the starting metadata of the queued tracks.
@mateof
mateof merged commit c81f3ac into main Dec 4, 2026
@mateof
mateof deleted the feat/cue-sheets-audio-info branch December 4, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant