MythTV  master
videoscan.cpp
Go to the documentation of this file.
1 
2 #include "videoscan.h"
3 
4 #include <QApplication>
5 #include <QImageReader>
6 #include <QUrl>
7 #include <utility>
8 
9 // libmythbase
10 #include "mythevent.h"
11 #include "mythlogging.h"
12 #include "mythdate.h"
13 
14 // libmyth
15 #include "mythcontext.h"
16 #include "remoteutil.h"
17 
18 // libmythui
19 #include "mythscreenstack.h"
20 #include "mythprogressdialog.h"
21 #include "mythdialogbox.h"
22 #include "mythmainwindow.h"
23 
24 // libmythmetadata
26 #include "videoutils.h"
27 #include "globals.h"
28 #include "dbaccess.h"
29 #include "dirscan.h"
30 
31 QEvent::Type VideoScanChanges::kEventType =
32  (QEvent::Type) QEvent::registerEventType();
33 
34 namespace
35 {
36  template <typename DirListType>
37  class dirhandler : public DirectoryHandler
38  {
39  public:
40  dirhandler(DirListType &video_files,
41  const QStringList &image_extensions) :
42  m_videoFiles(video_files)
43  {
44  for (const auto& ext : qAsConst(image_extensions))
45  m_imageExt.insert(ext.toLower());
46  }
47 
48  DirectoryHandler *newDir(const QString &dir_name,
49  const QString &fq_dir_name) override // DirectoryHandler
50  {
51  (void) dir_name;
52  (void) fq_dir_name;
53  return this;
54  }
55 
56  void handleFile(const QString &file_name,
57  const QString &fq_file_name,
58  const QString &extension,
59  const QString &host) override // DirectoryHandler
60 
61  {
62 #if 0
63  LOG(VB_GENERAL, LOG_DEBUG,
64  QString("handleFile: %1 :: %2").arg(fq_file_name).arg(host));
65 #endif
66  (void) file_name;
67  if (m_imageExt.find(extension.toLower()) == m_imageExt.end())
68  {
69  m_videoFiles[fq_file_name].check = false;
70  m_videoFiles[fq_file_name].host = host;
71  }
72  }
73 
74  private:
75  using image_ext = std::set<QString>;
76  image_ext m_imageExt;
77  DirListType &m_videoFiles;
78  };
79 }
80 
83 
85  MThread("VideoScanner")
86 {
87  m_parent = parent;
90  m_listUnknown = gCoreContext->GetBoolSetting("VideoListUnknownFiletypes", false);
91 }
92 
94 {
95  delete m_dbMetadata;
96 }
97 
98 void VideoScannerThread::SetHosts(const QStringList &hosts)
99 {
100  m_liveSGHosts.clear();
101  for (const auto& host : qAsConst(hosts))
102  m_liveSGHosts << host.toLower();
103 }
104 
105 void VideoScannerThread::SetDirs(QStringList dirs)
106 {
107  QString master = gCoreContext->GetMasterHostName().toLower();
108  QStringList searchhosts;
109  QStringList mdirs;
110  m_offlineSGHosts.clear();
111 
112  QStringList::iterator iter = dirs.begin();
113  QStringList::iterator iter2;
114  while ( iter != dirs.end() )
115  {
116  if (iter->startsWith("myth://"))
117  {
118  QUrl sgurl = *iter;
119  QString host = sgurl.host().toLower();
120  QString path = sgurl.path();
121 
122  if (!m_liveSGHosts.contains(host))
123  {
124  // mark host as offline to warn user
125  if (!m_offlineSGHosts.contains(host))
126  m_offlineSGHosts.append(host);
127  // erase from directory list to skip scanning
128  iter = dirs.erase(iter);
129  continue;
130  }
131  if ((host == master) && (!mdirs.contains(path)))
132  {
133  // collect paths defined on master backend so other
134  // online backends can be set to fall through to them
135  mdirs.append(path);
136  }
137  else if (!searchhosts.contains(host))
138  {
139  // mark host as having directories defined so it
140  // does not fall through to those on the master
141  searchhosts.append(host);
142  }
143  }
144 
145  ++iter;
146  }
147 
148  for (iter = m_liveSGHosts.begin(); iter != m_liveSGHosts.end(); ++iter)
149  {
150  if ((!searchhosts.contains(*iter)) && (master != *iter))
151  {
152  for (iter2 = mdirs.begin(); iter2 != mdirs.end(); ++iter2)
153  {
154  // backend is online, but has no directories listed
155  // fall back to those on the master backend
156  dirs.append(MythCoreContext::GenMythURL(*iter,
157  0, *iter2, "Videos"));
158  }
159  }
160  }
161 
162  m_directories = dirs;
163 }
164 
166 {
167  RunProlog();
168 
171  m_dbMetadata->setList(ml);
172 
173  QList<QByteArray> image_types = QImageReader::supportedImageFormats();
174  QStringList imageExtensions;
175  for (const auto & format : qAsConst(image_types))
176  imageExtensions.push_back(QString(format));
177 
178  LOG(VB_GENERAL, LOG_INFO, QString("Beginning Video Scan."));
179 
180  uint counter = 0;
181  FileCheckList fs_files;
182 
183  if (m_hasGUI)
184  SendProgressEvent(counter, (uint)m_directories.size(),
185  tr("Searching for video files"));
186  for (const auto & dir : qAsConst(m_directories))
187  {
188  if (!buildFileList(dir, imageExtensions, fs_files))
189  {
190  if (dir.startsWith("myth://"))
191  {
192  QUrl sgurl = dir;
193  QString host = sgurl.host().toLower();
194 
195  m_liveSGHosts.removeAll(host);
196 
197  LOG(VB_GENERAL, LOG_ERR,
198  QString("Failed to scan :%1:").arg(dir));
199  }
200  }
201  if (m_hasGUI)
202  SendProgressEvent(++counter);
203  }
204 
205  PurgeList db_remove;
206  verifyFiles(fs_files, db_remove);
207  m_dbDataChanged = updateDB(fs_files, db_remove);
208 
209  if (m_dbDataChanged)
210  {
211  QCoreApplication::postEvent(m_parent,
213  m_delList));
214 
215  QStringList slist;
216 
217  QList<int>::const_iterator i;
218  for (int id : qAsConst(m_addList))
219  slist << QString("added::%1").arg(id);
220  for (int id : qAsConst(m_movList))
221  slist << QString("moved::%1").arg(id);
222  for (int id : qAsConst(m_delList))
223  slist << QString("deleted::%1").arg(id);
224 
225  MythEvent me("VIDEO_LIST_CHANGE", slist);
226 
227  gCoreContext->SendEvent(me);
228  }
229  else
230  gCoreContext->SendMessage("VIDEO_LIST_NO_CHANGE");
231 
232  RunEpilog();
233 }
234 
235 
237  const QString &filename)
238 {
239  (void) filename;
240 
241  // TODO: use single DB connection for all calls
242  if (m_removeAll)
243  m_dbMetadata->purgeByID(id);
244 
245  if (!m_keepAll && !m_removeAll)
246  {
247  m_removeAll = true;
248  m_dbMetadata->purgeByID(id);
249  }
250 }
251 
253  PurgeList &remove)
254 {
255  int counter = 0;
256  FileCheckList::iterator iter;
257 
258  if (m_hasGUI)
259  SendProgressEvent(counter, (uint)m_dbMetadata->getList().size(),
260  tr("Verifying video files"));
261 
262  // For every file we know about, check to see if it still exists.
263  for (const auto & file : m_dbMetadata->getList())
264  {
265  QString lname = file->GetFilename();
266  QString lhost = file->GetHost().toLower();
267  if (!lname.isEmpty())
268  {
269  iter = files.find(lname);
270  if (iter != files.end())
271  {
272  if (lhost != iter->second.host)
273  {
274  // file has changed hosts
275  // add to delete list for further processing
276  remove.push_back(std::make_pair(file->GetID(), lname));
277  }
278  else
279  {
280  // file is on disk on the proper host and in the database
281  // we're done with it
282  iter->second.check = true;
283  }
284  }
285  else if (lhost.isEmpty())
286  {
287  // If it's only in the database, and not on a host we
288  // cannot reach, mark it as for removal later.
289  remove.push_back(std::make_pair(file->GetID(), lname));
290  }
291  else if (m_liveSGHosts.contains(lhost))
292  {
293  LOG(VB_GENERAL, LOG_INFO,
294  QString("Removing file SG(%1) :%2:")
295  .arg(lhost).arg(lname));
296  remove.push_back(std::make_pair(file->GetID(), lname));
297  }
298  else
299  {
300  LOG(VB_GENERAL, LOG_WARNING,
301  QString("SG(%1) not available. Not removing file :%2:")
302  .arg(lhost).arg(lname));
303  if (!m_offlineSGHosts.contains(lhost))
304  m_offlineSGHosts.append(lhost);
305  }
306  }
307  if (m_hasGUI)
308  SendProgressEvent(++counter);
309  }
310 }
311 
312 bool VideoScannerThread::updateDB(const FileCheckList &add, const PurgeList &remove)
313 {
314  int ret = 0;
315  uint counter = 0;
316  if (m_hasGUI)
317  SendProgressEvent(counter, (uint)(add.size() + remove.size()),
318  tr("Updating video database"));
319 
320  for (auto p = add.cbegin(); p != add.cend(); ++p)
321  {
322  // add files not already in the DB
323  if (!p->second.check)
324  {
325  int id = -1;
326 
327  // Are we sure this needs adding? Let's check our Hash list.
328  QString hash = VideoMetadata::VideoFileHash(p->first, p->second.host);
329  if (hash != "NULL" && !hash.isEmpty())
330  {
331  id = VideoMetadata::UpdateHashedDBRecord(hash, p->first, p->second.host);
332  if (id != -1)
333  {
334  // Whew, that was close. Let's remove that thing from
335  // our purge list, too.
336  LOG(VB_GENERAL, LOG_ERR,
337  QString("Hash %1 already exists in the "
338  "database, updating record %2 "
339  "with new filename %3")
340  .arg(hash).arg(id).arg(p->first));
341  m_movList.append(id);
342  }
343  }
344  if (id == -1)
345  {
346  VideoMetadata newFile(
347  p->first, QString(), hash,
353  QString(), QString(), QString(), QString(),
354  QString(),
356  QDate::fromString("0000-00-00","YYYY-MM-DD"),
357  VIDEO_INETREF_DEFAULT, 0, QString(),
359  0.0, VIDEO_RATING_DEFAULT, 0, 0,
360  0, 0,
361  MythDate::current().date(),
363 
364  LOG(VB_GENERAL, LOG_INFO, QString("Adding : %1 : %2 : %3")
365  .arg(newFile.GetHost()).arg(newFile.GetFilename())
366  .arg(hash));
367  newFile.SetHost(p->second.host);
368  newFile.SaveToDatabase();
369  m_addList << newFile.GetID();
370  }
371  ret += 1;
372  }
373  if (m_hasGUI)
374  SendProgressEvent(++counter);
375  }
376 
377  // When prompting is restored, account for the answer here.
378  ret += remove.size();
379  for (const auto & item : remove)
380  {
381  if (!m_movList.contains(item.first))
382  {
383  removeOrphans(item.first, item.second);
384  m_delList << item.first;
385  }
386  if (m_hasGUI)
387  SendProgressEvent(++counter);
388  }
389 
390  return ret > 0;
391 }
392 
393 bool VideoScannerThread::buildFileList(const QString &directory,
394  const QStringList &imageExtensions,
395  FileCheckList &filelist) const
396 {
397  // TODO: FileCheckList is a std::map, keyed off the filename. In the event
398  // multiple backends have access to shared storage, the potential exists
399  // for files to be scanned onto the wrong host. Add in some logic to prefer
400  // the backend with the content stored in a storage group determined to be
401  // local.
402 
403  LOG(VB_GENERAL,LOG_INFO, QString("buildFileList directory = %1")
404  .arg(directory));
407 
408  dirhandler<FileCheckList> dh(filelist, imageExtensions);
409  return ScanVideoDirectory(directory, &dh, ext_list, m_listUnknown);
410 }
411 
413  QString messsage)
414 {
415  if (!m_dialog)
416  return;
417 
418  auto *pue = new ProgressUpdateEvent(progress, total, std::move(messsage));
419  QApplication::postEvent(m_dialog, pue);
420 }
421 
423 {
424  m_scanThread = new VideoScannerThread(this);
425 }
426 
428 {
429  if (m_scanThread && m_scanThread->wait())
430  delete m_scanThread;
431 }
432 
433 void VideoScanner::doScan(const QStringList &dirs)
434 {
435  if (m_scanThread->isRunning())
436  return;
437 
438  if (gCoreContext->HasGUI())
439  {
440  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
441 
442  auto *progressDlg = new MythUIProgressDialog("", popupStack,
443  "videoscanprogressdialog");
444 
445  if (progressDlg->Create())
446  {
447  popupStack->AddScreen(progressDlg, false);
448  connect(m_scanThread->qthread(), SIGNAL(finished()),
449  progressDlg, SLOT(Close()));
450  connect(m_scanThread->qthread(), SIGNAL(finished()),
451  SLOT(finishedScan()));
452  }
453  else
454  {
455  delete progressDlg;
456  progressDlg = nullptr;
457  }
458  m_scanThread->SetProgressDialog(progressDlg);
459  }
460 
461  QStringList hosts;
462  if (!RemoteGetActiveBackends(&hosts))
463  {
464  LOG(VB_GENERAL, LOG_WARNING, "Could not retrieve list of "
465  "available backends.");
466  hosts.clear();
467  }
468  m_scanThread->SetHosts(hosts);
469  m_scanThread->SetDirs(dirs);
470  m_scanThread->start();
471 }
472 
474 {
475  doScan(GetVideoDirs());
476 }
477 
479 {
480  QStringList failedHosts = m_scanThread->GetOfflineSGHosts();
481  if (!failedHosts.empty())
482  {
483  QString hosts = failedHosts.join(" ");
484  QString msg = tr("Failed to Scan SG Video Hosts:\n\n%1\n\n"
485  "If they no longer exist please remove them")
486  .arg(hosts);
487 
488  ShowOkPopup(msg);
489  }
490 
492 }
493 
VideoScanner::finished
void finished(bool)
VideoMetadata
Definition: videometadata.h:25
mythevent.h
MythCoreContext::SendMessage
void SendMessage(const QString &message)
Definition: mythcorecontext.cpp:1524
MThread::start
void start(QThread::Priority p=QThread::InheritPriority)
Tell MThread to start running the thread in the near future.
Definition: mthread.cpp:289
MythCoreContext::GetMasterHostName
QString GetMasterHostName(void)
Definition: mythcorecontext.cpp:825
VideoScannerThread::m_listUnknown
bool m_listUnknown
Definition: videoscan.h:101
VideoScanner::VideoScanner
VideoScanner()
Definition: videoscan.cpp:422
VideoScannerThread::SendProgressEvent
void SendProgressEvent(uint progress, uint total=0, QString messsage=QString())
Definition: videoscan.cpp:412
VideoScannerThread::m_keepAll
bool m_keepAll
Definition: videoscan.h:103
FileAssociations::getExtensionIgnoreList
void getExtensionIgnoreList(ext_ignore_list &ext_ignore) const
Definition: dbaccess.cpp:810
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, QObject *parent, const char *slot, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:551
dirscan.h
ParentalLevel::plLowest
@ plLowest
Definition: parentalcontrols.h:12
VideoMetadata::GetHost
const QString & GetHost() const
Definition: videometadata.cpp:1629
VideoMetadataListManager
Definition: videometadatalistmanager.h:11
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:402
VideoScanner::doScan
void doScan(const QStringList &dirs)
Definition: videoscan.cpp:433
mythscreenstack.h
progress
bool progress
Definition: mythtv/programs/mythcommflag/main.cpp:74
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:17
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
arg
arg(title).arg(filename).arg(doDelete))
VideoScanChanges::kEventType
static Type kEventType
Definition: videoscan.h:57
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MThread::RunProlog
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
Definition: mthread.cpp:199
VideoMetadataListManager::getList
const metadata_list & getList() const
Definition: videometadatalistmanager.cpp:165
VideoMetadataListManager::setList
void setList(metadata_list &list)
Definition: videometadatalistmanager.cpp:159
build_compdb.file
file
Definition: build_compdb.py:55
VideoScannerThread::GetOfflineSGHosts
QStringList GetOfflineSGHosts(void)
Definition: videoscan.h:72
remoteutil.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &stackname)
Definition: mythmainwindow.cpp:309
VideoScannerThread::PurgeList
std::vector< std::pair< unsigned int, QString > > PurgeList
Definition: videoscan.h:85
VideoScannerThread::m_movList
QList< int > m_movList
Definition: videoscan.h:113
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
mythprogressdialog.h
VideoScannerThread::buildFileList
bool buildFileList(const QString &directory, const QStringList &imageExtensions, FileCheckList &filelist) const
Definition: videoscan.cpp:393
VideoMetadataListManager::loadAllFromDatabase
static void loadAllFromDatabase(metadata_list &items, const QString &sql="")
Load videometadata database into memory.
Definition: videometadatalistmanager.cpp:128
MythUIProgressDialog::MythUIProgressDialog
MythUIProgressDialog(QString message, MythScreenStack *parent, const char *name)
Definition: mythprogressdialog.h:63
dbaccess.h
VideoScanner::m_scanThread
class VideoScannerThread * m_scanThread
Definition: videoscan.h:40
videoscan.h
VideoScannerThread
Definition: videoscan.h:61
ProgressUpdateEvent
Definition: mythprogressdialog.h:17
mythdate.h
VideoMetadata::GetFilename
const QString & GetFilename() const
Definition: videometadata.cpp:1609
mythlogging.h
MythCoreContext::GenMythURL
static QString GenMythURL(const QString &host=QString(), int port=0, QString path=QString(), const QString &storageGroup=QString())
Definition: mythcorecontext.cpp:778
VideoScannerThread::m_dialog
MythUIProgressDialog * m_dialog
Definition: videoscan.h:110
GetVideoDirs
QStringList GetVideoDirs()
Definition: videoutils.cpp:125
MythCoreContext::SendEvent
void SendEvent(const MythEvent &event)
Definition: mythcorecontext.cpp:1537
hardwareprofile.config.p
p
Definition: config.py:33
MythUIProgressDialog
Definition: mythprogressdialog.h:60
globals.h
FileAssociations::ext_ignore_list
std::vector< std::pair< QString, bool > > ext_ignore_list
Definition: dbaccess.h:155
VideoScannerThread::m_addList
QList< int > m_addList
Definition: videoscan.h:112
VideoMetadata::UpdateHashedDBRecord
static int UpdateHashedDBRecord(const QString &hash, const QString &file_name, const QString &host)
Definition: videometadata.cpp:1005
VideoScannerThread::SetDirs
void SetDirs(QStringList dirs)
Definition: videoscan.cpp:105
VideoMetadata::SaveToDatabase
void SaveToDatabase()
Definition: videometadata.cpp:1744
VIDEO_COVERFILE_DEFAULT
const QString VIDEO_COVERFILE_DEFAULT
Definition: globals.cpp:25
VIDEO_PLOT_DEFAULT
const QString VIDEO_PLOT_DEFAULT
Definition: globals.cpp:32
VideoScannerThread::m_liveSGHosts
QStringList m_liveSGHosts
Definition: videoscan.h:106
MThread::qthread
QThread * qthread(void)
Returns the thread, this will always return the same pointer no matter how often you restart the thre...
Definition: mthread.cpp:239
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:640
MThread::RunEpilog
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
Definition: mthread.cpp:212
VIDEO_TRAILER_DEFAULT
const QString VIDEO_TRAILER_DEFAULT
Definition: globals.cpp:26
uint
unsigned int uint
Definition: compat.h:140
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:57
VideoScannerThread::m_dbMetadata
VideoMetadataListManager * m_dbMetadata
Definition: videoscan.h:109
VideoScannerThread::m_removeAll
bool m_removeAll
Definition: videoscan.h:102
VIDEO_INETREF_DEFAULT
const QString VIDEO_INETREF_DEFAULT
Definition: globals.cpp:24
VIDEO_FANART_DEFAULT
const QString VIDEO_FANART_DEFAULT
Definition: globals.cpp:29
videometadatalistmanager.h
VideoScannerThread::m_delList
QList< int > m_delList
Definition: videoscan.h:114
MythDate::fromString
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
Definition: mythdate.cpp:30
MythCoreContext::GetBoolSetting
bool GetBoolSetting(const QString &key, bool defaultval=false)
Definition: mythcorecontext.cpp:924
FileAssociations::getFileAssociation
static FileAssociations & getFileAssociation()
Definition: dbaccess.cpp:830
VideoMetadataListManager::purgeByID
bool purgeByID(unsigned int db_id)
Definition: videometadatalistmanager.cpp:187
VIDEO_YEAR_DEFAULT
@ VIDEO_YEAR_DEFAULT
Definition: videometadata.h:18
VideoScannerThread::m_dbDataChanged
bool m_dbDataChanged
Definition: videoscan.h:115
VideoScannerThread::SetProgressDialog
void SetProgressDialog(MythUIProgressDialog *dialog)
Definition: videoscan.h:71
ScanVideoDirectory
bool ScanVideoDirectory(const QString &start_path, DirectoryHandler *handler, const FileAssociations::ext_ignore_list &ext_disposition, bool list_unknown_extensions)
Definition: dirscan.cpp:226
dir
QDir dir
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1177
VideoMetadata::SetHost
void SetHost(const QString &host)
Definition: videometadata.cpp:1634
VideoScannerThread::run
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Definition: videoscan.cpp:165
VideoScannerThread::~VideoScannerThread
~VideoScannerThread() override
Definition: videoscan.cpp:93
VIDEO_RATING_DEFAULT
const QString VIDEO_RATING_DEFAULT
Definition: globals.cpp:30
VideoScannerThread::m_parent
QObject * m_parent
Definition: videoscan.h:99
mythcontext.h
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
VideoScannerThread::VideoScannerThread
VideoScannerThread(QObject *parent)
Definition: videoscan.cpp:84
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:107
MThread::isRunning
bool isRunning(void) const
Definition: mthread.cpp:269
VideoMetadata::GetID
unsigned int GetID() const
Definition: videometadata.cpp:1529
VideoScannerThread::verifyFiles
void verifyFiles(FileCheckList &files, PurgeList &remove)
Definition: videoscan.cpp:252
VideoScanChanges
Definition: videoscan.h:45
VideoScannerThread::removeOrphans
void removeOrphans(unsigned int id, const QString &filename)
Definition: videoscan.cpp:236
VideoMetadataListManager::metadata_list
std::list< VideoMetadataPtr > metadata_list
Definition: videometadatalistmanager.h:14
VideoScanner::~VideoScanner
~VideoScanner() override
Definition: videoscan.cpp:427
VideoScannerThread::updateDB
bool updateDB(const FileCheckList &add, const PurgeList &remove)
Definition: videoscan.cpp:312
VideoScannerThread::m_offlineSGHosts
QStringList m_offlineSGHosts
Definition: videoscan.h:107
VideoScannerThread::FileCheckList
std::map< QString, CheckStruct > FileCheckList
Definition: videoscan.h:86
VideoScannerThread::m_hasGUI
bool m_hasGUI
Definition: videoscan.h:104
MythCoreContext::HasGUI
bool HasGUI(void) const
Definition: mythcorecontext.cpp:1750
DirectoryHandler::newDir
virtual DirectoryHandler * newDir(const QString &dir_name, const QString &fq_dir_name)=0
VIDEO_BANNER_DEFAULT
const QString VIDEO_BANNER_DEFAULT
Definition: globals.cpp:28
VideoScannerThread::SetHosts
void SetHosts(const QStringList &hosts)
Definition: videoscan.cpp:98
MThread::wait
bool wait(unsigned long time=ULONG_MAX)
Wait for the MThread to exit, with a maximum timeout.
Definition: mthread.cpp:306
dirhandler::dirhandler
dirhandler(smart_dir_node &directory, const QString &prefix, VideoMetadataListManager::metadata_list &metalist, free_list &dh_free_list, bool infer_title)
Definition: videolist.cpp:1148
VideoMetadata::VideoFileHash
static QString VideoFileHash(const QString &file_name, const QString &host)
Definition: videometadata.cpp:1053
DirectoryHandler
Definition: dirscan.h:7
mythmainwindow.h
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:49
VideoScannerThread::m_directories
QStringList m_directories
Definition: videoscan.h:105
VideoScannerThread::getDataChanged
bool getDataChanged() const
Definition: videoscan.h:73
VideoScanner::finishedScan
void finishedScan()
Definition: videoscan.cpp:478
videoutils.h
RemoteGetActiveBackends
bool RemoteGetActiveBackends(QStringList *list)
return list of backends currently connected to the master
Definition: remoteutil.cpp:564
VIDEO_DIRECTOR_DEFAULT
const QString VIDEO_DIRECTOR_DEFAULT
Definition: globals.cpp:23
DirectoryHandler::handleFile
virtual void handleFile(const QString &file_name, const QString &fq_file_name, const QString &extension, const QString &host)=0
VIDEO_SCREENSHOT_DEFAULT
const QString VIDEO_SCREENSHOT_DEFAULT
Definition: globals.cpp:27
VideoScanner::doScanAll
void doScanAll(void)
Definition: videoscan.cpp:473