summaryrefslogtreecommitdiff
path: root/orkbasecxx
diff options
context:
space:
mode:
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;
}