11 #include "threads/CriticalSection.h" 12 #include "utils/JobManager.h" 45 void ScanLibrary(
const std::string& directory,
bool scanAll =
false,
bool showProgress =
true);
67 bool CleanLibrary(
const std::set<int>& paths = std::set<int>(),
68 bool asynchronous =
true,
89 bool ignoreNfo =
false,
90 bool forceRefresh =
true,
91 bool refreshAll =
false,
92 const std::string& searchTitle =
"");
103 bool forceRefresh =
true,
104 bool refreshAll =
false);
112 void MarkAsWatched(
const std::shared_ptr<CFileItem>& item,
bool watched);
159 typedef std::set<CVideoLibraryJob*> VideoLibraryJobs;
160 typedef std::map<std::string, VideoLibraryJobs> VideoLibraryJobMap;
161 VideoLibraryJobMap m_jobs;
162 CCriticalSection m_critical;
164 bool m_modal =
false;
165 bool m_cleaning =
false;
void AddJob(CVideoLibraryJob *job)
Adds the given job to the queue.
Definition: VideoLibraryQueue.cpp:170
Base class for jobs that are executed asynchronously.
Definition: Job.h:109
void StopLibraryScanning()
Stop and dequeue all scanning jobs.
Definition: VideoLibraryQueue.cpp:67
void OnJobComplete(unsigned int jobID, bool success, CJob *job) override
The callback used when a job completes.
Definition: VideoLibraryQueue.cpp:238
void ScanLibrary(const std::string &directory, bool scanAll=false, bool showProgress=true)
Enqueue a library scan job.
Definition: VideoLibraryQueue.cpp:43
Basic implementation/interface of a CJob which interacts with the video database. ...
Definition: VideoLibraryJob.h:19
void Refresh()
Notifies all to refresh the current listings.
Definition: VideoLibraryQueue.cpp:231
bool IsRunning() const
Whether any jobs are running or not.
Definition: VideoLibraryQueue.cpp:226
bool RefreshItemModal(std::shared_ptr< CFileItem > item, bool forceRefresh=true, bool refreshAll=false)
Refreshes the details of the given item with a modal dialog.
Definition: VideoLibraryQueue.cpp:137
void RefreshItem(std::shared_ptr< CFileItem > item, bool ignoreNfo=false, bool forceRefresh=true, bool refreshAll=false, const std::string &searchTitle="")
Enqueues a job to refresh the details of the given item.
Definition: VideoLibraryQueue.cpp:127
bool CleanLibraryModal(const std::set< int > &paths=std::set< int >())
Executes a library cleaning with a modal dialog.
Definition: VideoLibraryQueue.cpp:110
static CVideoLibraryQueue & GetInstance()
Gets the singleton instance of the video library queue.
Definition: VideoLibraryQueue.cpp:37
void MarkAsWatched(const std::shared_ptr< CFileItem > &item, bool watched)
Queue a watched status update job.
Definition: VideoLibraryQueue.cpp:154
bool IsScanningLibrary() const
Check if a library scan is in progress.
Definition: VideoLibraryQueue.cpp:48
void CancelAllJobs()
Cancels all running and queued jobs.
Definition: VideoLibraryQueue.cpp:217
void CancelJob(CVideoLibraryJob *job)
Cancels the given job and removes it from the queue.
Definition: VideoLibraryQueue.cpp:192
Definition: GUIDialogExtendedProgressBar.h:16
Queue for video library jobs.
Definition: VideoLibraryQueue.h:28
bool CleanLibrary(const std::set< int > &paths=std::set< int >(), bool asynchronous=true, CGUIDialogProgressBarHandle *progressBar=NULL)
Enqueue a library cleaning job.
Definition: VideoLibraryQueue.cpp:83
Represents a file on a share.
Definition: FileItem.h:102
void ResetResumePoint(const std::shared_ptr< CFileItem > &item)
Queue a reset resume point job.
Definition: VideoLibraryQueue.cpp:162
Job Queue class to handle a queue of unique jobs to be processed sequentially.
Definition: JobManager.h:63