32
32
using namespace MUSIC_INFO;
33
33
using namespace XFILE;
34
34
using namespace PLAYLIST;
36
CPlayListItem::CPlayListItem() : m_lDuration(0)
40
m_bUnPlayable = false;
44
CPlayListItem::CPlayListItem(const CStdString& strDescription, const CStdString& strFileName, long lDuration, long lStartOffset, long lEndOffset)
46
m_strLabel = strDescription;
47
m_strPath = strFileName;
48
m_lDuration = lDuration;
49
m_lStartOffset = lStartOffset;
50
m_lEndOffset = lEndOffset;
51
m_bUnPlayable = false;
55
CPlayListItem::~CPlayListItem()
58
void CPlayListItem::SetFileName(const CStdString& strFileName)
60
m_strPath = strFileName;
63
const CStdString& CPlayListItem::GetFileName() const
68
void CPlayListItem::SetDescription(const CStdString& strDescription)
70
m_strLabel = strDescription;
73
const CStdString& CPlayListItem::GetDescription() const
78
void CPlayListItem::SetDuration(long lDuration)
80
m_lDuration = lDuration;
83
long CPlayListItem::GetDuration() const
88
void CPlayListItem::SetStartOffset(long lStartOffset)
90
m_lStartOffset = lStartOffset;
93
long CPlayListItem::GetStartOffset() const
95
return m_lStartOffset;
98
void CPlayListItem::SetEndOffset(long lEndOffset)
100
m_lEndOffset = lEndOffset;
103
long CPlayListItem::GetEndOffset() const
108
void CPlayListItem::SetMusicTag(const CMusicInfoTag &tag)
110
*GetMusicInfoTag() = tag;
113
void CPlayListItem::SetVideoTag(const CVideoInfoTag &tag)
115
*GetVideoInfoTag() = tag;
118
bool CPlayListItem::LoadMusicTag()
120
if (CFileItem::LoadMusicTag())
122
SetDuration(GetMusicInfoTag()->GetDuration());
128
const CMusicInfoTag* CPlayListItem::GetMusicTag() const
130
return GetMusicInfoTag();
133
const CVideoInfoTag* CPlayListItem::GetVideoTag() const
135
return GetVideoInfoTag();
138
36
CPlayList::CPlayList(void)
159
57
item->m_iprogramCount = iOrder;
59
// videodb files are not supported by the filesystem as yet
60
if (item->IsVideoDb())
61
item->m_strPath = item->GetVideoInfoTag()->m_strFileNameAndPath;
161
63
// increment the playable counter
162
64
item->ClearProperty("unplayable");
163
65
if (m_iPlayableItems < 0)