Skip to content

Commit

Permalink
musicbrainz typos
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlan-00 committed Oct 15, 2021
1 parent 9cbbc9f commit 2e409ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ampache-fm.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def do_deactivate(self):
""" Deactivate the plugin """
print('deactivating ampache-fm')
self.nowtime = int(time.time())
self.cache_now_playing()
# self.cache_now_playing()
Gio.Application.get_default()
del self.shell
del self.rbdb
Expand Down Expand Up @@ -185,7 +185,7 @@ def elapsed_changed(self, shell_player, elapsed):

def cache_now_playing(self):
""" Cache the track to file or to Ampache if you are able """
if self._check_session():
if self._check_session() and self.nowtitle:
print('Sending scrobble to Ampache: ' + self.nowtitle)
Process(target=self.ampache.scrobble,
args=(self.nowtitle, self.nowartist, self.nowalbum,
Expand Down
4 changes: 2 additions & 2 deletions ampache.py
Original file line number Diff line number Diff line change
Expand Up @@ -2119,13 +2119,13 @@ def scrobble(self, title, artist_name, album_name,
'album': album_name,
'songmbid': mbtitle,
'albummbid': mbalbum,
'artistmdib': mbartist}
'artistmbid': mbartist}
if not mbtitle:
data.pop('songmbid')
if not mbalbum:
data.pop('albummbid')
if not mbartist:
data.pop('artistmdib')
data.pop('artistmbid')
data = urllib.parse.urlencode(data)
full_url = ampache_url + '?' + data
ampache_response = self.fetch_url(full_url, self.AMPACHE_API, 'scrobble')
Expand Down

0 comments on commit 2e409ff

Please sign in to comment.