Cue sheet file support

Request a new feature to add to Muso, or vote +1/-1 for anyone else's suggestion. Even just a few votes will get it looked into (just one possibly not).
musoware
Site Admin
Posts: 1849
Joined: Fri Sep 14, 2012 6:50 am

Re: Cue sheet file support

Post by musoware »

All the CLI commands from muso are prefixed by the player ID but it still didn't seem to work. I'll play with the encodings - I normally urlencode the paths which works for all other non-cue-based tracks, the file:/// prefix normally isn't required either.
marcoc1712
Posts: 22
Joined: Sun Aug 02, 2015 10:52 am
Location: Albinea, Reggio Emilia, Italy
Contact:

Re: Cue sheet file support

Post by marcoc1712 »

I think that you have to urlencode the path if coming from file system, but if you urlencode the "url" from db you are probably double encoding it and this could be the problem.

Not depending on how you browse the database, I think at the end you always get one or more track to play, for any of those tracks, read the url field and use it as is stored to play, enqueue or what else you do with 'normal' tracks, with NO additional encoding or decoding on it. It just works.

for Java there is a little library called SlimConnect form a gui named Bas de Bree, is old (2004) and incomplete, but over that I was able to build a little player, capable to display current playlist, add, remove or insert tracks, move tracks in different positions, play, stop, pause, next, previous, first, last, display tracks info, time elapsed/remaning and all the major cli commands, perfectly working both with single files and cue sheets.

Don't Know wich language are you using for Muso, but quite sure you could find a similar wrapper for it, if not, I really suggest you to first build your own and then relay on it.
Last edited by marcoc1712 on Sat Mar 19, 2016 8:54 pm, edited 1 time in total.
musoware
Site Admin
Posts: 1849
Joined: Fri Sep 14, 2012 6:50 am

Re: Cue sheet file support

Post by musoware »

Tried this:

00:04:20:07:40:e2 playlist play file:///storage/music/flac/2016_03/Fabrizio%20Paterlini/Fragments%20Found/01%20Fabrizio%20Paterlini%20-%20Fragments%20Found.flac#1547.84-1770.58666666667

Which matches exactly the path in the database (as queried by sqlitestudio), and it still doesn't work for me. I've tried no encoding, only encoding the spaces (as above), single encoding, double-encoding, nothing seems to work. Mind you, I have a linux-based LMS host rather than windows - is yours windows?
marcoc1712
Posts: 22
Joined: Sun Aug 02, 2015 10:52 am
Location: Albinea, Reggio Emilia, Italy
Contact:

Re: Cue sheet file support

Post by marcoc1712 »

I have LMS on Win, macOsX and Ubuntu, current tryals are on Windows, but so far as the path is valid, it does not matter where are you running LMS, but sure You MUST use the path as is for the LMS hosting system (copying it from the database).

Are you absolutly sure you just copied all the text from database, without changing encoding (i.e. copy and paste to a text editor or similar)? Could you retrieve the correct track using a "select * from tracks where url = $1" and $1 is exactly that text?

P.s.

Running a rescan ton macOsx just to check, I'll let you Know.
musoware
Site Admin
Posts: 1849
Joined: Fri Sep 14, 2012 6:50 am

Re: Cue sheet file support

Post by musoware »

Pretty sure yes, queried the database in sqlitestudio & plugged the queried path directly into a putty telnet session, prefixed with {player} playlist play.

Interestingly the CLI responds with the url-encoded path without the # suffix:

Code: Select all

> 00:04:20:07:40:e2 playlist play file:///storage/music/flac/2016_03/Fabrizio%20Paterlini/Fragments%20Found/01%20Fabrizio%20Paterlini%20-%20Fragments%20Found.flac#1547.84-1770.58666666667
< 00%3A04%3A20%3A07%3A40%3Ae2 playlist play %2Fstorage%2Fmusic%2Fflac%2F2016_03%2FFabrizio%20Paterlini%2FFragments%20Found%2F01%20Fabrizio%20Paterlini%20-%20Fragments%20Found.flac
But nothing actually happens on the player, except sometimes I see the album title in the Now Playing view but with an error "No items found in playlist"
marcoc1712
Posts: 22
Joined: Sun Aug 02, 2015 10:52 am
Location: Albinea, Reggio Emilia, Italy
Contact:

Re: Cue sheet file support

Post by marcoc1712 »

Is normal (or better it happen the same to me). But if you then ask for

playlist path ?

you should get the complet url string BUT url encoded starting with file and ending with the start/end seconds. Is like that? If so, your track is the current in the playlist, change the mode to play and it should ...play.

I assume You could play that track directly form the web interface, browsing music folder, selecting the cue file then locate the track and play it.
Please be sure of that before any other trial, Web Gui itself use CLI that way.








You mean in now playng in the web gui or elsewere?
musoware
Site Admin
Posts: 1849
Joined: Fri Sep 14, 2012 6:50 am

Re: Cue sheet file support

Post by musoware »

It's not normal if it shows that error & doesn't actually play.

If I play the album through the web interface & I query the path through putty I see this:

Code: Select all

