Pārlūkot izejas kodu

[videos] Add subtitle to notifications

Colin Powell 6 mēneši atpakaļ
vecāks
revīzija
a08574b359
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      vrobbler/apps/scrobbles/models.py

+ 2 - 0
vrobbler/apps/scrobbles/models.py

@@ -1191,6 +1191,8 @@ class Scrobble(TimeStampedModel):
             notify_str = f"{scrobble.media_obj}"
             if scrobble.log and scrobble.log.get("description"):
                 notify_str += f" - {scrobble.log.get('description')}"
+            if scrobble.media_obj.subtitle:
+                notify_str += f" - {scrobble.media_obj.subtitle}"
             requests.post(
                 profile.ntfy_url,
                 data=notify_str.encode(encoding="utf-8"),