summaryrefslogtreecommitdiff
path: root/orkbasecxx
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2007-09-07 11:24:23 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2007-09-07 11:24:23 +0000
commit8284fc8d74cb49aa2bd97b3063ed6e503486e940 (patch)
treec68541e1d69c0e64e3158a1b09b967ce6ee632e9 /orkbasecxx
parent24cdce6e897870af929349ab7199d987713ee95c (diff)
Minor fix to allow m_tags map lookup for TapePathNaming the same way its done in TapeFileNaming
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@484 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx')
-rw-r--r--orkbasecxx/AudioTape.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp
index baebd36..a0d8617 100644
--- a/orkbasecxx/AudioTape.cpp
+++ b/orkbasecxx/AudioTape.cpp
@@ -528,9 +528,25 @@ void AudioTape::GenerateFinalFilePath()
}
case TapeAttributes::TaUnknown:
{
- pathIdentifier += element;
- break;
- }
+ std::map<CStdString, CStdString>::iterator pair;
+ CStdString correctKey, mTagsValue;
+
+ // Remove the []
+ correctKey = element.substr(1, element.size()-2);
+ pair = m_tags.find(correctKey);
+
+ if(pair != m_tags.end())
+ {
+ mTagsValue = pair->second;
+ pathIdentifier += mTagsValue;
+ }
+ else
+ {
+ pathIdentifier += element;
+ }
+
+ break;
+ }
}
}
@@ -711,10 +727,13 @@ void AudioTape::GenerateFinalFilePathAndIdentifier()
correctKey = element.substr(1, element.size()-2);
pair = m_tags.find(correctKey);
- if(pair != m_tags.end()) {
+ if(pair != m_tags.end())
+ {
mTagsValue = pair->second;
fileIdentifier += mTagsValue;
- } else {
+ }
+ else
+ {
fileIdentifier += element;
}