Trying to work out commercial logic / fixed XML error.

This commit is contained in:
Justin Emter
2017-07-25 20:29:59 -07:00
parent 8b2e69fc3e
commit 6aa4207660
2 changed files with 18 additions and 6 deletions

View File

@@ -99,7 +99,7 @@ class PseudoChannelCommercial():
commercial_dur_sum = 0
while int(time_diff.total_seconds()) >= commercial_dur_sum and count < len(self.commercials):
while int(time_diff.total_seconds()) >= commercial_dur_sum and (count*10000) < len(self.commercials):
random_commercial = self.get_random_commercial()
@@ -126,6 +126,10 @@ class PseudoChannelCommercial():
"", # plex_media_id
)
if int(time_diff.total_seconds()) < commercial_dur_sum:
break
commercial_list.append(new_commercial)
#print "here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"