Skip to content
Browse files

check directory existence in the video scanner before scanning. fixes…

… #13605
  • Loading branch information...
1 parent 2eb6637 commit 5ca0942b257aca62378bedf94733758547a7e659 Jonathan Marshall committed
Showing with 11 additions and 1 deletion.
  1. +11 −1 xbmc/video/VideoInfoScanner.cpp
12 xbmc/video/VideoInfoScanner.cpp
@@ -115,7 +115,17 @@ namespace VIDEO
* occurs.
CStdString directory = *m_pathsToScan.begin();
- if (!DoScan(directory))
+ if (!CDirectory::Exists(directory))
+ {
+ /*
+ * Note that this will skip clean (if m_bClean is enabled) if the directory really
+ * doesn't exist rather than a NAS being switched off. A manual clean from settings
+ * will still pick up and remove it though.
+ */
+ CLog::Log(LOGWARNING, "%s directory '%s' does not exist - skipping scan%s.", __FUNCTION__, directory.c_str(), m_bClean ? " and clean" : "");
+ m_pathsToScan.erase(m_pathsToScan.begin());
+ }
+ else if (!DoScan(directory))
bCancelled = true;

5 comments on commit 5ca0942


Scraping of VNSI recordings got broken with this. They start with pvr://recordings/
There seems to be more broken in parsing the pvr filename for the title.
@opdenkamp or has something changed in the pvr API I am not aware of?


Scrapping from sftp sources is also broken, it skips it all the time. Have this issue been rectified ?


@blackcoder: That's because SFTPDirectory lacks an ::Exists() implementation. I'd suggest creating a Trac ticket for it.


@arnova : creating a ticket can't be any more complex, I can't submit a ticket without signing in and there is no obvious way to register in the trac site ! Am I missing something ?

Before giving up, I did a bit of digging and I found that there is already a ticket related to this issue and discussed earlier in but it doesn't seem that it has been fixed yet.

The Exists() method should be easy to implement, maybe I can attempt to fix it myself and submit a patch ? Whats the contribution process for xbmc ?


Creating a ticket can't be more easy, use your forum account to login as stated on the front page "Please login with your forum username and password."

Code contribution is "quite" simple, made a fork of xbmc code and commit changes to your own repo and send a PR. Getting the hang of using git requires some practise though. There some good tutorials out there

Please sign in to comment.
Something went wrong with that request. Please try again.