mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-20 02:03:26 +00:00
Fixed the auto daily sched generate bug.
This commit is contained in:
@@ -33,14 +33,11 @@ class PseudoChannel():
|
|||||||
|
|
||||||
PLEX = PlexServer(config.baseurl, config.token)
|
PLEX = PlexServer(config.baseurl, config.token)
|
||||||
MEDIA = []
|
MEDIA = []
|
||||||
USING_GCALENDAR = config.useGoogleCalendar
|
|
||||||
GKEY = config.gkey
|
GKEY = config.gkey
|
||||||
USING_GOOGLE_CALENDAR = False
|
USING_GOOGLE_CALENDAR = config.useGoogleCalendar
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
self.USING_GOOGLE_CALENDAR = config.useGoogleCalendar
|
|
||||||
|
|
||||||
self.db = PseudoChannelDatabase("pseudo-channel.db")
|
self.db = PseudoChannelDatabase("pseudo-channel.db")
|
||||||
|
|
||||||
self.controller = PseudoDailyScheduleController(config.baseurl, config.token, config.plexClients)
|
self.controller = PseudoDailyScheduleController(config.baseurl, config.token, config.plexClients)
|
||||||
@@ -937,9 +934,9 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
now = datetime.datetime.now()
|
now = datetime.datetime.now()
|
||||||
|
|
||||||
now_time = now.time()
|
now_time = now.time().replace(microsecond=0)
|
||||||
|
|
||||||
if now_time == time(23,59):
|
if now_time == time(11,59):
|
||||||
|
|
||||||
if pseudo_channel.USING_GOOGLE_CALENDAR:
|
if pseudo_channel.USING_GOOGLE_CALENDAR:
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
"Movies" : ["Films"],
|
"Movies" : ["Films"],
|
||||||
|
|
||||||
6) For Google Calendar integration add you "gkey" to the "plex_token.py" file
|
6) For Google Calendar integration add your "gkey" to the "plex_token.py" file
|
||||||
...(https://docs.simplecalendar.io/find-google-calendar-id/):
|
...(https://docs.simplecalendar.io/find-google-calendar-id/):
|
||||||
|
|
||||||
gkey = "the key"
|
gkey = "the key"
|
||||||
@@ -33,7 +33,12 @@
|
|||||||
import os, sys
|
import os, sys
|
||||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
# import ../plex_token.py
|
# import ../plex_token.py
|
||||||
import plex_token as plex_token
|
|
||||||
|
try:
|
||||||
|
import plex_token as plex_token
|
||||||
|
except ImportError as e:
|
||||||
|
print "+++++ Cannot find plex_token file. Make sure you create a plex_token.py file with the appropriate data."
|
||||||
|
raise e
|
||||||
|
|
||||||
baseurl = 'http://media.home:32400'
|
baseurl = 'http://media.home:32400'
|
||||||
token = plex_token.token
|
token = plex_token.token
|
||||||
|
|||||||
Reference in New Issue
Block a user