upsies.trackers.nbl.tracker
Concrete TrackerBase subclass for NBL
Classes
- class upsies.trackers.nbl.tracker.NblTracker(options=None)[source]
Bases:
TrackerBase- setup_howto_template = '{howto.introduction}\n\n{howto.next_section}. Announce URL\n\n {howto.current_section}.1 On the website, go to Shows -> Upload and copy the ANNOUNCE_URL.\n {howto.current_section}.2 $ upsies set trackers.{tracker.name}.announce_url ANNOUNCE_URL\n\n{howto.next_section}. API key\n\n {howto.current_section}.1 On the website, go to USERNAME -> Settings and scroll down\n to "API keys".\n {howto.current_section}.2 Tick the "New Key" and the "Upload" boxes.\n {howto.current_section}.3 Click on "Save Profile".\n {howto.current_section}.4 Scroll down to "API keys" again and copy the new API_KEY.\n {howto.current_section}.5 $ upsies set trackers.{tracker.name}.apikey API_KEY\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
NblTrackerJobs
- TrackerConfig
alias of
NblTrackerConfig
- cli_arguments = {'submit': {('--anonymous', '--an'): {'help': 'Hide your username for this submission\nValid BOOL values: true/false, yes/no, 1/0, on/off, aye/nay', 'metavar': 'BOOL', 'type': <function bool_or_none>}, ('--tvmaze', '--tv'): {'help': 'TVmaze ID or URL', 'type': <function webdb_id.<locals>.webdb_id>}}}
CLI argument definitions (see
CommandBase.cli_arguments)
- rules = ()
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