Skip to content

Commit ba8a9f8

Browse files
committed
Set None in playcount because last.fm api not returns it in gettopatists
1 parent fc04dff commit ba8a9f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lastfm/geo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def get_top_tracks(api, country, location = None):
136136
stats = Stats(
137137
subject = t.findtext('name'),
138138
rank = int(t.attrib['rank']),
139-
playcount = int(t.findtext('playcount'))
139+
playcount = int(a.findtext('playcount')) if a.findtext('playcount') else None
140140
),
141141
streamable = (t.findtext('streamable') == '1'),
142142
full_track = (t.find('streamable').attrib['fulltrack'] == '1'),

0 commit comments

Comments
 (0)