vially / googlemusic-xbmc

Google Music addon for Kodi
GNU General Public License v3.0
176 stars 48 forks source link

Track sorting #85

Closed quadrateer closed 8 years ago

quadrateer commented 8 years ago

I have lots of albums not properly tagged before importing it to Google Music, so tracks often don't have valid track numbers. But they have names with numbers (01 title name, 02 title name).

Could You please modify GoogleMusicStorage.py from line 51:

        if albumArtist:
            query = "select * from songs where album = :filter and album_artist = :albumArtist order by disc asc, track asc, display_name asc"
        elif filter_type == 'album':
            query = "select * from songs where album = :filter order by disc asc, track asc, display_name asc"
        elif filter_type == 'artist':
            query = "select * from songs where artist = :filter order by album asc, disc asc, track asc, display_name asc"
        elif filter_type == 'genre':
            query = "select * from songs where genre = :filter order by album asc, disc asc, track asc, title asc, display_name asc"
        elif filter_type == 'composer':
            query = "select * from songs where composer = :filter order by album asc, disc asc, track asc, title asc, display_name asc"

Just add "display_name asc" in the end of the order clause. It will help me not to modify the source on every upgrade of Your excellent plugin. Thank You.

foreverguest commented 8 years ago

Sure, will do in next version.

quadrateer commented 8 years ago

Thank You :)