Improve music casting: handle cuesheet-based (single file per album) collections properly

The yatse ability to cast music to upnp/airplay speakers is awesome. I am able to cast from a raspberry Pi running Kodi to Bose and Kef speakers that support upnp and airplay in other rooms.
My music collection is all in FLAC and both regular FLAC and HD (24/96) FLACs work perfectly

There is a problem though: my collection is all based on single-file-per-album FLAC files and associated cuesheet files. Kodi handles this perfectly, scans it and plays it back, sees the songs etc. I can control Kodi through yatse and play any specific song etc, as long as Kodi is playing back audio locally, to the receiver/speakers directly connected to it

Now, when I activate casting in Yatse, to upnp or airplay endpoints, any speaker brand, playback starts perfectly for any album however the length of the first song that Yatse displays is the entire album, and the entire album FLAC is played back without Yatse showing any song change. If I manually try playing any song other than the first one, Yatse starts playing the album FLAC again from the start (i.e. song 1).

I can see though that Yatse is able to jump to any part of the flac, I tested this by randomly taping on the time bar. So I am hoping that Yatse casting support for this audiophile-type setup could be added, e.g. when playing back song #3 Yatse should start casting the album FLAC starting from the right point in time in the FLAC, not the beginning which is always song #1

For Yatse to infer that the casting is being done from a single-file type setup, it could check and see that all songs of the album are pointing to the same FLAC file. When that happens, special logic could be used to a) be able to jump from song to song as required, and b) properly display the length of each song (currently, when casting, all songs of the album are shown as having a length equal to the entire album)


This is not that simple, cue file also have support for silence and gaps and many other things that are not exposed by Kodi.

I have no way to properly handle this on Yatse side without the proper data, any approximation would be most of the time wrong and generate support for nothing.

(This is a recurrent duplicate but nothing I can do about it)

(corrected a bunch of typos)
Fair point RE cuesheet silence gaps etc but I would say out of 3.5K albums, I see that less than 2% have them (mostly rips from old classical music CDs), and ignoring them would be fine, it would still provide a great user experience while casting vs. the current casting experience where the entire album FLAC is played for every song in the album.

Good to see I am not the only one on this boat :). I think basic casting support for the use case would be hugely better than status quo, and for 99% of us nothing else more fancy is needed - just supporting track transitions and jumping from track to track is a totally valid end state.

Thanks toriq for Yatse once again. Amazing to see how solid and feature rich it became over the years

2% for you 15% for me. This means 15% of the time when trying to play the 10th songs of an albums it will be 20 seconds wrongs.

This is not acceptable and reason I can’t add this, I do not add features that randomly works or not without anyway for the users to understand what is going on.

Ask Kodi to fix their API to expose the necessary data and then it will be possible to do something.

I can try. What should I ask for, what is missing in the api? The cuesheet if the album has it?

The actual position in the file the track starts. There’s multiple ways for Kodi to expose that. The actual cue sheet is not needed.