Skip to content

Commit

Permalink
Set episode title to empty for SP releases
Browse files Browse the repository at this point in the history
SP releases never have episode title and titles are mistaken as episode title sometimes.
  • Loading branch information
ppkhoa authored Dec 16, 2024
1 parent 6ac3b2b commit 004306e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ async def process_tracker(tracker_name, meta):
tracks = meta.get('mediainfo').get('media', {}).get('track', []) # Get all tracks
bitrate = tracks[1].get('BitRate', '') if len(tracks) > 1 else '' # Get video bitrate if available
bitrate_oldMediaInfo = tracks[0].get('OverallBitRate', '') if len(tracks) > 0 else '' # For old MediaInfo (< 24.x where video bitrate is empty, use 'OverallBitRate' instead)
meta['episode_title'] = ""
if (bitrate.isdigit() and int(bitrate) >= 8000000) or (bitrate_oldMediaInfo.isdigit() and int(bitrate_oldMediaInfo) >= 8000000):
meta['service'] = "CR"
elif (bitrate.isdigit() or bitrate_oldMediaInfo.isdigit()): # Only assign if at least one bitrate is present, otherwise leave it to user
Expand Down

0 comments on commit 004306e

Please sign in to comment.