mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Separate movie/episode/track watched percent
This commit is contained in:
parent
8348424758
commit
6f0c650a72
7 changed files with 74 additions and 36 deletions
|
@ -226,7 +226,9 @@ class ActivityHandler(object):
|
|||
if this_state != 'buffering':
|
||||
progress_percent = helpers.get_percent(db_session['view_offset'], db_session['duration'])
|
||||
notify_states = notification_handler.get_notify_state(session=db_session)
|
||||
if progress_percent >= plexpy.CONFIG.NOTIFY_WATCHED_PERCENT \
|
||||
if (db_session['media_type'] == 'movie' and progress_percent >= plexpy.CONFIG.MOVIE_WATCHED_PERCENT or
|
||||
db_session['media_type'] == 'episode' and progress_percent >= plexpy.CONFIG.TV_WATCHED_PERCENT or
|
||||
db_session['media_type'] == 'track' and progress_percent >= plexpy.CONFIG.MUSIC_WATCHED_PERCENT) \
|
||||
and not any(d['notify_action'] == 'on_watched' for d in notify_states):
|
||||
plexpy.NOTIFY_QUEUE.put({'stream_data': db_session, 'notify_action': 'on_watched'})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue