[notifications] Add stop notification utility
This commit is contained in:
@ -9,7 +9,7 @@ import requests
|
||||
from books.constants import BOOKS_TITLES_TO_IGNORE
|
||||
from django.apps import apps
|
||||
from django.contrib.auth import get_user_model
|
||||
from scrobbles.utils import send_notifications_for_scrobble
|
||||
from scrobbles.utils import send_start_notifications_for_scrobble
|
||||
from stream_sqlite import stream_sqlite
|
||||
from webdav.client import get_webdav_client
|
||||
|
||||
@ -443,7 +443,7 @@ def process_koreader_sqlite_file(file_path, user_id) -> list:
|
||||
if new_scrobbles:
|
||||
created = Scrobble.objects.bulk_create(new_scrobbles)
|
||||
if created:
|
||||
send_notifications_for_scrobble(created[-1].id)
|
||||
send_start_notifications_for_scrobble(created[-1].id)
|
||||
fix_long_play_stats_for_scrobbles(created)
|
||||
logger.info(
|
||||
f"Created {len(created)} scrobbles",
|
||||
|
||||
Reference in New Issue
Block a user