mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
NowPlaying.dll:
- Fixed that invalid PlayerName= caused crash - Fixed that PlayerType=COVER didn't work with iTunes
This commit is contained in:
parent
4a7ef7508f
commit
e5f5ea41cb
@ -171,23 +171,24 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
|
||||
{
|
||||
parent->player = CPlayerWinamp::Create(WA_WINAMP);
|
||||
}
|
||||
else if (_wcsicmp(L"WLM", str) == 0)
|
||||
{
|
||||
parent->player = CPlayerWLM::Create();
|
||||
}
|
||||
else if (_wcsicmp(L"WMP", str) == 0)
|
||||
{
|
||||
parent->player = CPlayerWMP::Create();
|
||||
}
|
||||
else
|
||||
{
|
||||
std::wstring error = L"NowPlaying.dll: Invalid PlayerName=";
|
||||
error += str;
|
||||
error += L" in [";
|
||||
error += parent->ownerName;
|
||||
error += L"]";
|
||||
RmLog(LOG_ERROR, error.c_str());
|
||||
return;
|
||||
// Default to WLM
|
||||
parent->player = CPlayerWLM::Create();
|
||||
|
||||
if (_wcsicmp(L"WLM", str) != 0)
|
||||
{
|
||||
std::wstring error = L"NowPlaying.dll: Invalid PlayerName=";
|
||||
error += str;
|
||||
error += L" in [";
|
||||
error += parent->ownerName;
|
||||
error += L"]";
|
||||
RmLog(LOG_ERROR, error.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
parent->player->AddInstance();
|
||||
@ -346,7 +347,7 @@ PLUGIN_EXPORT LPCWSTR GetString(void* data)
|
||||
{
|
||||
Measure* measure = (Measure*)data;
|
||||
ParentMeasure* parent = measure->parent;
|
||||
if (!parent) return L"Invalid player";
|
||||
if (!parent) return NULL;
|
||||
|
||||
const CPlayer* player = parent->player;
|
||||
static WCHAR buffer[32];
|
||||
|
@ -423,8 +423,8 @@ void CPlayerITunes::OnTrackChange()
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
tmpStr = (BSTR)m_TempCoverPath.c_str();
|
||||
hr = artwork->SaveArtworkToFile(tmpStr);
|
||||
CComBSTR coverPath = m_TempCoverPath.c_str();
|
||||
hr = artwork->SaveArtworkToFile(coverPath);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
m_CoverPath = m_TempCoverPath;
|
||||
|
Loading…
Reference in New Issue
Block a user