Skip to content

Commit

Permalink
Add manual year override option to arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
lewler committed Nov 26, 2024
1 parent ac29c15 commit 43bfafc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def parse(self, args, meta):
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="Override the year found", type=int, default=0)
parser.add_argument('-ptp', '--ptp', nargs='*', required=False, help="PTP torrent id/permalink", type=str)
parser.add_argument('-blu', '--blu', nargs='*', required=False, help="BLU torrent id/link", type=str)
parser.add_argument('-aither', '--aither', nargs='*', required=False, help="Aither torrent id/link", type=str)
Expand Down
2 changes: 2 additions & 0 deletions src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -3105,6 +3105,8 @@ async def get_name(self, meta):
title = meta.get('title', "")
alt_title = meta.get('aka', "")
year = meta.get('year', "")
if meta.get('manual_year') > 0:
year = meta.get('manual_year')
resolution = meta.get('resolution', "")
if resolution == "OTHER":
resolution = ""
Expand Down

0 comments on commit 43bfafc

Please sign in to comment.