Repository navigation
Cue sheets and Telegram audio details (API and web) - #172
Merged
Merged
Conversation
- GET /api/v1/channels/{id}/files/{fileId}/cue and GET /api/v1/local/cue
read a cue sheet (UTF-8, UTF-16 or Windows-1252) and match each FILE
line with the audio file next to it: exact name, same name with another
audio extension (album.wav converted to FLAC), the audio file named like
the sheet, or the only audio file in the folder. Each track carries its
file with the usual URLs, and its start and end in seconds.
- POST /api/v1/channels/{id}/files/audio-info returns the duration, title,
performer and cover that Telegram keeps for audio documents, read in
batches from the messages without downloading the files, and kept in
memory.
- Capabilities files.cue and files.audioInfo.
- Cue sheets: opening a .cue (channels, shared collections, local files) shows its tracks with play all, play from a track, play next and add to queue; tracks whose audio file is missing are disabled and listed. Each track is queued as a clip of its file (start/end). - Player: clip support. The elements work in file time while the store, the UI and the media session show track time; a clip stops or advances at its end, consecutive clips of one file keep the source playing, and another clip of the playing file seeks instead of reloading. - Telegram audio details: channel listings and searches ask audio-info for their audio files in the background (batches of 500, capability files.audioInfo, cached per channel/collection + file). Rows show "Performer - Title" and the duration, audio files get the Telegram cover as thumbnail, and queued tracks start with those details. - File manager: describeEntry prop (subtitle, facts and a badge per row); a CUE badge marks cue sheets and the audio file they describe. - api-client: files.cue, files.audioInfo and local.cue.
develop gained its own AudioController and AudioDtos (audio transcoding), so the cue and audio-info endpoints move to AudioDetailsController and AudioDetailsDtos. The capability list keeps player.sync, audio.transcode, files.cue and files.audioInfo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cue sheets
An album ripped to a single FLAC or MP3 file, with a
.cuenext to it, can be played track by track.API
GET /api/v1/channels/{id}/files/{fileId}/cue(also withcollectionId) andGET /api/v1/local/cue?path=read the sheet.FILE,TRACK,TITLE,PERFORMER,INDEX 00/01,REM DATEandREM GENRE. Data tracks are skipped.FILEline to an audio file in the same folder, tried in this order:.wavnamed in the sheet, converted to FLAC later);ApiFileDtowith its URLs;startandendin seconds.endis null for the last track of a file.missingFileslists what could not be found.Web
.cueopens as an album in channels, shared collections and local files. A "CUE" badge marks the sheet and its audio file.Telegram audio details
Telegram keeps the title, performer, duration and cover of every audio document.
POST /api/v1/channels/{id}/files/audio-inforeads these details for up to 500 entries at a time, in batches from the messages and without downloading the files. They are then kept in memory.Capabilities
files.cueandfiles.audioInfo. The Android app (mateof/tfm-android-app#4) and TFMPlayer use them.Tests
dotnet test: 810 passing, 26 of them new for the cue parser and matching.npm test: 313 passing, 31 new for clips, the cue model and audio-info;Known limits