mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-12 15:50:01 -08:00
feat(watch-history): intelligently switch to repeating if was initially completed
This commit is contained in:
@@ -191,6 +191,8 @@ class MediaRegistryService:
|
||||
else:
|
||||
if not index_entry.status:
|
||||
index_entry.status = UserMediaListStatus.WATCHING
|
||||
elif index_entry.status == UserMediaListStatus.COMPLETED:
|
||||
index_entry.status = UserMediaListStatus.REPEATING
|
||||
|
||||
if last_watch_position:
|
||||
index_entry.last_watch_position = last_watch_position
|
||||
|
||||
@@ -28,6 +28,11 @@ class WatchHistoryService:
|
||||
)
|
||||
status = None
|
||||
|
||||
if (
|
||||
media_item.user_status
|
||||
and media_item.user_status.status == UserMediaListStatus.COMPLETED
|
||||
):
|
||||
status = UserMediaListStatus.REPEATING
|
||||
self.media_registry.update_media_index_entry(
|
||||
media_id=media_item.id,
|
||||
watched=True,
|
||||
|
||||
Reference in New Issue
Block a user