(self, filename, highPriority=False)
| 2307 | self._client.fileSwitchFoundFiles() |
| 2308 | |
| 2309 | def findFilepath(self, filename, highPriority=False): |
| 2310 | if filename is None: |
| 2311 | return |
| 2312 | |
| 2313 | if self._client.userlist.currentUser.file and utils.sameFilename(filename, self._client.userlist.currentUser.file['name']): |
| 2314 | return self._client.userlist.currentUser.file['path'] |
| 2315 | |
| 2316 | if self.mediaFilesCache is not None: |
| 2317 | for directory in self.mediaFilesCache: |
| 2318 | files = self.mediaFilesCache[directory] |
| 2319 | if len(files) > 0 and filename in files: |
| 2320 | filepath = os.path.join(directory, filename) |
| 2321 | if os.path.isfile(filepath): |
| 2322 | return filepath |
| 2323 | |
| 2324 | if self.folderSearchEnabled and self.mediaDirectories is not None: |
| 2325 | directoryList = self.mediaDirectories |
| 2326 | for directory in directoryList: |
| 2327 | filepath = os.path.join(directory, filename) |
| 2328 | if os.path.isfile(filepath): |
| 2329 | return filepath |
| 2330 | |
| 2331 | def areWatchedFilenamesInCache(self): |
| 2332 | if self.filenameWatchlist is not None: |
no outgoing calls
no test coverage detected