Skip to content

Commit

Permalink
Make artists order stable (aka sorted)
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed May 3, 2014
1 parent e9a71c9 commit 042707a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mopidy_scrobbler/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def on_start(self):

def track_playback_started(self, tl_track):
track = tl_track.track
artists = ', '.join([a.name for a in track.artists])
artists = ', '.join(sorted([a.name for a in track.artists]))
duration = track.length and track.length // 1000 or 0
self.last_start_time = int(time.time())
logger.debug('Now playing track: %s - %s', artists, track.name)
Expand All @@ -54,7 +54,7 @@ def track_playback_started(self, tl_track):

def track_playback_ended(self, tl_track, time_position):
track = tl_track.track
artists = ', '.join([a.name for a in track.artists])
artists = ', '.join(sorted([a.name for a in track.artists]))
duration = track.length and track.length // 1000 or 0
time_position = time_position // 1000
if duration < 30:
Expand Down

0 comments on commit 042707a

Please sign in to comment.