mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
6aa004eb22
- Fixed that PlayerName=, TrackChangeAction=, and DisableLeadingZero= were global (i.e. only usable from the first loaded skin) - Code refactoring and cleanup
58 lines
2.2 KiB
C++
58 lines
2.2 KiB
C++
/*
|
|
Copyright (C) 2011 Birunthan Mohanathas (www.poiru.net)
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __COVER_H__
|
|
#define __COVER_H__
|
|
|
|
#include "apefile.h"
|
|
#include "apetag.h"
|
|
#include "asffile.h"
|
|
#include "attachedpictureframe.h"
|
|
#include "commentsframe.h"
|
|
#include "flacfile.h"
|
|
#include "id3v1genres.h"
|
|
#include "id3v2tag.h"
|
|
#include "mpcfile.h"
|
|
#include "mp4file.h"
|
|
#include "mpegfile.h"
|
|
#include "tag.h"
|
|
#include "taglib.h"
|
|
#include "textidentificationframe.h"
|
|
#include "tstring.h"
|
|
#include "vorbisfile.h"
|
|
#include "wavpackfile.h"
|
|
|
|
class CCover
|
|
{
|
|
public:
|
|
static void GetCover(const std::wstring& artist, const std::wstring& title, const std::wstring& file, std::wstring& target);
|
|
static bool GetCachedCover(const std::wstring& artist, const std::wstring& title, std::wstring& target);
|
|
static bool GetLocalCover(std::wstring filename, const std::wstring& folder, std::wstring& target);
|
|
static bool GetEmbeddedCover(const TagLib::FileRef& fr, std::wstring& target);
|
|
static std::wstring GetFileFolder(const std::wstring& file);
|
|
|
|
private:
|
|
static bool ExtractAPE(TagLib::APE::Tag* tag, const std::wstring& target);
|
|
static bool ExtractID3(TagLib::ID3v2::Tag* tag, const std::wstring& target);
|
|
static bool ExtractASF(TagLib::ASF::File* file, const std::wstring& target);
|
|
static bool ExtractFLAC(TagLib::FLAC::File* file, const std::wstring& target);
|
|
static bool ExtractMP4(TagLib::MP4::File* file, const std::wstring& target);
|
|
static bool WriteCover(const TagLib::ByteVector& data, const std::wstring& target);
|
|
};
|
|
|
|
#endif |