mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2026-01-06 10:13:15 +00:00
Fixed the resource hogging issue. Also added custom daily update var to config.
This commit is contained in:
@@ -88,7 +88,7 @@ class PseudoChannelCommercial():
|
||||
|
||||
def get_commercials_to_place_between_media(self, last_ep, now_ep):
|
||||
|
||||
print last_ep.end_time, now_ep.start_time
|
||||
#print last_ep.end_time, now_ep.start_time
|
||||
|
||||
prev_item_end_time = datetime.strptime(last_ep.end_time.strftime('%Y-%m-%d %H:%M:%S.%f'), '%Y-%m-%d %H:%M:%S.%f')
|
||||
|
||||
@@ -110,7 +110,7 @@ class PseudoChannelCommercial():
|
||||
|
||||
new_commercial_start_time = prev_item_end_time
|
||||
|
||||
print "here", time_diff.seconds
|
||||
#print "here", time_diff.seconds
|
||||
|
||||
while curr_item_start_time > new_commercial_start_time and (count) < len(self.commercials)*100:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class PseudoChannelDatabase():
|
||||
|
||||
self.db = db
|
||||
|
||||
self.conn = sqlite3.connect(self.db)
|
||||
self.conn = sqlite3.connect(self.db, check_same_thread=False)
|
||||
|
||||
self.cursor = self.conn.cursor()
|
||||
|
||||
@@ -299,6 +299,8 @@ class PseudoChannelDatabase():
|
||||
|
||||
datalist = list(self.cursor.fetchall())
|
||||
|
||||
print "##### Getting Daily Schedule from DB."
|
||||
|
||||
return datalist
|
||||
|
||||
def get_movie(self, title):
|
||||
|
||||
Reference in New Issue
Block a user