add session add & commit, fix quote arg

This commit is contained in:
Xevion
2020-01-19 23:19:48 -06:00
parent 575bb34ea0
commit 9c00745503

View File

@@ -60,7 +60,9 @@ class Episode(db.Model):
quotes = [quote.string + quote.next_sibling.string for quote in section.find_all('b')] quotes = [quote.string + quote.next_sibling.string for quote in section.find_all('b')]
isDeletedScene = quotes[0].lower().startswith('deleted scene') isDeletedScene = quotes[0].lower().startswith('deleted scene')
if isDeletedScene: deleted += 1 if isDeletedScene: deleted += 1
s = Section(episode=self, deleted=deleted if isDeletedScene else -1, quotes=) s = Section(episode=self, deleted=deleted if isDeletedScene else -1, quotes=quotes)
db.session.add(s)
db.session.commit()
@property @property
def scrapeURL(self): def scrapeURL(self):