This commit is contained in:
Cody Cook 2025-06-15 21:20:30 -07:00
commit 095bf52a2f
29 changed files with 2494 additions and 758 deletions

View file

@ -8,17 +8,17 @@ class Settings(db.Model):
Model representing application settings.
"""
__tablename__ = 'settings'
id = db.Column(db.Integer, primary_key=True)
download_path = db.Column(db.String(512), nullable=False)
naming_format = db.Column(db.String(255), nullable=False, default="{podcast_title}/{episode_title}")
auto_download = db.Column(db.Boolean, default=False)
max_downloads = db.Column(db.Integer, default=5)
delete_after_days = db.Column(db.Integer, default=30)
def __repr__(self):
return f'<Settings id={self.id}>'
def to_dict(self):
"""
Convert settings to dictionary for API responses.
@ -30,4 +30,4 @@ class Settings(db.Model):
'auto_download': self.auto_download,
'max_downloads': self.max_downloads,
'delete_after_days': self.delete_after_days
}
}