Some more adjustments to the websocket failover retries.

Try to determine if a track was skipped and if so don't log it.
This commit is contained in:
Tim 2015-09-28 11:58:20 +02:00
parent 3320f2a2f9
commit 667c6fe3d1
2 changed files with 12 additions and 6 deletions

View file

@ -131,6 +131,12 @@ class ActivityProcessor(object):
logger.debug(u"PlexPy ActivityProcessor :: Play duration for ratingKey %s is %s secs which is less than %s "
u"seconds, so we're not logging it." %
(session['rating_key'], str(real_play_time), plexpy.CONFIG.LOGGING_IGNORE_INTERVAL))
if session['media_type'] == 'track' and not is_import:
if real_play_time < 15 and session['duration'] >= 30:
logging_enabled = False
logger.debug(u"PlexPy ActivityProcessor :: Play duration for ratingKey %s is %s secs, "
u"looks like it was skipped so we're not logging it" %
(session['rating_key'], str(real_play_time)))
elif is_import and import_ignore_interval:
if (session['media_type'] == 'movie' or session['media_type'] == 'episode') and \
(real_play_time < int(import_ignore_interval)):