From 4d5e979a1aafb3fd73389038c335c52e184ec5c3 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 6 Mar 2023 01:03:40 -0500 Subject: [PATCH] Fix bug in finishing scrobbles --- vrobbler/apps/scrobbles/models.py | 2 +- vrobbler/apps/scrobbles/views.py | 2 +- vrobbler/apps/videos/imdb.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index f779f64..2421f8e 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -627,7 +627,7 @@ class Scrobble(TimeStampedModel): ] ) return - check_scrobble_for_finish(self, force_finish) + check_scrobble_for_finish(self, force_finish=force_finish) def pause(self) -> None: if self.is_paused: diff --git a/vrobbler/apps/scrobbles/views.py b/vrobbler/apps/scrobbles/views.py index 2e30567..84790b2 100644 --- a/vrobbler/apps/scrobbles/views.py +++ b/vrobbler/apps/scrobbles/views.py @@ -369,7 +369,7 @@ def import_audioscrobbler_file(request): @api_view(["GET"]) def scrobble_finish(request, uuid): user = request.user - success_url = reverse_lazy("vrobbler-home") + success_url = request.META.get("HTTP_REFERER") if not user.is_authenticated: return HttpResponseRedirect(success_url) diff --git a/vrobbler/apps/videos/imdb.py b/vrobbler/apps/videos/imdb.py index 30f6854..a08d134 100644 --- a/vrobbler/apps/videos/imdb.py +++ b/vrobbler/apps/videos/imdb.py @@ -36,7 +36,6 @@ def lookup_video_from_imdb(imdb_id: str) -> dict: except IndexError: plot = "" - logger.debug(f"Received data from IMDB: {media.__dict__}") # Build a rough approximation of a Jellyfin data response data_dict = { "ItemType": item_type,