-
Notifications
You must be signed in to change notification settings - Fork 60
Not all albums listed #63
Comments
I'm seeing this as well when I choose 'Browse' then select 'Google Music'. My actual Google Music Library has 1291 albums where as Mopidy is showing roughly 500. |
I'm seeing this behavior too. |
I fix this modifying the file library.py and adding the line self.albums[album.uri] = album This is the portion of code: try:
album = self._aa_to_mopidy_album(song)
self.albums[album.uri] = album
return album
except KeyError: I then found the problem that songs from same album have a diferent albumId, so I comment those lines and just use the key "artist.name + album name". Here is my complete method rewrite. def _to_mopidy_album(self, song):
# First try to process the album as an aa album
# (Difference being that non aa albums don't have albumId)
#try:
# album = self._aa_to_mopidy_album(song)
# self.albums[album.uri] = album
# return album
#except KeyError:
name = song['album']
artist = self._to_mopidy_album_artist(song)
date = unicode(song.get('year', 0))
uri = 'gmusic:album:' + self._create_id(artist.name + name)
images = self._get_images(song)
album = Album(
uri=uri,
name=name,
artists=[artist],
num_tracks=song.get('totalTrackCount', 1),
num_discs=song.get(
'totalDiscCount', song.get('discNumber', 1)),
date=date,
images=images)
self.albums[uri] = album
return album |
thanks elrosti, I've applied your proposed changes and it appears to be Regards On 7 August 2015 at 16:14, elrosti notifications@github.com wrote:
|
This PR also fixed an issue I had with the same album showing up multiple times but only one with the correct ID (and thus only one actually being able to load it's contents) as well as some albums being completely unable to load for the same reason. |
Does the code above fix the issue? Was there a PR? |
I'm still experiencing the issue. As far as I can tell, there wasn't ever a PR. The potential fix was just added above. |
@elrosti Could you open a pull request, if you have a fix, please? |
I'm sorry, I misspoke, the code in this issue from @elrosti fixed the issue for me. I could setup a PR but it'll take a bit as I'm a bit busy at the moment. |
The fix above isn't a complete fix. There's definitely some issues with the local cache, but I'm fairly certain the above code breaks with All Access tracks. EDIT: I've got a re-working of the internal caching going into a PR soon. It should fix this. As far as I can tell, uploaded tracks count towards the albums list, but All Access albums never get cached, so they never show up in the albums list. |
In response to this: #47
The contents of the Google Music folder doesn't seem to match my library, nor does it seem to be consistent between folders. E.g., the folder Google Music/SomeArtist/Albums and the folder Google Music/Albums don't match up.
Example:
The
ls
of Google\ Music/Albums given above is all that I get: I get only 16 albums, none of which are of The Ben Miller Band.The text was updated successfully, but these errors were encountered: