mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2026-01-06 18:23:15 +00:00
Fixed play() err, custom-section-names should be working now.
This commit is contained in:
@@ -398,14 +398,9 @@ class PseudoChannel():
|
||||
else:
|
||||
next_episode = self.db.get_next_episode(entry[3])
|
||||
if next_episode != None:
|
||||
try:
|
||||
print "next_episode[9]", next_episode[9]
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
customSectionName = next_episode[9]
|
||||
except:
|
||||
customSectionName = "TV Shows"
|
||||
|
||||
customSectionName = next_episode[9]
|
||||
|
||||
episode = Episode(
|
||||
section, # section_type
|
||||
next_episode[3], # title
|
||||
|
||||
@@ -115,7 +115,13 @@ class PseudoChannelDatabase():
|
||||
"""Database functions.
|
||||
Setters, etc.
|
||||
"""
|
||||
def add_movies_to_db(self, mediaID, title, duration, plexMediaID, customSectionName):
|
||||
def add_movies_to_db(
|
||||
self,
|
||||
mediaID,
|
||||
title,
|
||||
duration,
|
||||
plexMediaID,
|
||||
customSectionName):
|
||||
|
||||
unix = int(time.time())
|
||||
try:
|
||||
@@ -129,7 +135,13 @@ class PseudoChannelDatabase():
|
||||
self.conn.rollback()
|
||||
raise e
|
||||
|
||||
def add_videos_to_db(self, mediaID, title, duration, plexMediaID, customSectionName):
|
||||
def add_videos_to_db(
|
||||
self,
|
||||
mediaID,
|
||||
title,
|
||||
duration,
|
||||
plexMediaID,
|
||||
customSectionName):
|
||||
|
||||
unix = int(time.time())
|
||||
try:
|
||||
@@ -144,7 +156,15 @@ class PseudoChannelDatabase():
|
||||
self.conn.rollback()
|
||||
raise e
|
||||
|
||||
def add_shows_to_db(self, mediaID, title, duration, lastEpisodeTitle, fullImageURL, plexMediaID, customSectionName):
|
||||
def add_shows_to_db(
|
||||
self,
|
||||
mediaID,
|
||||
title,
|
||||
duration,
|
||||
lastEpisodeTitle,
|
||||
fullImageURL,
|
||||
plexMediaID,
|
||||
customSectionName):
|
||||
|
||||
unix = int(time.time())
|
||||
try:
|
||||
@@ -158,7 +178,16 @@ class PseudoChannelDatabase():
|
||||
self.conn.rollback()
|
||||
raise e
|
||||
|
||||
def add_episodes_to_db(self, mediaID, title, duration, episodeNumber, seasonNumber, showTitle, plexMediaID, customSectionName):
|
||||
def add_episodes_to_db(
|
||||
self,
|
||||
mediaID,
|
||||
title,
|
||||
duration,
|
||||
episodeNumber,
|
||||
seasonNumber,
|
||||
showTitle,
|
||||
plexMediaID,
|
||||
customSectionName):
|
||||
|
||||
unix = int(time.time())
|
||||
try:
|
||||
@@ -172,7 +201,13 @@ class PseudoChannelDatabase():
|
||||
self.conn.rollback()
|
||||
raise e
|
||||
|
||||
def add_commercials_to_db(self, mediaID, title, duration, plexMediaID, customSectionName):
|
||||
def add_commercials_to_db(
|
||||
self,
|
||||
mediaID,
|
||||
title,
|
||||
duration,
|
||||
plexMediaID,
|
||||
customSectionName):
|
||||
|
||||
unix = int(time.time())
|
||||
try:
|
||||
|
||||
@@ -376,6 +376,7 @@ class PseudoDailyScheduleController():
|
||||
|
||||
try:
|
||||
if mediaType == "TV Shows":
|
||||
print "Here, Trying to play custom type: ", customSectionName
|
||||
mediaItems = self.PLEX.library.section(customSectionName).get(mediaParentTitle).episodes()
|
||||
for item in mediaItems:
|
||||
if item.title == mediaTitle:
|
||||
@@ -449,6 +450,9 @@ class PseudoDailyScheduleController():
|
||||
if self.DEBUG:
|
||||
print str(row).encode('UTF-8')
|
||||
timeB = datetime.strptime(row[8], '%I:%M:%S %p')
|
||||
|
||||
print "Here, row[13]", row[13]
|
||||
|
||||
self.play_media(row[11], row[6], row[3], offset, row[13])
|
||||
self.write_schedule_to_file(
|
||||
self.get_html_from_daily_schedule(
|
||||
|
||||
Reference in New Issue
Block a user