mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
NowPlayingPlugin: Improved handling of cached album art and fixed that some tracks don't display metadata with Winamp.
This commit is contained in:
@ -371,15 +371,9 @@ void CPlayerITunes::OnTrackChange()
|
||||
|
||||
if (m_HasCoverMeasure)
|
||||
{
|
||||
// Check if MP3 file contains embedded art
|
||||
std::wstring cover = CreateCoverArtPath();
|
||||
if (_waccess(cover.c_str(), 0) == 0)
|
||||
{
|
||||
// Cover is in cache, lets use the that
|
||||
m_CoverPath = cover;
|
||||
}
|
||||
else
|
||||
if (!GetCachedArt())
|
||||
{
|
||||
// Art not in cache, check for embedded art
|
||||
IITArtworkCollection* artworkCollection;
|
||||
hr = track->get_Artwork(&artworkCollection);
|
||||
|
||||
@ -395,9 +389,12 @@ void CPlayerITunes::OnTrackChange()
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
tmpStr = cover.c_str();
|
||||
tmpStr = m_CoverPath.c_str();
|
||||
hr = artwork->SaveArtworkToFile(tmpStr);
|
||||
SUCCEEDED(hr) ? m_CoverPath = cover : m_CoverPath.clear();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
m_CoverPath.clear();
|
||||
}
|
||||
|
||||
artwork->Release();
|
||||
}
|
||||
@ -409,6 +406,10 @@ void CPlayerITunes::OnTrackChange()
|
||||
|
||||
artworkCollection->Release();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_CoverPath.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user