Added commercial support. Currently seems to be working ok, but needs adjusting / testing. Currently am using it with a time-shift of '5'.

This commit is contained in:
Justin Emter
2017-07-25 18:32:22 -07:00
parent ab9f69de5f
commit 8b2e69fc3e
6 changed files with 268 additions and 50 deletions

View File

@@ -329,6 +329,14 @@ class PseudoChannelDatabase():
return self.get_media(title, media)
def get_commercials(self):
self.cursor.execute("SELECT * FROM commercials ORDER BY duration ASC")
datalist = list(self.cursor.fetchall())
return datalist
def update_shows_table_with_last_episode(self, showTitle, lastEpisodeTitle):
sql1 = "UPDATE shows SET lastEpisodeTitle = ? WHERE title LIKE ? COLLATE NOCASE"
@@ -461,7 +469,7 @@ class PseudoChannelDatabase():
return first_episode
def get_commercials(self, title):
def get_commercial(self, title):
media = "commercials"