-
Notifications
You must be signed in to change notification settings - Fork 1
/
dl_complete.py
33 lines (25 loc) · 899 Bytes
/
dl_complete.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /usr/bin/env python
import time
from synoshows import SettingsLoader
from synoshows import QueueProcessor
from synoshows import Archiver
from synoshows import NoteFormatter
from synoshows import PushBulletNotifier
settings = SettingsLoader.LoadSettings()
test = False
configuration = settings["live"]
processor = QueueProcessor(test, configuration)
archiver = Archiver(test, configuration["archivePath"], settings["tvnamerconfig_path"])
formatter = NoteFormatter()
pb = PushBulletNotifier(settings["pushbulletkey"])
time.sleep(5)
tvItems, otherItems = processor.ProcessQueue()
#Tv Shows Notifications
if(len(tvItems) > 0):
report = archiver.Archive(tvItems)
title, note = formatter.FormatShowsNote(report)
pb.NotifyNote(title, note)
#Other Downloads Notifications
if(len(otherItems) > 0):
title, note = formatter.FormatDLCompleteNote(otherItems)
pb.NotifyNote(title, note)