mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -07:00
Format code
This commit is contained in:
parent
b9f47df930
commit
974c672a87
2 changed files with 11 additions and 8 deletions
|
@ -504,7 +504,7 @@ available_notification_agents = notifiers.available_notification_agents()
|
||||||
</div>
|
</div>
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="notify_recently_added_grandparent" id="notify_recently_added_grandparent" value="1" ${config['notify_recently_added_grandparent']}> Group notifications for recently added TV Shows or Artists
|
<input type="checkbox" name="notify_recently_added_grandparent" id="notify_recently_added_grandparent" value="1" ${config['notify_recently_added_grandparent']}> Group notifications for recently added TV Shows or Music
|
||||||
</label>
|
</label>
|
||||||
<p class="help-block">Endable to only get one notification for recently added Episodes or Tracks. Movies are unaffected.</p>
|
<p class="help-block">Endable to only get one notification for recently added Episodes or Tracks. Movies are unaffected.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -198,11 +198,14 @@ def check_recently_added():
|
||||||
else:
|
else:
|
||||||
logger.error(u"PlexPy Monitor :: Unable to retrieve children metadata for rating_key" % str(item['rating_key']))
|
logger.error(u"PlexPy Monitor :: Unable to retrieve children metadata for rating_key" % str(item['rating_key']))
|
||||||
|
|
||||||
for item in metadata:
|
if metadata:
|
||||||
if (plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_GRANDPARENT and int(item['updated_at']) >= current_time - plexpy.CONFIG.MONITORING_INTERVAL) \
|
for item in metadata:
|
||||||
or (not plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_GRANDPARENT and int(item['added_at']) >= current_time - plexpy.CONFIG.MONITORING_INTERVAL):
|
if (plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_GRANDPARENT \
|
||||||
logger.debug(u"PlexPy Monitor :: Library item %s has been added to Plex." % str(item['rating_key']))
|
and int(item['updated_at']) >= current_time - plexpy.CONFIG.MONITORING_INTERVAL) \
|
||||||
|
or (not plexpy.CONFIG.NOTIFY_RECENTLY_ADDED_GRANDPARENT \
|
||||||
|
and int(item['added_at']) >= current_time - plexpy.CONFIG.MONITORING_INTERVAL):
|
||||||
|
logger.debug(u"PlexPy Monitor :: Library item %s has been added to Plex." % str(item['rating_key']))
|
||||||
|
|
||||||
# Fire off notifications
|
# Fire off notifications
|
||||||
threading.Thread(target=notification_handler.notify_timeline,
|
threading.Thread(target=notification_handler.notify_timeline,
|
||||||
kwargs=dict(timeline_data=item, notify_action='created')).start()
|
kwargs=dict(timeline_data=item, notify_action='created')).start()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue