finish download/build by Season buttons and methods, new episode boxes

This commit is contained in:
Xevion
2020-03-09 22:57:32 -05:00
parent e951d55d22
commit a7130ddf56
3 changed files with 21 additions and 15 deletions

View File

@@ -43,11 +43,16 @@ class Season(db.Model):
db.session.commit()
ep.build()
else:
print(f"Rebuilding Season {self.id}, Episode {episode}")
if rebuild:
print(f"Rebuilding Season {self.id}, Episode {episode}")
ep.build()
pass
def download(self, force=False):
episodes = Episode.query.filter_by(season_id=self.id).all()
for ep in episodes:
ep.build(force=force)
@staticmethod
def create_all(build=True):
"""creates new Season objects and runs build() on them"""
@@ -65,9 +70,6 @@ class Season(db.Model):
for season in Season.query.all():
season.build(rebuild=True)
@staticmethod
@property
def episodes(self):
"""returns a List of Episodes under this Season"""