Skip to content
This repository
Browse code

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

… #13605
  • Loading branch information...
commit 5ca0942b257aca62378bedf94733758547a7e659 1 parent 2eb6637
authored December 02, 2012

Showing 1 changed file with 11 additions and 1 deletion. Show diff stats Hide diff stats

  1. 12  xbmc/video/VideoInfoScanner.cpp
12  xbmc/video/VideoInfoScanner.cpp
@@ -115,7 +115,17 @@ namespace VIDEO
115 115
          * occurs.
116 116
          */
117 117
         CStdString directory = *m_pathsToScan.begin();
118  
-        if (!DoScan(directory))
  118
+        if (!CDirectory::Exists(directory))
  119
+        {
  120
+          /*
  121
+           * Note that this will skip clean (if m_bClean is enabled) if the directory really
  122
+           * doesn't exist rather than a NAS being switched off.  A manual clean from settings
  123
+           * will still pick up and remove it though.
  124
+           */
  125
+          CLog::Log(LOGWARNING, "%s directory '%s' does not exist - skipping scan%s.", __FUNCTION__, directory.c_str(), m_bClean ? " and clean" : "");
  126
+          m_pathsToScan.erase(m_pathsToScan.begin());
  127
+        }
  128
+        else if (!DoScan(directory))
119 129
           bCancelled = true;
120 130
       }
121 131
 

5 notes on commit 5ca0942

Rainer Hochecker
Collaborator

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?

Tarek

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

arnova
Collaborator

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

Tarek

@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 http://trac.xbmc.org/ticket/13784 and discussed earlier in http://forum.xbmc.org/showthread.php?tid=148555 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 ?

Martijn Kaijser

@blackcoder
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.