diff options
author | geronimo <geronimo013@gmx.de> | 2012-07-25 07:40:19 +0200 |
---|---|---|
committer | geronimo <geronimo013@gmx.de> | 2012-07-25 07:40:19 +0200 |
commit | 2d0b837e6c885383ae807ca793cbe91aa32de995 (patch) | |
tree | 739e6f89a09ad9566c3d6de2f69495ddc5f75a44 /libs/fsScan/src | |
parent | 774e09eef2d7761814e6f19fb462eb0fdc74f2d7 (diff) | |
download | cmp-2d0b837e6c885383ae807ca793cbe91aa32de995.tar.gz cmp-2d0b837e6c885383ae807ca793cbe91aa32de995.tar.bz2 |
need both, encoded and decoded urls at backend
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; } |