mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 03:35:46 -04:00
Initial community commit
This commit is contained in:
45
Src/Plugins/Input/in_wmvdrm/WMPlaylist.cpp
Normal file
45
Src/Plugins/Input/in_wmvdrm/WMPlaylist.cpp
Normal file
@ -0,0 +1,45 @@
|
||||
#include "main.h"
|
||||
#include "WMPlaylist.h"
|
||||
|
||||
WMPlaylist activePlaylist;
|
||||
|
||||
void WMPlaylist::OnFile( const wchar_t *filename, const wchar_t *title, int lengthInMS, ifc_plentryinfo *info )
|
||||
{
|
||||
//if (playstring.empty())
|
||||
if ( playstring )
|
||||
free( playstring );
|
||||
|
||||
playstring = _wcsdup( filename );
|
||||
}
|
||||
|
||||
const wchar_t *WMPlaylist::GetFileName()
|
||||
{
|
||||
return ( playstring ? playstring : L"" );
|
||||
}
|
||||
|
||||
const wchar_t *WMPlaylist::GetOriginalFileName()
|
||||
{
|
||||
return ( playlistFilename ? playlistFilename : L"" );
|
||||
}
|
||||
|
||||
bool WMPlaylist::IsMe( const char *filename )
|
||||
{
|
||||
return IsMe( (const wchar_t *)AutoWide( filename ) );
|
||||
}
|
||||
|
||||
bool WMPlaylist::IsMe( const wchar_t *filename )
|
||||
{
|
||||
if ( playlistFilename && !_wcsicmp( playlistFilename, filename ) )
|
||||
return true;
|
||||
|
||||
if ( playstring && !_wcsicmp( playstring, filename ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#define CBCLASS WMPlaylist
|
||||
START_DISPATCH;
|
||||
VCB( IFC_PLAYLISTLOADERCALLBACK_ONFILE, OnFile )
|
||||
END_DISPATCH;
|
||||
#undef CBCLASS
|
Reference in New Issue
Block a user