upsies.jobs.bdinfo
Wrapper for bdinfo command
Classes
- class upsies.jobs.bdinfo.BdinfoJob(*, home_directory=None, cache_directory=None, cache_id='', ignore_cache=False, no_output_is_ok=False, hidden=False, autostart=True, guaranteed=False, precondition=None, prejobs=(), callbacks={}, **kwargs)[source]
Bases:
JobBaseProvide (partial) BDInfo report
This job adds the following signals to
signal:progressEmitted in short intervals after
playlists_selected()was called at least once until all BDInfo reports are available. Registered callbacks get aBdinfoProgressinstance.bdinfo_reportEmitted when a BDInfo report is available. Registered callbacks get a
BdinfoReportinstance.
- cache_id = None
- initialize(*, summary=None, format='{BDINFO}')[source]
Set internal state
- Parameters:
summary –
Only provide a shorter summary as output
One of
full,quickor None.Note that this only affects the
output.bdinfo_reports,full_summariesandquick_summariesare always available.format – String that contains the placeholder
"{BDINFO}", which is replaced by the actual BDInfo report
- async run()[source]
Do the work
This method is called by
start(). Its coroutine is passed toadd_task().Any keyword arguments passed to
initialize()are available viakwargs.The job
is_finishedwhen alladded tasksare done or cancelled. (See alsofinalize()andfinalization().)This method may call
add_task()if more tasks are required.
- terminate(reason=None)[source]
Cancel all
added tasksDo nothing if job
is_finishedoris_terminated.- Parameters:
reason – Why this job is terminated (only used for debugging)
- property bdinfo_reports
Sequence of
BdinfoReportinstances
- property reports_by_file
Map playlist filepaths (.mpls) to BDInfo reports gathered so far
- property full_summaries
Sequence of
full_summaryvalues frombdinfo_reports
- property quick_summaries
Sequence of
quick_summaryvalues frombdinfo_reports
- class upsies.jobs.bdinfo.BdinfoProgress(*, playlist, percent=0, time_elapsed=0, time_remaining=0)[source]
Bases:
dictSimple
dictsubclass with the following keys:Keys are also conveniently available as attributes.
- class upsies.jobs.bdinfo.BdinfoReport(report, playlist)[source]
Bases:
strBDInfo report as special string with the additional properties
full_summary,quick_summaryandplaylist- property full_summary
Full summary of the BDInfo report
- property quick_summary
Quick summary of the BDInfo report