mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-25 19:14:00 +00:00
Ensure cache directory exists before saving EPG data
This commit is contained in:
parent
c058c4ed10
commit
6adda8209f
1 changed files with 4 additions and 0 deletions
|
|
@ -38,6 +38,10 @@ class EPGSource(models.Model):
|
|||
|
||||
# Build full path in MEDIA_ROOT/cached_epg
|
||||
cache_dir = os.path.join(settings.MEDIA_ROOT, "cached_epg")
|
||||
|
||||
# Create directory if it doesn't exist
|
||||
os.makedirs(cache_dir, exist_ok=True)
|
||||
|
||||
cache = os.path.join(cache_dir, filename)
|
||||
|
||||
return cache
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue