upsies.trackers.sc.tracker
Concrete TrackerBase subclass for SC
Classes
- class upsies.trackers.sc.tracker.ScTracker(options=None)[source]
Bases:
TrackerBase- setup_howto_template = '{howto.introduction}\n\n{howto.next_section}. Login Credentials\n\n {howto.current_section}.1 $ upsies set trackers.{tracker.name}.username USERNAME\n {howto.current_section}.2 $ upsies set trackers.{tracker.name}.password PASSWORD\n {howto.current_section}.3 Store the login session cookie. (optional)\n $ upsies set trackers.{tracker.name}.cookies_filepath "~/.cache/upsies/{tracker.name}.cookies"\n WARNING: Anyone with acces to that file has full control over your {tracker.label} account.\n\n{howto.next_section}. Announce URL (Optional)\n\n The announce URL is fetched from the website on demand, but you can\n also configure it explicitly.\n\n {howto.current_section}.1 $ upsies set trackers.{tracker.name}.announce_url ANNOUNCE_URL\n\n{howto.screenshots}\n\n{howto.autoseed}\n\n{howto.reuse_torrents}\n\n{howto.upload}\n'
Step-by-step guide that explains how to make your first upload
Note
This MUST be a class attribute and not a property.
The following placeholders can be used in f-string format:
howto-Howtoinstancetracker-TrackerBasesubclassexecutable- Name of the executable that runs the application
- TrackerJobs
alias of
ScTrackerJobs
- TrackerConfig
alias of
ScTrackerConfig
- cli_arguments = {'submit': {('--edition',): {'help': 'Edition information in the format "YEAR,TITLE,DISTRIBUTOR,CATALOGUE_NUMBER"\nEvery value except for YEAR may be empty.'}, ('--edition-catalogue-number', '--ec'): {'help': 'Editon year (overloads CATALOGUE_NUMBER in --edition)'}, ('--edition-distributor', '--ed'): {'help': 'Editon year (overloads DISTRIBUTOR in --edition)'}, ('--edition-title', '--et'): {'help': 'Editon title (overloads TITLE from --edition)'}, ('--edition-year', '--ey'): {'help': 'Editon year (overloads YEAR from --edition)'}, ('--imdb', '--im'): {'help': 'IMDb ID or URL', 'type': <function webdb_id.<locals>.webdb_id>}, ('--only-description', '--od'): {'action': 'store_true', 'group': 'generate-metadata', 'help': 'Only generate description (do not submit)'}, ('--poster', '--po'): {'help': 'Path or URL to poster image'}, ('--screenshots', '--ss'): {'action': 'extend', 'help': 'Path(s) to existing screenshot file(s)\nDirectories are searched recursively.\nMore screenshots are created if necessary.', 'metavar': 'SCREENSHOT', 'nargs': '+', 'type': <function files_with_extension.<locals>.files_with_extension>}, ('--screenshots-count', '--ssc'): {'help': 'How many screenshots to make (min=3, max=10)', 'type': functools.partial(<function integer>, min=3, max=10)}, ('--trailer', '--tr'): {'help': 'Trailer URL (Vimeo or YouTube)'}}}
CLI argument definitions (see
CommandBase.cli_arguments)
- rules = (<class 'upsies.trackers.sc.rules.ScBannedGroup'>,)
Sequence of
TrackerRuleBasesubclasses or NoneFor convenience, this may also be a
ModuleTypethat providesTrackerRuleBasesubclasses.
- async confirm_logged_in()[source]
Check if we are logged in by doing a website request
This method is called by
login()to make sure_login()succeeded. It is also called bystill_logged_in(), which is used check if a stored user session is still working or if a new session must be started (e.g. because the cookie expired).- Raises:
errors.RequestError – if we are not logged in
- async get_announce_url()[source]
Get announce URL from
optionsor tracker websiteWarning
You should expect that
login()was called first when implementing this method and raiseRuntimeErrorifis_logged_inis False.- Raises:
errors.RequestError – on any kind of failure
- async upload(tracker_jobs)[source]
Upload torrent and other metadata from jobs
- Parameters:
tracker_jobs (TrackerJobsBase) –
TrackerJobsinstance