Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in album track listing #64

Merged
merged 1 commit into from
Aug 22, 2022

Commits on Aug 14, 2022

  1. Trying to list the tracks in an album borks with this stack trace:

       ERROR    [HttpServer] mopidy_iris.handlers local variable 'data' referenced before assignment
       ERROR    [YTMusicBackend-3 (_actor_loop)] mopidy_ytmusic YTMusic failed getting tracks for album "xxx"
       Traceback (most recent call last):
         File "/usr/local/lib/python3.10/dist-packages/mopidy_ytmusic/library.py", line 437, in lookup
           tracks = self.albumToTracks(res, bId)
         File "/usr/local/lib/python3.10/dist-packages/mopidy_ytmusic/library.py", line 904, in albumToTracks
           songartists = [Artist(name=song["artists"])]
         File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 159, in __call__
           instance = super().__call__(*args, **kwargs)
         File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 35, in __init__
             self._set_field(key, value)
         File "/usr/lib/python3/dist-packages/mopidy/models/immutable.py", line 188, in _set_field
           object.__setattr__(self, name, value)
         File "/usr/lib/python3/dist-packages/mopidy/models/fields.py", line 50, in __set__
           value = self.validate(value)
         File "/usr/lib/python3/dist-packages/mopidy/models/fields.py", line 34, in validate
           raise TypeError(
         TypeError: Expected name to be a <class 'str'>, not [{'name': 'blah', 'id': None}]
    
    This was an apparent typo since the type validation clearly expects a
    string and not the full Artist object.
    mikey-austin committed Aug 14, 2022
    Configuration menu
    Copy the full SHA
    b1735b6 View commit details
    Browse the repository at this point in the history