Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add modq and drafts to LST #32

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Add modq and drafts to LST #32

merged 2 commits into from
Sep 5, 2024

Conversation

LostRager
Copy link

Should not break anything afaik. Feel free to change anything, all updated unit3d based trackers should also get the modq flag.

@Audionut
Copy link
Owner

Audionut commented Sep 4, 2024

Looks fine on first glance, thanks. I really should investigate the purpose of the draft.

What's the reason for removing LST from the API list in upload.py?

@LostRager
Copy link
Author

Looks fine on first glance, thanks. I really should investigate the purpose of the draft.

What's the reason for removing LST from the API list in upload.py?

If you dont remove the tracker from the api list, it will do all this first

Upload-Assistant/upload.py

Lines 266 to 286 in 4352cb3

if tracker in api_trackers:
tracker_class = tracker_class_map[tracker](config=config)
if meta['unattended']:
upload_to_tracker = True
else:
upload_to_tracker = cli_ui.ask_yes_no(f"Upload to {tracker_class.tracker}? {debug}", default=meta['unattended'])
if upload_to_tracker:
console.print(f"Uploading to {tracker_class.tracker}")
if check_banned_group(tracker_class.tracker, tracker_class.banned_groups, meta):
continue
if tracker == "RTF":
await tracker_class.api_test(meta)
dupes = await tracker_class.search_existing(meta)
dupes = await common.filter_dupes(dupes, meta)
# note BHDTV does not have search implemented.
meta = dupe_check(dupes, meta)
if meta['upload'] is True:
await tracker_class.upload(meta)
if tracker == 'SN':
await asyncio.sleep(16)
await client.add_to_client(meta, tracker_class.tracker)
and then go to

Upload-Assistant/upload.py

Lines 349 to 370 in 7034c4e

if tracker == "LST":
lst = LST(config=config)
modq, draft = await asyncio.gather(lst.get_flag(meta, 'modq'), lst.get_flag(meta, 'draft'))
modq = 'Yes' if modq else 'No'
draft = 'Yes' if draft else 'No'
upload_to_lst = meta['unattended'] or cli_ui.ask_yes_no(f"Upload to LST? (draft: {draft}) (modq: {modq}) {debug}", default=meta['unattended'])
if not upload_to_lst:
return
console.print("Uploading to LST")
if check_banned_group('LST', lst.banned_groups, meta):
return
dupes = await lst.search_existing(meta)
dupes = await common.filter_dupes(dupes, meta)
meta = dupe_check(dupes, meta)
if meta['upload']:
await lst.upload(meta)
await client.add_to_client(meta, lst.tracker)

@Audionut Audionut merged commit 7fb6b1b into Audionut:master Sep 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants