Skip to content
This repository was archived by the owner on Oct 20, 2018. It is now read-only.

Commit ac48f47

Browse files
committed
Use correct metadata key for sorting
1 parent 041867e commit ac48f47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gmusicapi_scripts/gmdownload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def main():
6969

7070
songs_to_download, _ = mmw.get_google_songs(include_filters, exclude_filters, cli['include-all'], cli['exclude-all'])
7171

72-
songs_to_download.sort(key=lambda song: (song.get('artist'), song.get('album'), song.get('trackNumber')))
72+
songs_to_download.sort(key=lambda song: (song.get('artist'), song.get('album'), song.get('track_number')))
7373

7474
if cli['dry-run']:
7575
logger.info("\nFound {0} song(s) to download".format(len(songs_to_download)))

gmusicapi_scripts/gmsync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def main():
125125
logger.info("\nScanning for missing songs...")
126126
songs_to_download = compare_song_collections(matched_google_songs, matched_local_songs)
127127

128-
songs_to_download.sort(key=lambda song: (song.get('artist'), song.get('album'), song.get('trackNumber')))
128+
songs_to_download.sort(key=lambda song: (song.get('artist'), song.get('album'), song.get('track_number')))
129129

130130
if cli['dry-run']:
131131
logger.info("\nFound {0} song(s) to download".format(len(songs_to_download)))

0 commit comments

Comments
 (0)