Skip to content

Commit

Permalink
Argument to ensure no edition
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Oct 16, 2024
1 parent be5010b commit d6467ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def parse(self, args, meta):
parser.add_argument('--no-aka', dest='no_aka', action='store_true', required=False, help="Remove AKA from title")
parser.add_argument('--no-dub', dest='no_dub', action='store_true', required=False, help="Remove Dubbed from title")
parser.add_argument('--no-tag', dest='no_tag', action='store_true', required=False, help="Remove Group Tag from title")
parser.add_argument('--no-edition', dest='no_edition', action='store_true', required=False, help="Remove Edition from title")
parser.add_argument('--dual-audio', dest='dual_audio', action='store_true', required=False, help="Add Dual-Audio to the title")
parser.add_argument('-ns', '--no-seed', action='store_true', required=False, help="Do not add torrent to the client")
parser.add_argument('-year', '--year', dest='manual_year', nargs='?', required=False, help="Year", type=int, default=0)
Expand Down
11 changes: 7 additions & 4 deletions src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,13 @@ async def gather_prep(self, meta, mode):
else:
meta['video_encode'], meta['video_codec'], meta['has_encode_settings'], meta['bit_depth'] = self.get_video_encode(mi, meta['type'], bdinfo)

meta['edition'], meta['repack'] = self.get_edition(meta['path'], bdinfo, meta['filelist'], meta.get('manual_edition'))
if "REPACK" in meta.get('edition', ""):
meta['repack'] = re.search(r"REPACK[\d]?", meta['edition'])[0]
meta['edition'] = re.sub(r"REPACK[\d]?", "", meta['edition']).strip().replace(' ', ' ')
if meta.get('no_edition') is False:
meta['edition'], meta['repack'] = self.get_edition(meta['path'], bdinfo, meta['filelist'], meta.get('manual_edition'))
if "REPACK" in meta.get('edition', ""):
meta['repack'] = re.search(r"REPACK[\d]?", meta['edition'])[0]
meta['edition'] = re.sub(r"REPACK[\d]?", "", meta['edition']).strip().replace(' ', ' ')
else:
meta['edition'] = ""

# WORK ON THIS
meta.get('stream', False)
Expand Down

0 comments on commit d6467ce

Please sign in to comment.