mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
- NowPlaying.dll/iTunesPlugin.dll: Fixed incompatibility with iTunes controllers
- NowPlaying.dll: Removed support for caching cover art
This commit is contained in:
@ -30,7 +30,6 @@
|
||||
#include "PlayerWMP.h"
|
||||
|
||||
static std::map<UINT, ChildMeasure*> g_Measures;
|
||||
std::wstring g_CachePath;
|
||||
std::wstring g_SettingsFile;
|
||||
HINSTANCE g_Instance = NULL;
|
||||
|
||||
@ -42,15 +41,8 @@ HINSTANCE g_Instance = NULL;
|
||||
*/
|
||||
UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
|
||||
{
|
||||
if (g_Measures.empty())
|
||||
if (!g_Instance)
|
||||
{
|
||||
// Get path to temporary folder (for cover art cache)
|
||||
WCHAR buffer[MAX_PATH];
|
||||
GetTempPath(MAX_PATH, buffer);
|
||||
wcscat(buffer, L"Rainmeter-Cache\\");
|
||||
CreateDirectory(buffer, NULL);
|
||||
g_CachePath = buffer;
|
||||
|
||||
// Get path to Plugins.ini (usually %APPDATA%\Rainmeter\Plugins.ini)
|
||||
std::wstring str = PluginBridge(L"getconfig", iniFile);
|
||||
if (!str.empty())
|
||||
@ -59,10 +51,6 @@ UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
|
||||
g_SettingsFile = PluginBridge(L"getvariable", str.c_str());
|
||||
g_SettingsFile += L"Plugins.ini";
|
||||
}
|
||||
else
|
||||
{
|
||||
LSLog(LOG_ERROR, NULL, L"NowPlaying.dll: PluginBridge error");
|
||||
}
|
||||
|
||||
g_Instance = instance;
|
||||
CInternet::Initialize();
|
||||
@ -168,7 +156,6 @@ UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
|
||||
}
|
||||
|
||||
parent->id = id;
|
||||
parent->childCount = 1;
|
||||
parent->player->AddInstance();
|
||||
parent->playerPath = ReadConfigString(section, L"PlayerPath", L"");
|
||||
parent->trackChangeAction = ReadConfigString(section, L"TrackChangeAction", L"");
|
||||
@ -300,6 +287,7 @@ void Finalize(HMODULE instance, UINT id)
|
||||
|
||||
if (g_Measures.empty())
|
||||
{
|
||||
g_Instance = NULL;
|
||||
CInternet::Finalize();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user