> path ?
< 00%3A04%3A20%3A07%3A40%3Ae2 path file%3A%2F%2F%2Fstorage%2Fmusic%2Fflac%2F2016_03%2FFabrizio%2520Paterlini%2FViandanze%2F01%2520Fabrizio%2520Paterlini%2520-%2520Viandanze.flac%230-174.04
which is url-encoded. If I pipe THAT path through the playlist play or add command :

Code: Select all

> 00%3A04%3A20%3A07%3A40%3Ae2 playlist play file%3A%2F%2F%2Fstorage%2Fmusic%2Fflac%2F2016_03%2FFabrizio%2520Paterlini%2FViandanze%2F01%2520Fabrizio%2520Paterlini%2520-%2520Viandanze.flac%230-174.04
< 00%3A04%3A20%3A07%3A40%3Ae2 playlist play %2Fstorage%2Fmusic%2Fflac%2F2016_03%2FFabrizio%20Paterlini%2FViandanze%2F01%20Fabrizio%20Paterlini%20-%20Viandanze.flac
Again it either does nothing, or I get Viandanze on the now playing screen with error "No items found in playlist" (and nothing is playing)

Interestingly, if I browse by "Music Folder" via the remote and try to play the .cue or .flac file directly I get errors:

Cannot request non-HTTP URL file file:///storage/music/flac/2016_03/Fabrizio%20Paterlini/Viandanze/01%20Fabrizio%20Paterlini%20-%20Viandanze.cue
Cannot request non-HTTP URL file file:///storage/music/flac/2016_03/Fabrizio%20Paterlini/Viandanze/01%20Fabrizio%20Paterlini%20-%20Viandanze.flac

I wonder if I'm missing some server setting?
marcoc1712
Posts: 22
Joined: Sun Aug 02, 2015 10:52 am
Location: Albinea, Reggio Emilia, Italy
Contact:

Re: Cue sheet file support

Post by marcoc1712 »

'normal' was referred just to the answer from play command

When You write "If I play the album through the web interface" do you mean browsing by music folder or by allbum?

What we should be sure about is that we could browse via music folder on the web gui, reach and open the .cue file, that should result in the list of the tracks in the left panel + a first line "play all tracks", From where you could select tracks and play or add them to the current playlist (on the right side).

Is working that way for you?

If so on web gui but not on remote, is - probably - up to the remote. Wich remote are you using?

If the logitech one (the one that used to come with Duet) is what normally I use togheter with Orange on Andorid phone, with both I've never got that error. I thing some controlling APP are not working with cue sheet, maybe you are using one of them, but the flac one is supposed to work as any other flac file. Does your remote works with other files (via music folder browsing)?

BTW, the error talk about HTTP request, seems to me that remote is using JSON web services and not CLI, but I could be wrong.

The only related settings I'm aware of is "Disabled playlist file extension" in File Type, (.cue should not be there) and "Comand line interface" in Advanced, but here you could just change the port used by the server.
musoware
Site Admin
Posts: 1849
Joined: Fri Sep 14, 2012 6:50 am

Re: Cue sheet file support

Post by musoware »

By "If I play the album through the web interface" I mean browsing to the artist/album via the lists of artists, having made sure that the most recent scan has scanned and imported the cue file (after which I can query the tracks with the #secs suffix in mysql, and subsequently import these into muso).

No, browsing by music folder and trying to play either .cue or .flac file gives the errors I described - via the standard logitech remote. If I try the same through the web interface it gives me no options to play either the .cue file or the .flac file (see below), but I can play the containing folder.
Capture.PNG
Capture.PNG (7.67 KiB) Viewed 3989 times
I have no disabled playlist file extensions.
marcoc1712
Posts: 22
Joined: Sun Aug 02, 2015 10:52 am
Location: Albinea, Reggio Emilia, Italy
Contact:

Re: Cue sheet file support

Post by marcoc1712 »

Here is the error, I think is not related to CLI BUT to the files/db contents.

If you have the album in the database BUT could not read the .cue file, or trying to open it you get 'empty' as result, is quite sure the DB is not coming form that cue scanning, either becouse of some error in scanner/post scanning process or just becouse cue changed since last scan.

LMS recognize the cue in music folder browse, only if you have in the db the corresponding track with content_type CUE pointing to his path. This 'special' track has the same id of the playlist that is representing the CUE in the db, quering playlist_tracks for that playlist id, you get the tracks of the cue.

If this chain is somewhere broken, it could not work.

Album, artist or whatever, are NON influencing anyhow the contents of the cue file / playlist, it's a completely separate way to group tracks, normally used to represent a single 'media distribution' (meaninig disk) in LMS, that could or not be the same of album.

Better to have a look to the scanner log and understand what went wrong, but first things to check are:

a. flac file have not TAGS in it overlapping the metainfo in the cue file.
b. NO embedded cue sheet in it.
b. The cue file is pointing ONLY and only once at the correct flac file (non compliant cue are not allowed)
c. we have only this pair of files describing that specific album.
d. cue file has not changed since his last scanning. Beware that incremetal scan is not enough, you need wipe and rescan for that.

If so, I'll try to remove that specific folder, wipe and rescan to see if then you still could see the album (with tracks), this meaning you have other files defining the same album. Then add that folder again, wipe and rescan and see what's happen.
Post Reply