jez500 / chorus

A Web UI for XBMC, focused on user experience and music. Get the latest version here: https://github.com/xbmc/chorus2
357 stars 54 forks source link

Incorrect Track Order on Streaming Music #50

Closed taylorgibson closed 10 years ago

taylorgibson commented 10 years ago

When loading an album through the WebUI, many albums do not order the tracks correctly, even though the files have correct meta-data for track info, and the files are named so they sort correctly in their directories.

Albums show the correct track listing when looking at all albums by an artist, but do not play in order when clicking the play button on the album, nor do they create playlists with the correct order. Can't seem to find a pattern in the incorrect track order: image

Albums show an incorrect track list when browsing that specific album. When clicking play or creating a playlist, tracks remain in the same incorrect order: image

Running Chorus Version 0.3.8 on an Apple Mac Mini with XBMC 13.1beta. Music files on a Samba share located on a local Ubuntu 14.04 LTS server. Accessing Chorus through Google Chrome on local network.

s01ipsist commented 10 years ago

This is to do with the code in master/src/js/collections/xbmc.js

arg3: {"sort": {"method": "dateadded", "order": "descending"}}, // doesn't appear to work? maybe lost in sorting elsewhere

This parameter should not have the 'sort' key, it should just be `arg3: {"method": "track"},

The two other parameters do not use the similar keys (params and filters). I noticed this by looking at https://github.com/xbmc/xbmc/blob/2228e7f209fbf244bb0f9da970903016395043f2/addons/webinterface.default/js/MediaLibrary.js

and have confirmed this working locally with

curl -v -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"AudioLibrary.GetSongs","id":"1412339052641","params":[["title","artist","albumartist","genre","year","rating","album","track","duration","playcount","fanart","thumbnail","file","albumid","lastplayed","disc","genreid","artistid","displayartist","albumartistid"],{"start":0,"end":500},{"method":"track"},{"albumid":60}]}' http://192.168.1.99:8080/jsonrpc

I'd do a PR but I haven't even got close to getting my head around the whole project and what else is using this code.

paulvt commented 10 years ago

Is this related to the fact that if you use the Soundcloud plugin and click through to some channel, instead of getting the same listing as on the website, you get the first 40 items alphabetically sorted (and there is no way to get to recent stuff)?

s01ipsist commented 10 years ago

@paulvt I don't think so. This issue is a bug in the Chorus implementation of the XBMC JSON-RPC API, in regard to one particular function call, getting the album song list with results with "no" sorting. Your issue sounds like it's with the Soundcloud plugin itself which doesn't appear to have been updated in many years.

paulvt commented 10 years ago

I've just used the Soundcloud plugin using the normal interface on my media PC, there the listings are the same as on soundcloud (i.e. by descending order of publication date).