diff options
Diffstat (limited to 'libs/fsScan/src')
-rw-r--r-- | libs/fsScan/src/AbstractMedia.cc | 12 | ||||
-rw-r--r-- | libs/fsScan/src/FilesystemScanner.cc | 4 |
2 files changed, 6 insertions, 10 deletions
diff --git a/libs/fsScan/src/AbstractMedia.cc b/libs/fsScan/src/AbstractMedia.cc index 54a60d6..1a7c1da 100644 --- a/libs/fsScan/src/AbstractMedia.cc +++ b/libs/fsScan/src/AbstractMedia.cc @@ -40,17 +40,18 @@ cAbstractMedia::cAbstractMedia(const cFile &File, const char *Mime, SupportedMed , mediaType(Type) , mimeType(Mime ? strdup(Mime) : NULL) , uri(NULL) + , logicalPath(NULL) , keyPath(File) { - char *tmp = keyPath.toURI(); - uri = cUrl::Decoder()->Decode(tmp); - free(tmp); + uri = keyPath.toURI(); + logicalPath = cUrl::Decoder()->Decode(uri); } cAbstractMedia::~cAbstractMedia() { free(mimeType); free(uri); + free(logicalPath); } const char *cAbstractMedia::Name(void) const @@ -113,11 +114,6 @@ ulong cAbstractMedia::LastModified(void) const return keyPath.LastModified(); } -const char *cAbstractMedia::URI(void) const -{ - return uri; -} - void cAbstractMedia::SetMimeType(const char *MimeType) { if (mimeType == MimeType) return; diff --git a/libs/fsScan/src/FilesystemScanner.cc b/libs/fsScan/src/FilesystemScanner.cc index 23b5074..cbe4b95 100644 --- a/libs/fsScan/src/FilesystemScanner.cc +++ b/libs/fsScan/src/FilesystemScanner.cc @@ -96,13 +96,13 @@ void cFilesystemScanner::Refresh() } } -cAbstractMedia *cFilesystemScanner::FindMedia(const char* URI) +cAbstractMedia *cFilesystemScanner::FindMedia(const char *Path) { cAbstractMedia *rv = NULL, *tmp; for (size_t i=0; i < pool.size(); ++i) { tmp = (cAbstractMedia *) pool[i]; - if (!strcmp(tmp->URI(), URI)) { + if (!strcmp(tmp->LogicalPath(), Path)) { rv = tmp; break; } |