Skip to content

Commit

Permalink
Merge pull request #110 from metabrainz/stats-fix
Browse files Browse the repository at this point in the history
Fix the stats that are not fetching metadata
  • Loading branch information
mayhem committed Aug 11, 2023
2 parents 53d360a + 99611d9 commit 3c424ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion troi/musicbrainz/recording_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def read(self, inputs):

data = []
for r in recordings:
if r.artist is None or r.artist.name == "" or len(r.artist.mbids) == 0 or r.name == "":
if r.artist is None or r.artist.name is None or len(r.artist.mbids) == 0 or r.name is None:
data.append({ '[recording_mbid]': r.mbid })

# If we have all the data for all the recordings, no need to lookup anything and simply pass the data along
Expand Down
3 changes: 0 additions & 3 deletions troi/patches/lb_radio_classes/recs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def __init__(self, user_name, listened="all", mode="easy"):
self.listened = listened
self.mode = mode
self.client = pylistenbrainz.ListenBrainz()
print(self.listened)

def inputs(self):
return []
Expand Down Expand Up @@ -81,6 +80,4 @@ def read(self, entities):

# How do we prevent sequential tracks by the same artist?

print(f"addded {added} skipped {skipped}")

return recordings

0 comments on commit 3c424ea

Please sign in to comment.