complete overhaul to better site design with Bulma, renamed some routes

This commit is contained in:
Xevion
2020-03-09 18:01:55 -05:00
parent edd5b49dfe
commit 7a42620fbd
7 changed files with 73 additions and 66 deletions

View File

@@ -103,8 +103,8 @@ class Episode(db.Model):
def download(self, force=False):
"""downloads data"""
print(f'Downloading e{self.number}/s{self.season_id} from {self.link}')
if not self.downloaded or force:
print(f'Downloading e{self.number}/s{self.season_id} from {self.link}')
data = requests.get(self.link).text
open(self.path, "w+", encoding="utf-8").write(data)