浏览代码

[scrobbles] Stop any scrobble when stop is called

Colin Powell 1 天之前
父节点
当前提交
30b005fa46
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      vrobbler/apps/scrobbles/scrobblers.py

+ 7 - 2
vrobbler/apps/scrobbles/scrobblers.py

@@ -868,8 +868,13 @@ def manual_scrobble_webpage(
     )
 
     scrobble = Scrobble.create_or_update(webpage, user_id, scrobble_dict)
-    # possibly async this?
-    scrobble.push_to_archivebox()
+
+    if action == "stop":
+        scrobble.stop(force_finish=True)
+    else:
+        # possibly async this?
+        scrobble.push_to_archivebox()
+
     return scrobble