gmusic-playlist icon indicating copy to clipboard operation
gmusic-playlist copied to clipboard

Add playlist position number to exported track details

Open soulfx opened this issue 9 years ago • 0 comments

Recieved an email requesting this feature. The email suggested the following code changes to implement the feature:

in exportlists.py

result_details = create_result_details(track, tnum+1)  # added the playlist track number

in common.py:

# creates result details from the given track
def create_result_details(track, playlistTrackNumber): # added the playlist track number
    result_details = {}
    for key, value in track.iteritems():
        result_details[key] = value
    result_details['songid'] = (track.get('storeId')
        if track.get('storeId') else track.get('id'))
    result_details['playlistTrackNumber'] = playlistTrackNumber # put playlistTrackNumber' in result_details
    return result_details

in preferences.py:

track_info_order = ['playlistTrackNumber','title','artist','album','genre','year','durationMillis','playCount','rating','songid']

soulfx avatar Jan 14 '15 02:01 soulfx