mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-15 16:13:20 -06:00
finish download/build by Season buttons and methods, new episode boxes
This commit is contained in:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user