LastFMWebService::__playing_now(): list index out of range
Environment
- Lollypop version: 1.4.29
- GTK+ version: 3.24.31
- Operating system: Fedora 35
Bug
Lollypop won't scrobble certain songs. Launching it from a terminal displays the error in the title whenever the offending songs start.
I'll post the tags for one of the songs, as returned by ogginfo
. All songs from the same album won't scrobble at all.
ALBUM=Bottermund / Kodály: Works for cello (cello: János Starker; violin: Josef Gingold)
ARTIST=Zoltán Kodály
COMPILATION=false
COMPOSER=Zoltán Kodály
DATE=-1
REPLAYGAIN_ALBUM_GAIN=-3.46 dB
REPLAYGAIN_ALBUM_PEAK=1.01709771
REPLAYGAIN_TRACK_GAIN=-3.86 dB
REPLAYGAIN_TRACK_PEAK=0.98163527
TITLE=Duo for violin and cello, Op. 7: I. Allegro serioso, non troppo
TRACKNUMBER=5
UPDATE: so I found out the bug is in ws_lastfm.py
, line 247
args.append(("albumArtist", track.album.artists[0]))
I have no experience in Python but this seems to work:
if track.album.artists:
args.append(("albumArtist", track.album.artists[0]))
The same check has to be added to the __listen()
method, or Lollypop won't submit the scrobble.
Outright avoiding an empty album.artists
array in the constructor might be an options as well (Track.__init__()
in object_track.py
):
if len(self.__album.artists) == 0:
self.__album.artists = self.artists
Edited by Richard Ferreira