diff --git a/src/args.py b/src/args.py index f51fdfd3..c18a8e68 100644 --- a/src/args.py +++ b/src/args.py @@ -40,6 +40,7 @@ def parse(self, args, meta): parser.add_argument('-edition', '--edition', '--repack', nargs='*', required=False, help="Edition/Repack String e.g.(Director's Cut, Uncut, Hybrid, REPACK, REPACK3)", type=str, dest='manual_edition', default=None) parser.add_argument('-season', '--season', nargs='*', required=False, help="Season (number)", type=str) parser.add_argument('-episode', '--episode', nargs='*', required=False, help="Episode (number)", type=str) + parser.add_argument('-met', '--manual-episode-title', nargs=1, required=False, help="Set episode title, empty = empty", type=datetime.date.fromisoformat, dest="manual_episode_title") parser.add_argument('-daily', '--daily', nargs=1, required=False, help="Air date of this episode (YYYY-MM-DD)", type=datetime.date.fromisoformat, dest="manual_date") parser.add_argument('--no-season', dest='no_season', action='store_true', required=False, help="Remove Season from title") parser.add_argument('--no-year', dest='no_year', action='store_true', required=False, help="Remove Year from title") @@ -242,6 +243,8 @@ def parse(self, args, meta): meta[key] = 100 elif key in ("tag") and value == []: meta[key] = "" + elif key in ["manual_episode_title"]: + meta[key] = value if value else "" else: meta[key] = meta.get(key, None) if key in ('trackers'): diff --git a/src/prep.py b/src/prep.py index d09dba3f..bcc3d75b 100644 --- a/src/prep.py +++ b/src/prep.py @@ -3414,7 +3414,10 @@ async def get_name(self, meta): source = meta.get('source', "") uhd = meta.get('uhd', "") hdr = meta.get('hdr', "") - episode_title = meta.get('episode_title', '') + if meta.get('manual_episode_title'): + episode_title = meta.get('manual_episode_title') + else: + episode_title = meta.get('episode_title', '') if meta.get('is_disc', "") == "BDMV": # Disk video_codec = meta.get('video_codec', "") region = meta.get('region', "")