Skip to content

Commit

Permalink
fix: [dl-downer] Auto file names for movies from VTMGO (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
BelgianNoise authored Jul 22, 2024
1 parent eb7033b commit 7eac8bc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions dl-downer/src/downloaders/VTMGO.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,17 @@ def VTMGO_DL(dl_request: DLRequest):
else:
# use metadata to generate filename
metadata = config['video']['metadata']
prog = metadata['program']['title']
ep = metadata['episode']['order']
season = metadata['episode']['season']['order']
filename = f'{prog}.S{season:02}E{ep:02}'
# check if 'episode' exists in metadata
if 'episode' not in metadata:
# Movie
prog = metadata['title']
filename = f'{prog}'
else:
# Series
ep = metadata['episode']['order']
season = metadata['episode']['season']['order']
prog = metadata['program']['title']
filename = f'{prog}.S{season:02}E{ep:02}'
filename = parse_filename(filename)
logger.debug(f'Filename: {filename}')

Expand Down

0 comments on commit 7eac8bc

Please sign in to comment.