aboutsummaryrefslogtreecommitdiff
path: root/src/ui/playlistitem.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-10-10 08:42:15 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-10-10 08:42:15 +0000
commit45117f6d2f2ccfb47af840d4416f43607d83d518 (patch)
treeee3e2b99914fa6907ce7e1173e1fc87575fe8a37 /src/ui/playlistitem.cpp
parent0bb73fcbfda56e4cb064a7bc1ceda89312087f3d (diff)
downloadqmmp-45117f6d2f2ccfb47af840d4416f43607d83d518.tar.gz
qmmp-45117f6d2f2ccfb47af840d4416f43607d83d518.tar.bz2
qmmp-45117f6d2f2ccfb47af840d4416f43607d83d518.zip
cue sheet support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@575 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui/playlistitem.cpp')
-rw-r--r--src/ui/playlistitem.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/ui/playlistitem.cpp b/src/ui/playlistitem.cpp
index b5321c8ca..738f8fdae 100644
--- a/src/ui/playlistitem.cpp
+++ b/src/ui/playlistitem.cpp
@@ -29,13 +29,14 @@ PlayListItem::PlayListItem() : SongInfo(), m_flag(FREE)
m_info = 0;
}
-PlayListItem::PlayListItem(const QString& path) : SongInfo(), m_flag(FREE)
+//PlayListItem::PlayListItem(const QString& path) : SongInfo(), m_flag(FREE)
+PlayListItem::PlayListItem(FileInfo *info) : SongInfo(), m_flag(FREE)
{
m_selected = FALSE;
m_current = FALSE;
- m_info = 0;
- setValue(SongInfo::PATH, path);
- setValue(SongInfo::STREAM, path.startsWith("http://")); //TODO do this inside SongInfo
+ m_info = info;
+ setValue(SongInfo::PATH, info->path()); //TODO path?
+ setValue(SongInfo::STREAM, path().startsWith("http://")); //TODO do this inside SongInfo
QSettings settings ( QDir::homePath() +"/.qmmp/qmmprc", QSettings::IniFormat );
m_use_meta = settings.value ("PlayList/load_metadata", TRUE).toBool();
//format
@@ -45,15 +46,15 @@ PlayListItem::PlayListItem(const QString& path) : SongInfo(), m_flag(FREE)
m_convertTwenty = settings.value ("PlayList/convert_twenty", TRUE).toBool();
m_fullStreamPath = settings.value ("PlayList/full_stream_path", FALSE).toBool();
- if (m_use_meta && !path.startsWith("http://"))
+ if (m_use_meta && !path().startsWith("http://"))
{
- m_info = Decoder::createFileInfo(path);
+ //m_info = Decoder::createFileInfo(path);
readMetadata();
}
- else if (path.startsWith("http://") && m_fullStreamPath)
- m_title = path;
+ else if (path().startsWith("http://") && m_fullStreamPath)
+ m_title = path();
else
- m_title = path.split('/',QString::SkipEmptyParts).takeLast ();
+ m_title = path().split('/',QString::SkipEmptyParts).takeLast ();
}
PlayListItem::~PlayListItem()
@@ -111,7 +112,8 @@ void PlayListItem::updateTags()
delete m_info;
m_info = 0;
}
- m_info = Decoder::createFileInfo(path());
+ //m_info = Decoder::createFileInfo(path());
+ m_info = Decoder::createPlayList(path()).at(0);
readMetadata();
}