aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/songinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmmpui/songinfo.cpp')
-rw-r--r--src/qmmpui/songinfo.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/qmmpui/songinfo.cpp b/src/qmmpui/songinfo.cpp
index 6fa1e831e..178f6eee6 100644
--- a/src/qmmpui/songinfo.cpp
+++ b/src/qmmpui/songinfo.cpp
@@ -41,6 +41,7 @@ void SongInfo::operator=(const SongInfo &info)
setValue(TRACK,info.track ());
setValue(LENGTH,info.length ());
setValue(STREAM,info.isStream());
+ setValue(PATH,info.path());
}
bool SongInfo::operator==(const SongInfo &info)
@@ -52,7 +53,8 @@ bool SongInfo::operator==(const SongInfo &info)
genre() == info.genre() &&
track() == info.track() &&
year() == info.year() &&
- isStream() == info.isStream();
+ isStream() == info.isStream() &&
+ path() == info.path();
}
bool SongInfo::operator!=(const SongInfo &info)
@@ -60,21 +62,26 @@ bool SongInfo::operator!=(const SongInfo &info)
return !operator==(info);
}
-void SongInfo::setValue(uint name, const QString &value)
+void SongInfo::setValue(uint key, const QString &value)
{
if (!value.isEmpty())
- m_strValues.insert (name, value);
+ {
+ if (key == PATH)
+ m_path = value;
+ else
+ m_strValues.insert (key, value);
+ }
}
-void SongInfo::setValue(uint name, const uint &value)
+void SongInfo::setValue(uint key, const uint &value)
{
if (value > 0)
- m_numValues.insert (name, value);
+ m_numValues.insert (key, value);
}
-void SongInfo::setValue(uint name, const bool &value)
+void SongInfo::setValue(uint key, const bool &value)
{
- if(name == STREAM)
+ if(key == STREAM)
m_stream = value;
}
@@ -103,6 +110,11 @@ const QString SongInfo::genre () const
return m_strValues[GENRE];
}
+const QString SongInfo::path () const
+{
+ return m_path;
+}
+
const uint SongInfo::year () const
{
return m_numValues[YEAR];