From 6a617275564423b8a435a0efb52866ee6ddcc537 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Fri, 25 Dec 2015 17:49:43 +0200 Subject: [PATCH] Make NowPlaying a measure --- Build/Installer/Installer.nsi | 2 +- Library/Library.vcxproj | 60 +- Library/Library.vcxproj.filters | 114 ++++ Library/Measure.cpp | 5 + Library/MeasureNowPlaying.cpp | 556 ++++++++++++++++ Library/MeasureNowPlaying.h | 43 ++ .../NowPlaying}/Cover.cpp | 0 .../NowPlaying}/Cover.h | 0 .../NowPlaying}/Internet.cpp | 5 - .../NowPlaying}/Internet.h | 0 .../NowPlaying}/Lyrics.cpp | 0 .../NowPlaying}/Lyrics.h | 0 .../NowPlaying}/Player.cpp | 4 - .../NowPlaying}/Player.h | 4 +- .../NowPlaying}/PlayerAIMP.cpp | 0 .../NowPlaying}/PlayerAIMP.h | 0 .../NowPlaying}/PlayerCAD.cpp | 7 +- .../NowPlaying}/PlayerCAD.h | 0 .../NowPlaying}/PlayerITunes.cpp | 0 .../NowPlaying}/PlayerITunes.h | 0 .../NowPlaying}/PlayerSpotify.cpp | 0 .../NowPlaying}/PlayerSpotify.h | 0 .../NowPlaying}/PlayerWLM.cpp | 0 .../NowPlaying}/PlayerWLM.h | 0 .../NowPlaying}/PlayerWMP.cpp | 3 +- .../NowPlaying}/PlayerWMP.h | 0 .../NowPlaying}/PlayerWinamp.cpp | 0 .../NowPlaying}/PlayerWinamp.h | 0 .../NowPlaying}/PluginNowPlaying.rc | 0 .../NowPlaying}/PluginNowPlaying.vcxproj | 0 .../PluginNowPlaying.vcxproj.filters | 0 .../NowPlaying}/SDKs/AIMP/aimp2_sdk.h | 0 .../NowPlaying}/SDKs/CAD/cad_sdk.h | 0 .../NowPlaying}/SDKs/Winamp/wa_cmd.h | 0 .../NowPlaying}/SDKs/Winamp/wa_dlg.h | 0 .../NowPlaying}/SDKs/Winamp/wa_hotkeys.h | 0 .../NowPlaying}/SDKs/Winamp/wa_ipc.h | 0 .../SDKs/iTunes/iTunesCOMInterface.h | 0 .../SDKs/iTunes/iTunesCOMInterface_i.c | 0 .../NowPlaying}/readme.txt | 0 Library/Skin.cpp | 1 + .../taglib/COPYING.LGPL | 0 .../taglib/COPYING.MPL | 0 .../taglib}/TagLibUnity.cpp | 14 +- .../taglib}/TagLibUnity_ape.cpp | 10 +- .../taglib}/TagLibUnity_asf.cpp | 10 +- .../taglib}/TagLibUnity_flac.cpp | 10 +- .../taglib}/TagLibUnity_mp4.cpp | 12 +- .../taglib}/TagLibUnity_mpeg.cpp | 12 +- Library/taglib/TagLibUnity_mpeg_id3v2.cpp | 34 + .../taglib}/TagLibUnity_ogg.cpp | 14 +- .../taglib}/TagLibUnity_toolkit.cpp | 28 +- .../taglib/ape/ape-tag-format.txt | 0 .../taglib/ape/apefile.cpp | 0 .../taglib/ape/apefile.h | 0 .../taglib/ape/apefooter.cpp | 0 .../taglib/ape/apefooter.h | 0 .../taglib/ape/apeitem.cpp | 0 .../taglib/ape/apeitem.h | 0 .../taglib/ape/apeproperties.cpp | 0 .../taglib/ape/apeproperties.h | 0 .../taglib/ape/apetag.cpp | 0 .../taglib/ape/apetag.h | 0 .../taglib/asf/asfattribute.cpp | 0 .../taglib/asf/asfattribute.h | 0 .../taglib/asf/asffile.cpp | 0 .../taglib/asf/asffile.h | 0 .../taglib/asf/asfpicture.cpp | 0 .../taglib/asf/asfpicture.h | 0 .../taglib/asf/asfproperties.cpp | 0 .../taglib/asf/asfproperties.h | 0 .../taglib/asf/asftag.cpp | 0 .../taglib/asf/asftag.h | 0 .../taglib/audioproperties.cpp | 0 .../taglib/audioproperties.h | 0 .../taglib/fileref.cpp | 0 .../taglib/fileref.h | 0 .../taglib/flac/flacfile.cpp | 0 .../taglib/flac/flacfile.h | 0 .../taglib/flac/flacmetadatablock.cpp | 0 .../taglib/flac/flacmetadatablock.h | 0 .../taglib/flac/flacpicture.cpp | 0 .../taglib/flac/flacpicture.h | 0 .../taglib/flac/flacproperties.cpp | 0 .../taglib/flac/flacproperties.h | 0 .../taglib/flac/flacunknownmetadatablock.cpp | 0 .../taglib/flac/flacunknownmetadatablock.h | 0 .../taglib/mp4/mp4atom.cpp | 0 .../taglib/mp4/mp4atom.h | 0 .../taglib/mp4/mp4coverart.cpp | 0 .../taglib/mp4/mp4coverart.h | 0 .../taglib/mp4/mp4file.cpp | 0 .../taglib/mp4/mp4file.h | 0 .../taglib/mp4/mp4item.cpp | 0 .../taglib/mp4/mp4item.h | 0 .../taglib/mp4/mp4properties.cpp | 0 .../taglib/mp4/mp4properties.h | 0 .../taglib/mp4/mp4tag.cpp | 0 .../taglib/mp4/mp4tag.h | 0 .../taglib/mpc/mpcfile.cpp | 0 .../taglib/mpc/mpcfile.h | 0 .../taglib/mpc/mpcproperties.cpp | 0 .../taglib/mpc/mpcproperties.h | 0 .../taglib/mpeg/id3v1/id3v1genres.cpp | 0 .../taglib/mpeg/id3v1/id3v1genres.h | 0 .../taglib/mpeg/id3v1/id3v1tag.cpp | 0 .../taglib/mpeg/id3v1/id3v1tag.h | 0 .../id3v2/frames/attachedpictureframe.cpp | 0 .../mpeg/id3v2/frames/attachedpictureframe.h | 0 .../mpeg/id3v2/frames/commentsframe.cpp | 0 .../taglib/mpeg/id3v2/frames/commentsframe.h | 0 .../frames/generalencapsulatedobjectframe.cpp | 0 .../frames/generalencapsulatedobjectframe.h | 0 .../mpeg/id3v2/frames/ownershipframe.cpp | 0 .../taglib/mpeg/id3v2/frames/ownershipframe.h | 0 .../mpeg/id3v2/frames/popularimeterframe.cpp | 0 .../mpeg/id3v2/frames/popularimeterframe.h | 0 .../taglib/mpeg/id3v2/frames/privateframe.cpp | 0 .../taglib/mpeg/id3v2/frames/privateframe.h | 0 .../mpeg/id3v2/frames/relativevolumeframe.cpp | 0 .../mpeg/id3v2/frames/relativevolumeframe.h | 0 .../id3v2/frames/textidentificationframe.cpp | 0 .../id3v2/frames/textidentificationframe.h | 0 .../frames/uniquefileidentifierframe.cpp | 0 .../id3v2/frames/uniquefileidentifierframe.h | 0 .../taglib/mpeg/id3v2/frames/unknownframe.cpp | 0 .../taglib/mpeg/id3v2/frames/unknownframe.h | 0 .../frames/unsynchronizedlyricsframe.cpp | 0 .../id3v2/frames/unsynchronizedlyricsframe.h | 0 .../taglib/mpeg/id3v2/frames/urllinkframe.cpp | 0 .../taglib/mpeg/id3v2/frames/urllinkframe.h | 0 .../taglib/mpeg/id3v2/id3v2.2.0.txt | 0 .../taglib/mpeg/id3v2/id3v2.3.0.txt | 0 .../taglib/mpeg/id3v2/id3v2.4.0-frames.txt | 0 .../taglib/mpeg/id3v2/id3v2.4.0-structure.txt | 0 .../taglib/mpeg/id3v2/id3v2extendedheader.cpp | 0 .../taglib/mpeg/id3v2/id3v2extendedheader.h | 0 .../taglib/mpeg/id3v2/id3v2footer.cpp | 0 .../taglib/mpeg/id3v2/id3v2footer.h | 0 .../taglib/mpeg/id3v2/id3v2frame.cpp | 0 .../taglib/mpeg/id3v2/id3v2frame.h | 0 .../taglib/mpeg/id3v2/id3v2framefactory.cpp | 0 .../taglib/mpeg/id3v2/id3v2framefactory.h | 0 .../taglib/mpeg/id3v2/id3v2header.cpp | 0 .../taglib/mpeg/id3v2/id3v2header.h | 0 .../taglib/mpeg/id3v2/id3v2synchdata.cpp | 0 .../taglib/mpeg/id3v2/id3v2synchdata.h | 0 .../taglib/mpeg/id3v2/id3v2tag.cpp | 0 .../taglib/mpeg/id3v2/id3v2tag.h | 0 .../taglib/mpeg/mpegfile.cpp | 0 .../taglib/mpeg/mpegfile.h | 0 .../taglib/mpeg/mpegheader.cpp | 0 .../taglib/mpeg/mpegheader.h | 0 .../taglib/mpeg/mpegproperties.cpp | 0 .../taglib/mpeg/mpegproperties.h | 0 .../taglib/mpeg/xingheader.cpp | 0 .../taglib/mpeg/xingheader.h | 0 .../taglib/ogg/flac/oggflacfile.cpp | 0 .../taglib/ogg/flac/oggflacfile.h | 0 .../taglib/ogg/oggfile.cpp | 0 .../taglib/ogg/oggfile.h | 0 .../taglib/ogg/oggpage.cpp | 0 .../taglib/ogg/oggpage.h | 0 .../taglib/ogg/oggpageheader.cpp | 0 .../taglib/ogg/oggpageheader.h | 0 .../taglib/ogg/speex/speexfile.cpp | 0 .../taglib/ogg/speex/speexfile.h | 0 .../taglib/ogg/speex/speexproperties.cpp | 0 .../taglib/ogg/speex/speexproperties.h | 0 .../taglib/ogg/vorbis/vorbisfile.cpp | 0 .../taglib/ogg/vorbis/vorbisfile.h | 0 .../taglib/ogg/vorbis/vorbisproperties.cpp | 0 .../taglib/ogg/vorbis/vorbisproperties.h | 0 .../taglib/ogg/xiphcomment.cpp | 0 .../taglib/ogg/xiphcomment.h | 0 .../taglib/tag.cpp | 0 .../PluginNowPlaying => Library}/taglib/tag.h | 0 .../taglib/taglib_config.h | 0 .../taglib/taglib_export.h | 0 .../taglib/tagunion.cpp | 0 .../taglib/tagunion.h | 0 .../taglib/toolkit/taglib.h | 0 .../taglib/toolkit/tbytevector.cpp | 0 .../taglib/toolkit/tbytevector.h | 0 .../taglib/toolkit/tbytevectorlist.cpp | 0 .../taglib/toolkit/tbytevectorlist.h | 0 .../taglib/toolkit/tbytevectorstream.cpp | 0 .../taglib/toolkit/tbytevectorstream.h | 0 .../taglib/toolkit/tdebug.cpp | 0 .../taglib/toolkit/tdebug.h | 0 .../taglib/toolkit/tdebuglistener.cpp | 0 .../taglib/toolkit/tdebuglistener.h | 0 .../taglib/toolkit/tfile.cpp | 0 .../taglib/toolkit/tfile.h | 0 .../taglib/toolkit/tfilestream.cpp | 0 .../taglib/toolkit/tfilestream.h | 0 .../taglib/toolkit/tiostream.cpp | 0 .../taglib/toolkit/tiostream.h | 0 .../taglib/toolkit/tlist.h | 0 .../taglib/toolkit/tlist.tcc | 0 .../taglib/toolkit/tmap.h | 0 .../taglib/toolkit/tmap.tcc | 0 .../taglib/toolkit/tpropertymap.cpp | 0 .../taglib/toolkit/tpropertymap.h | 0 .../taglib/toolkit/trefcounter.cpp | 0 .../taglib/toolkit/trefcounter.h | 0 .../taglib/toolkit/tstring.cpp | 0 .../taglib/toolkit/tstring.h | 0 .../taglib/toolkit/tstringlist.cpp | 0 .../taglib/toolkit/tstringlist.h | 0 .../taglib/toolkit/tutils.h | 0 .../taglib/toolkit/unicode.cpp | 0 .../taglib/toolkit/unicode.h | 0 Plugins/PluginNowPlaying/NowPlaying.cpp | 613 ------------------ Plugins/PluginNowPlaying/NowPlaying.h | 49 -- Plugins/PluginNowPlaying/StdAfx.cpp | 8 - Plugins/PluginNowPlaying/StdAfx.h | 28 - .../TagLibUnity_mpeg_id3v2.cpp | 34 - Rainmeter.sln | 28 +- 219 files changed, 877 insertions(+), 831 deletions(-) create mode 100644 Library/MeasureNowPlaying.cpp create mode 100644 Library/MeasureNowPlaying.h rename {Plugins/PluginNowPlaying => Library/NowPlaying}/Cover.cpp (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/Cover.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/Internet.cpp (93%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/Internet.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/Lyrics.cpp (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/Lyrics.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/Player.cpp (91%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/Player.h (95%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerAIMP.cpp (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerAIMP.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerCAD.cpp (94%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerCAD.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerITunes.cpp (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerITunes.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerSpotify.cpp (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerSpotify.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerWLM.cpp (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerWLM.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerWMP.cpp (94%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerWMP.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerWinamp.cpp (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PlayerWinamp.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PluginNowPlaying.rc (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PluginNowPlaying.vcxproj (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/PluginNowPlaying.vcxproj.filters (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/SDKs/AIMP/aimp2_sdk.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/SDKs/CAD/cad_sdk.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/SDKs/Winamp/wa_cmd.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/SDKs/Winamp/wa_dlg.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/SDKs/Winamp/wa_hotkeys.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/SDKs/Winamp/wa_ipc.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/SDKs/iTunes/iTunesCOMInterface.h (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/SDKs/iTunes/iTunesCOMInterface_i.c (100%) rename {Plugins/PluginNowPlaying => Library/NowPlaying}/readme.txt (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/COPYING.LGPL (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/COPYING.MPL (100%) rename {Plugins/PluginNowPlaying => Library/taglib}/TagLibUnity.cpp (77%) rename {Plugins/PluginNowPlaying => Library/taglib}/TagLibUnity_ape.cpp (76%) rename {Plugins/PluginNowPlaying => Library/taglib}/TagLibUnity_asf.cpp (76%) rename {Plugins/PluginNowPlaying => Library/taglib}/TagLibUnity_flac.cpp (73%) rename {Plugins/PluginNowPlaying => Library/taglib}/TagLibUnity_mp4.cpp (73%) rename {Plugins/PluginNowPlaying => Library/taglib}/TagLibUnity_mpeg.cpp (71%) create mode 100644 Library/taglib/TagLibUnity_mpeg_id3v2.cpp rename {Plugins/PluginNowPlaying => Library/taglib}/TagLibUnity_ogg.cpp (67%) rename {Plugins/PluginNowPlaying => Library/taglib}/TagLibUnity_toolkit.cpp (54%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/ape-tag-format.txt (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apefile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apefile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apefooter.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apefooter.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apeitem.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apeitem.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apeproperties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apeproperties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apetag.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ape/apetag.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asfattribute.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asfattribute.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asffile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asffile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asfpicture.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asfpicture.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asfproperties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asfproperties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asftag.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/asf/asftag.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/audioproperties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/audioproperties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/fileref.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/fileref.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacfile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacfile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacmetadatablock.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacmetadatablock.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacpicture.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacpicture.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacproperties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacproperties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacunknownmetadatablock.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/flac/flacunknownmetadatablock.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4atom.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4atom.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4coverart.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4coverart.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4file.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4file.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4item.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4item.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4properties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4properties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4tag.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mp4/mp4tag.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpc/mpcfile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpc/mpcfile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpc/mpcproperties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpc/mpcproperties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v1/id3v1genres.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v1/id3v1genres.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v1/id3v1tag.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v1/id3v1tag.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/attachedpictureframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/commentsframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/commentsframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/ownershipframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/ownershipframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/popularimeterframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/popularimeterframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/privateframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/privateframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/relativevolumeframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/textidentificationframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/textidentificationframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/unknownframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/unknownframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/urllinkframe.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/frames/urllinkframe.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2.2.0.txt (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2.3.0.txt (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2.4.0-frames.txt (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2.4.0-structure.txt (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2extendedheader.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2extendedheader.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2footer.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2footer.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2frame.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2frame.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2framefactory.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2framefactory.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2header.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2header.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2synchdata.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2synchdata.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2tag.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/id3v2/id3v2tag.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/mpegfile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/mpegfile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/mpegheader.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/mpegheader.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/mpegproperties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/mpegproperties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/xingheader.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/mpeg/xingheader.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/flac/oggflacfile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/flac/oggflacfile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/oggfile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/oggfile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/oggpage.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/oggpage.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/oggpageheader.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/oggpageheader.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/speex/speexfile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/speex/speexfile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/speex/speexproperties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/speex/speexproperties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/vorbis/vorbisfile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/vorbis/vorbisfile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/vorbis/vorbisproperties.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/vorbis/vorbisproperties.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/xiphcomment.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/ogg/xiphcomment.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/tag.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/tag.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/taglib_config.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/taglib_export.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/tagunion.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/tagunion.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/taglib.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tbytevector.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tbytevector.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tbytevectorlist.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tbytevectorlist.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tbytevectorstream.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tbytevectorstream.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tdebug.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tdebug.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tdebuglistener.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tdebuglistener.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tfile.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tfile.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tfilestream.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tfilestream.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tiostream.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tiostream.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tlist.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tlist.tcc (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tmap.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tmap.tcc (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tpropertymap.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tpropertymap.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/trefcounter.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/trefcounter.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tstring.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tstring.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tstringlist.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tstringlist.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/tutils.h (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/unicode.cpp (100%) rename {Plugins/PluginNowPlaying => Library}/taglib/toolkit/unicode.h (100%) delete mode 100644 Plugins/PluginNowPlaying/NowPlaying.cpp delete mode 100644 Plugins/PluginNowPlaying/NowPlaying.h delete mode 100644 Plugins/PluginNowPlaying/StdAfx.cpp delete mode 100644 Plugins/PluginNowPlaying/StdAfx.h delete mode 100644 Plugins/PluginNowPlaying/TagLibUnity_mpeg_id3v2.cpp diff --git a/Build/Installer/Installer.nsi b/Build/Installer/Installer.nsi index 15b1d06cc..a4b856450 100644 --- a/Build/Installer/Installer.nsi +++ b/Build/Installer/Installer.nsi @@ -769,6 +769,7 @@ FunctionEnd Function HandlePlugins ${If} $R7 == "MediaKey.dll" + ${OrIf} $R7 == "NowPlaying.dll" ${OrIf} $R7 == "WebParser.dll" Delete "$R9" ${ElseIf} $R7 != "AdvancedCPU.dll" @@ -777,7 +778,6 @@ Function HandlePlugins ${AndIf} $R7 != "FolderInfo.dll" ${AndIf} $R7 != "InputText.dll" ${AndIf} $R7 != "iTunesPlugin.dll" - ${AndIf} $R7 != "NowPlaying.dll" ${AndIf} $R7 != "PerfMon.dll" ${AndIf} $R7 != "PingPlugin.dll" ${AndIf} $R7 != "PowerPlugin.dll" diff --git a/Library/Library.vcxproj b/Library/Library.vcxproj index efcfb0f51..ed7cf64af 100644 --- a/Library/Library.vcxproj +++ b/Library/Library.vcxproj @@ -17,13 +17,13 @@ - .\;lua/include;lua/lua;%(AdditionalIncludeDirectories) + .\;lua/include;lua/lua;.\NowPlaying\SDKs;./taglib;./taglib/toolkit;./taglib/asf;./taglib/mpeg;./taglib/ogg;./taglib/ogg/flac;./taglib/flac;./taglib/mpc;./taglib/ogg/vorbis;./taglib/mpeg/id3v2;./taglib/mpeg/id3v2/frames;./taglib/mpeg/id3v1;./taglib/ape;./taglib/wavpack;./taglib/mp4;%(AdditionalIncludeDirectories) _USRDLL;LIBRARY_EXPORTS;%(PreprocessorDefinitions) Use - comctl32.lib;Wininet.lib;UxTheme.lib;Winmm.lib;gdiplus.lib;Iphlpapi.lib;shlwapi.lib;d2d1.lib;dwrite.lib;windowscodecs.lib;Version.lib;Imagehlp.lib;Urlmon.lib;%(AdditionalDependencies) - Winmm.dll;Version.dll;d2d1.dll;dwrite.dll;Imagehlp.dll;Urlmon.dll;$(DelayLoadTestDLL) + comctl32.lib;Wininet.lib;UxTheme.lib;Winmm.lib;gdiplus.lib;Iphlpapi.lib;shlwapi.lib;d2d1.lib;dwrite.lib;windowscodecs.lib;Version.lib;Imagehlp.lib;Urlmon.lib;psapi.lib;%(AdditionalDependencies) + Winmm.dll;Version.dll;d2d1.dll;dwrite.dll;Imagehlp.dll;Urlmon.dll;psapi.dll;$(DelayLoadTestDLL) Exports.def @@ -50,6 +50,7 @@ + @@ -70,6 +71,20 @@ + + + + + + + + + + + + + NotUsing + @@ -92,6 +107,33 @@ + + NotUsing + + + NotUsing + + + NotUsing + + + NotUsing + + + NotUsing + + + NotUsing + + + NotUsing + + + NotUsing + + + NotUsing + @@ -117,6 +159,7 @@ + @@ -137,6 +180,17 @@ + + + + + + + + + + + diff --git a/Library/Library.vcxproj.filters b/Library/Library.vcxproj.filters index a607d4101..4fedbc366 100644 --- a/Library/Library.vcxproj.filters +++ b/Library/Library.vcxproj.filters @@ -19,6 +19,12 @@ {941dce28-a314-4492-befb-5770432c98bf} + + {64424fee-4da8-4109-84de-df55a55e63c0} + + + {fe354ece-06ea-4af8-9129-f0fcb7e31d0c} + @@ -195,6 +201,72 @@ Source Files + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + taglib + + + taglib + + + taglib + + + taglib + + + taglib + + + taglib + + + taglib + + + taglib + + + taglib + + + NowPlaying + + + NowPlaying + @@ -356,6 +428,48 @@ Header Files + + Header Files + + + Header Files + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + NowPlaying + + + Header Files + diff --git a/Library/Measure.cpp b/Library/Measure.cpp index 97b819e50..9418d6f53 100644 --- a/Library/Measure.cpp +++ b/Library/Measure.cpp @@ -15,6 +15,7 @@ #include "MeasureNetIn.h" #include "MeasureNetOut.h" #include "MeasureNetTotal.h" +#include "MeasureNowPlaying.h" #include "MeasureDiskSpace.h" #include "MeasureUptime.h" #include "MeasurePlugin.h" @@ -746,6 +747,10 @@ Measure* Measure::Create(const WCHAR* measure, Skin* skin, const WCHAR* name) { return new MeasureNetTotal(skin, name); } + else if (_wcsicmp(L"NowPlaying", measure) == 0) + { + return new MeasureNowPlaying(skin, name); + } else if (_wcsicmp(L"PhysicalMemory", measure) == 0) { return new MeasurePhysicalMemory(skin, name); diff --git a/Library/MeasureNowPlaying.cpp b/Library/MeasureNowPlaying.cpp new file mode 100644 index 000000000..f2038a930 --- /dev/null +++ b/Library/MeasureNowPlaying.cpp @@ -0,0 +1,556 @@ +/* Copyright (C) 2011 Rainmeter Project Developers + * + * This Source Code Form is subject to the terms of the GNU General Public + * License; either version 2 of the License, or (at your option) any later + * version. If a copy of the GPL was not distributed with this file, You can + * obtain one at . */ + +#include "StdAfx.h" +#include "MeasureNowPlaying.h" +#include "Rainmeter.h" +#include "NowPlaying/Internet.h" +#include "NowPlaying/PlayerAIMP.h" +#include "NowPlaying/PlayerCAD.h" +#include "NowPlaying/PlayerITunes.h" +#include "NowPlaying/PlayerSpotify.h" +#include "NowPlaying/PlayerWinamp.h" +#include "NowPlaying/PlayerWLM.h" +#include "NowPlaying/PlayerWMP.h" + +struct ParentMeasure +{ + ParentMeasure() : + player(), + owner(), + measureCount(1), + trackCount(0), + disableLeadingZero(false) + {} + + Player* player; + MeasureNowPlaying* owner; + std::wstring trackChangeAction; + std::wstring playerPath; + UINT measureCount; + UINT trackCount; + bool disableLeadingZero; +}; + +static std::vector g_ParentMeasures; +bool g_Initialized = false; +HINSTANCE g_Instance = nullptr; + +MeasureNowPlaying::MeasureNowPlaying(Skin* skin, const WCHAR* name) : Measure(skin, name), + m_Type(MEASURE_NONE), + m_Parent() +{ + if (!g_Initialized) + { + Internet::Initialize(); + g_Initialized = true; + } +} + +MeasureNowPlaying::~MeasureNowPlaying() +{ + if (m_Parent) + { + Player* player = m_Parent->player; + if (--m_Parent->measureCount == 0) + { + player->RemoveInstance(); + delete m_Parent; + + auto iter = std::find(g_ParentMeasures.begin(), g_ParentMeasures.end(), m_Parent); + g_ParentMeasures.erase(iter); + + if (g_ParentMeasures.empty()) + { + Internet::Finalize(); + g_Initialized = false; + } + } + } +} + +void MeasureNowPlaying::ReadOptions(ConfigParser& parser, const WCHAR* section) +{ + Measure::ReadOptions(parser, section); + + // Data is stored in two structs: Measure and ParentMeasure. ParentMeasure is created for measures + // with PlayerName=someplayer. Measure is created for all measures and points to ParentMeasure as + // referenced in PlayerName=[section]. + + // Read settings from the ini-file + LPCWSTR str = parser.ReadString(section, L"PlayerName", L"", false).c_str(); + if (str[0] == L'[') + { + if (m_Parent) + { + // Don't let a measure measure change its parent + } + else + { + // PlayerName starts with [ so use referenced section + ++str; + size_t len = wcslen(str); + if (len > 0 && str[len - 1] == L']') + { + --len; + + std::vector::iterator iter = g_ParentMeasures.begin(); + for ( ; iter != g_ParentMeasures.end(); ++iter) + { + if (GetSkin() == (*iter)->owner->GetSkin() && + _wcsnicmp(str, (*iter)->owner->GetName(), len) == 0) + { + // Use same ParentMeasure as referenced section + m_Parent = (*iter); + ++m_Parent->measureCount; + + break; + } + } + + if (!m_Parent) + { + // The referenced section doesn't exist + LogWarningF(this, L"Invalid PlayerName=%s", str - 1); + return; + } + } + } + } + else + { + // ParentMeasure is created when PlayerName is an actual player (and not a reference) + Player* oldPlayer = nullptr; + if (m_Parent) + { + if (m_Parent->owner != this) + { + // Don't let a measure-only measure become a parent measure + return; + } + + oldPlayer = m_Parent->player; + } + else + { + m_Parent = new ParentMeasure; + g_ParentMeasures.push_back(m_Parent); + m_Parent->owner = this; + } + + if (_wcsicmp(L"AIMP", str) == 0) + { + m_Parent->player = PlayerAIMP::Create(); + } + else if (_wcsicmp(L"CAD", str) == 0) + { + m_Parent->player = PlayerCAD::Create(); + } + else if (_wcsicmp(L"foobar2000", str) == 0) + { + HWND fooWindow = FindWindow(L"foo_rainmeter_class", nullptr); + if (fooWindow) + { + const WCHAR* error = L"Your foobar2000 plugin is out of date.\n\nDo you want to update the plugin now?"; + if (MessageBox(nullptr, error, L"Rainmeter", MB_YESNO | MB_ICONINFORMATION | MB_TOPMOST) == IDYES) + { + ShellExecute(nullptr, L"open", L"http://github.com/poiru/foo-cad#readme", nullptr, nullptr, SW_SHOWNORMAL); + } + } + + m_Parent->player = PlayerCAD::Create(); + } + else if (_wcsicmp(L"iTunes", str) == 0) + { + m_Parent->player = PlayerITunes::Create(); + } + else if (_wcsicmp(L"MediaMonkey", str) == 0) + { + m_Parent->player = PlayerWinamp::Create(WA_MEDIAMONKEY); + } + else if (_wcsicmp(L"Spotify", str) == 0) + { + m_Parent->player = PlayerSpotify::Create(); + } + else if (_wcsicmp(L"WinAmp", str) == 0) + { + m_Parent->player = PlayerWinamp::Create(WA_WINAMP); + } + else if (_wcsicmp(L"WMP", str) == 0) + { + m_Parent->player = PlayerWMP::Create(); + } + else + { + // Default to WLM + m_Parent->player = PlayerWLM::Create(); + + if (_wcsicmp(L"WLM", str) != 0) + { + LogErrorF(this, L"Invalid PlayerName=%s", str); + } + } + + m_Parent->player->AddInstance(); + m_Parent->playerPath = parser.ReadString(section, L"PlayerPath", L""); + m_Parent->trackChangeAction = parser.ReadString(section, L"TrackChangeAction", L"", false); + m_Parent->disableLeadingZero = parser.ReadInt(section, L"DisableLeadingZero", 0) != 0; + + if (oldPlayer) + { + m_Parent->player->SetMeasures(oldPlayer->GetMeasures()); + + // Remove instance here so that player doesn't have to reinitialize if PlayerName was + // not changed. + oldPlayer->RemoveInstance(); + } + } + + str = parser.ReadString(section, L"PlayerType", L"").c_str(); + if (_wcsicmp(L"ARTIST", str) == 0) + { + m_Type = MEASURE_ARTIST; + } + else if (_wcsicmp(L"TITLE", str) == 0) + { + m_Type = MEASURE_TITLE; + } + else if (_wcsicmp(L"ALBUM", str) == 0) + { + m_Type = MEASURE_ALBUM; + } + else if (_wcsicmp(L"COVER", str) == 0) + { + m_Type = MEASURE_COVER; + } + else if (_wcsicmp(L"DURATION", str) == 0) + { + m_Type = MEASURE_DURATION; + } + else if (_wcsicmp(L"POSITION", str) == 0) + { + m_Type = MEASURE_POSITION; + } + else if (_wcsicmp(L"PROGRESS", str) == 0) + { + m_Type = MEASURE_PROGRESS; + m_MaxValue = 100.0; + } + else if (_wcsicmp(L"RATING", str) == 0) + { + m_Type = MEASURE_RATING; + m_MaxValue = 5.0; + } + else if (_wcsicmp(L"STATE", str) == 0) + { + m_Type = MEASURE_STATE; + } + else if (_wcsicmp(L"STATUS", str) == 0) + { + m_Type = MEASURE_STATUS; + } + else if (_wcsicmp(L"VOLUME", str) == 0) + { + m_Type = MEASURE_VOLUME; + m_MaxValue = 100.0; + } + else if (_wcsicmp(L"SHUFFLE", str) == 0) + { + m_Type = MEASURE_SHUFFLE; + } + else if (_wcsicmp(L"REPEAT", str) == 0) + { + m_Type = MEASURE_REPEAT; + } + else if (_wcsicmp(L"LYRICS", str) == 0) + { + LogWarningF(this, L"Using undocumented PlayerType=LYRICS!"); + m_Type = MEASURE_LYRICS; + } + else if (_wcsicmp(L"FILE", str) == 0) + { + m_Type = MEASURE_FILE; + } + else if (_wcsicmp(L"NUMBER", str) == 0) + { + m_Type = MEASURE_NUMBER; + } + else if (_wcsicmp(L"YEAR", str) == 0) + { + m_Type = MEASURE_YEAR; + } + else if (_wcsicmp(L"GENRE", str) == 0) + { + m_Type = MEASURE_GENRE; + } + else + { + LogErrorF(this, L"Invalid PlayerType=%s", str); + } + + m_Parent->player->AddMeasure(m_Type); +} + +void MeasureNowPlaying::UpdateValue() +{ + m_Value = 0.0; + if (!m_Parent) + { + return; + } + + Player* player = m_Parent->player; + + // Only allow parent measure to update + if (m_Parent->owner == this) + { + player->UpdateMeasure(); + + // Execute TrackChangeAction= if necessary + if (!m_Parent->trackChangeAction.empty() && + m_Parent->trackCount != player->GetTrackCount()) + { + GetRainmeter().DelayedExecuteCommand(m_Parent->trackChangeAction.c_str(), GetSkin()); + m_Parent->trackCount = player->GetTrackCount(); + } + } + + switch (m_Type) + { + case MEASURE_DURATION: + m_Value = player->GetDuration(); + break; + case MEASURE_POSITION: + m_Value = player->GetPosition(); + break; + case MEASURE_PROGRESS: + if (player->GetDuration()) + { + m_Value = (player->GetPosition() * 100) / player->GetDuration(); + } + break; + case MEASURE_RATING: + m_Value = player->GetRating(); + break; + case MEASURE_VOLUME: + m_Value = player->GetVolume(); + break; + case MEASURE_STATE: + m_Value = player->GetState(); + break; + case MEASURE_STATUS: + m_Value = player->IsInitialized(); + break; + case MEASURE_SHUFFLE: + m_Value = player->GetShuffle(); + break; + case MEASURE_REPEAT: + m_Value = player->GetRepeat(); + break; + case MEASURE_NUMBER: + m_Value = player->GetNumber(); + break; + case MEASURE_YEAR: + m_Value = player->GetYear(); + break; + } +} + +const WCHAR* MeasureNowPlaying::GetStringValue() +{ + if (!m_Parent) return nullptr; + + const Player* player = m_Parent->player; + static WCHAR buffer[32]; + const WCHAR* str = nullptr; + switch (m_Type) + { + case MEASURE_ARTIST: + str = player->GetArtist(); + + case MEASURE_TITLE: + str = player->GetTitle(); + + case MEASURE_ALBUM: + str = player->GetAlbum(); + + case MEASURE_LYRICS: + str = player->GetLyrics(); + + case MEASURE_COVER: + str = player->GetCoverPath(); + + case MEASURE_FILE: + str = player->GetFilePath(); + + case MEASURE_DURATION: + SecondsToTime(player->GetDuration(), m_Parent->disableLeadingZero, buffer); + str = buffer; + + case MEASURE_POSITION: + SecondsToTime(player->GetPosition(), m_Parent->disableLeadingZero, buffer); + str = buffer; + + case MEASURE_GENRE: + str = player->GetGenre(); + } + + return str ? CheckSubstitute(str) : nullptr; +} + +void MeasureNowPlaying::Command(const std::wstring& command) +{ + const WCHAR* args = command.c_str(); + + if (!m_Parent) return; + + Player* player = m_Parent->player; + + if (!player->IsInitialized()) + { + if (_wcsicmp(args, L"OpenPlayer") == 0 || _wcsicmp(args, L"TogglePlayer") == 0) + { + player->OpenPlayer(m_Parent->playerPath); + } + } + else if (_wcsicmp(args, L"Pause") == 0) + { + player->Pause(); + } + else if (_wcsicmp(args, L"Play") == 0) + { + player->Play(); + } + else if (_wcsicmp(args, L"PlayPause") == 0) + { + (player->GetState() != STATE_PLAYING) ? player->Play() : player->Pause(); + } + else if (_wcsicmp(args, L"Next") == 0) + { + player->Next(); + } + else if (_wcsicmp(args, L"Previous") == 0) + { + player->Previous(); + } + else if (_wcsicmp(args, L"Stop") == 0) + { + player->Stop(); + } + else if (_wcsicmp(args, L"OpenPlayer") == 0) + { + player->OpenPlayer(m_Parent->playerPath); + } + else if (_wcsicmp(args, L"ClosePlayer") == 0 || _wcsicmp(args, L"TogglePlayer") == 0) + { + player->ClosePlayer(); + } + else + { + LPCWSTR arg = wcschr(args, L' '); + + if (arg) + { + ++arg; // Skip the space + + if (_wcsnicmp(args, L"SetPosition", 11) == 0) + { + int position = (_wtoi(arg) * (int)player->GetDuration()) / 100; + if (arg[0] == L'+' || arg[0] == L'-') + { + position += player->GetPosition(); + } + + player->SetPosition(position); + } + else if (_wcsnicmp(args, L"SetRating", 9) == 0) + { + int rating = _wtoi(arg); + if (rating >= 0 && rating <= 5) + { + player->SetRating(rating); + } + } + else if (_wcsnicmp(args, L"SetVolume", 9) == 0) + { + int volume = _wtoi(arg); + if (arg[0] == L'+' || arg[0] == L'-') + { + // Relative to current volume + volume += player->GetVolume(); + } + + if (volume < 0) + { + volume = 0; + } + else if (volume > 100) + { + volume = 100; + } + player->SetVolume(volume);; + } + else if (_wcsnicmp(args, L"SetShuffle", 9) == 0) + { + int state = _wtoi(arg); + if (state == -1) + { + player->SetShuffle(!player->GetShuffle()); + } + else if (state == 0 || state == 1) + { + player->SetShuffle(state != 0); + } + } + else if (_wcsnicmp(args, L"SetRepeat", 9) == 0) + { + int state = _wtoi(arg); + if (state == -1) + { + player->SetRepeat(!player->GetRepeat()); + } + else if (state == 0 || state == 1) + { + player->SetRepeat(state != 0); + } + } + else + { + LogWarningF(this, L"Invalid !CommandMeasure"); + } + } + else + { + LogWarningF(this, L"Invalid !CommandMeasure"); + } + } +} + +void SecondsToTime(UINT seconds, bool leadingZero, WCHAR* buffer) +{ + int hours = seconds; + int mins = seconds; + hours /= 3600; + mins %= 3600; + int secs = mins; + mins /= 60; + secs %= 60; + + if (seconds < 0) + { + hours = mins = secs = 0; + } + + if (hours) + { + _snwprintf_s(buffer, 32, _TRUNCATE, leadingZero ? L"%i:%02i:%02i" : L"%02i:%02i:%02i", hours, mins, secs); + } + else + { + _snwprintf_s(buffer, 32, _TRUNCATE, leadingZero ? L"%i:%02i" : L"%02i:%02i", mins, secs); + } +} diff --git a/Library/MeasureNowPlaying.h b/Library/MeasureNowPlaying.h new file mode 100644 index 000000000..b71f17ca8 --- /dev/null +++ b/Library/MeasureNowPlaying.h @@ -0,0 +1,43 @@ +/* Copyright (C) 2011 Rainmeter Project Developers + * + * This Source Code Form is subject to the terms of the GNU General Public + * License; either version 2 of the License, or (at your option) any later + * version. If a copy of the GPL was not distributed with this file, You can + * obtain one at . */ + +#ifndef RM_LIBRARY_MEASURENOWPLAYING_ +#define RM_LIBRARY_MEASURENOWPLAYING_ + +#include "Measure.h" + +enum MeasureType; +struct ParentMeasure; +class Player; + +class MeasureNowPlaying : public Measure +{ +public: + MeasureNowPlaying(Skin* skin, const WCHAR* name); + virtual ~MeasureNowPlaying(); + + MeasureNowPlaying(const MeasureNowPlaying& other) = delete; + MeasureNowPlaying& operator=(MeasureNowPlaying other) = delete; + + UINT GetTypeID() override { return TypeID(); } + + const WCHAR* GetStringValue() override; + + void Command(const std::wstring& command) override; + +protected: + void ReadOptions(ConfigParser& parser, const WCHAR* section) override; + void UpdateValue() override; + +private: + ParentMeasure* m_Parent; + MeasureType m_Type; +}; + +void SecondsToTime(UINT seconds, bool leadingZero, WCHAR* buffer); + +#endif diff --git a/Plugins/PluginNowPlaying/Cover.cpp b/Library/NowPlaying/Cover.cpp similarity index 100% rename from Plugins/PluginNowPlaying/Cover.cpp rename to Library/NowPlaying/Cover.cpp diff --git a/Plugins/PluginNowPlaying/Cover.h b/Library/NowPlaying/Cover.h similarity index 100% rename from Plugins/PluginNowPlaying/Cover.h rename to Library/NowPlaying/Cover.h diff --git a/Plugins/PluginNowPlaying/Internet.cpp b/Library/NowPlaying/Internet.cpp similarity index 93% rename from Plugins/PluginNowPlaying/Internet.cpp rename to Library/NowPlaying/Internet.cpp index 93d61ebd7..f509da51e 100644 --- a/Plugins/PluginNowPlaying/Internet.cpp +++ b/Library/NowPlaying/Internet.cpp @@ -21,11 +21,6 @@ void Internet::Initialize() nullptr, nullptr, 0); - - if (!c_NetHandle) - { - RmLog(LOG_ERROR, L"NowPlaying.dll: Unable to open net handle"); - } } /* diff --git a/Plugins/PluginNowPlaying/Internet.h b/Library/NowPlaying/Internet.h similarity index 100% rename from Plugins/PluginNowPlaying/Internet.h rename to Library/NowPlaying/Internet.h diff --git a/Plugins/PluginNowPlaying/Lyrics.cpp b/Library/NowPlaying/Lyrics.cpp similarity index 100% rename from Plugins/PluginNowPlaying/Lyrics.cpp rename to Library/NowPlaying/Lyrics.cpp diff --git a/Plugins/PluginNowPlaying/Lyrics.h b/Library/NowPlaying/Lyrics.h similarity index 100% rename from Plugins/PluginNowPlaying/Lyrics.h rename to Library/NowPlaying/Lyrics.h diff --git a/Plugins/PluginNowPlaying/Player.cpp b/Library/NowPlaying/Player.cpp similarity index 91% rename from Plugins/PluginNowPlaying/Player.cpp rename to Library/NowPlaying/Player.cpp index c13c67eb0..6b0d2049d 100644 --- a/Plugins/PluginNowPlaying/Player.cpp +++ b/Library/NowPlaying/Player.cpp @@ -135,10 +135,6 @@ void Player::FindLyrics() { m_InternetThread = thread; } - else - { - RmLog(LOG_DEBUG, L"NowPlaying.dll: Failed to start lyrics thread"); - } } } diff --git a/Plugins/PluginNowPlaying/Player.h b/Library/NowPlaying/Player.h similarity index 95% rename from Plugins/PluginNowPlaying/Player.h rename to Library/NowPlaying/Player.h index 55c3a7b43..b880c3c3b 100644 --- a/Plugins/PluginNowPlaying/Player.h +++ b/Library/NowPlaying/Player.h @@ -8,8 +8,8 @@ #ifndef __PLAYER_H__ #define __PLAYER_H__ -#include "fileref.h" -#include "tag.h" +#include "taglib\fileref.h" +#include "taglib\tag.h" #include "Cover.h" #include "Internet.h" #include "Lyrics.h" diff --git a/Plugins/PluginNowPlaying/PlayerAIMP.cpp b/Library/NowPlaying/PlayerAIMP.cpp similarity index 100% rename from Plugins/PluginNowPlaying/PlayerAIMP.cpp rename to Library/NowPlaying/PlayerAIMP.cpp diff --git a/Plugins/PluginNowPlaying/PlayerAIMP.h b/Library/NowPlaying/PlayerAIMP.h similarity index 100% rename from Plugins/PluginNowPlaying/PlayerAIMP.h rename to Library/NowPlaying/PlayerAIMP.h diff --git a/Plugins/PluginNowPlaying/PlayerCAD.cpp b/Library/NowPlaying/PlayerCAD.cpp similarity index 94% rename from Plugins/PluginNowPlaying/PlayerCAD.cpp rename to Library/NowPlaying/PlayerCAD.cpp index 37e0ecae7..08514bb11 100644 --- a/Plugins/PluginNowPlaying/PlayerCAD.cpp +++ b/Library/NowPlaying/PlayerCAD.cpp @@ -8,6 +8,9 @@ #include "StdAfx.h" #include "PlayerCAD.h" #include "CAD/cad_sdk.h" +#include "Rainmeter.h" + +#include Player* PlayerCAD::c_Player = nullptr; extern HINSTANCE g_Instance; @@ -103,7 +106,7 @@ void PlayerCAD::Initialize() } WCHAR buffer[MAX_PATH]; - LPCTSTR file = RmGetSettingsFile(); + LPCTSTR file = GetRainmeter().GetDataFile().c_str(); // Read saved settings GetPrivateProfileString(L"NowPlaying.dll", L"ClassName", nullptr, buffer, MAX_PATH, file); @@ -361,7 +364,7 @@ LRESULT CALLBACK PlayerCAD::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l LPCTSTR classSz = className.empty() ? nullptr : className.c_str(); LPCTSTR windowSz = windowName.empty() ? nullptr : windowName.c_str(); - LPCTSTR file = RmGetSettingsFile(); + LPCTSTR file = GetRainmeter().GetDataFile().c_str(); WritePrivateProfileString(L"NowPlaying.dll", L"ClassName", classSz, file); WritePrivateProfileString(L"NowPlaying.dll", L"WindowName", windowSz, file); diff --git a/Plugins/PluginNowPlaying/PlayerCAD.h b/Library/NowPlaying/PlayerCAD.h similarity index 100% rename from Plugins/PluginNowPlaying/PlayerCAD.h rename to Library/NowPlaying/PlayerCAD.h diff --git a/Plugins/PluginNowPlaying/PlayerITunes.cpp b/Library/NowPlaying/PlayerITunes.cpp similarity index 100% rename from Plugins/PluginNowPlaying/PlayerITunes.cpp rename to Library/NowPlaying/PlayerITunes.cpp diff --git a/Plugins/PluginNowPlaying/PlayerITunes.h b/Library/NowPlaying/PlayerITunes.h similarity index 100% rename from Plugins/PluginNowPlaying/PlayerITunes.h rename to Library/NowPlaying/PlayerITunes.h diff --git a/Plugins/PluginNowPlaying/PlayerSpotify.cpp b/Library/NowPlaying/PlayerSpotify.cpp similarity index 100% rename from Plugins/PluginNowPlaying/PlayerSpotify.cpp rename to Library/NowPlaying/PlayerSpotify.cpp diff --git a/Plugins/PluginNowPlaying/PlayerSpotify.h b/Library/NowPlaying/PlayerSpotify.h similarity index 100% rename from Plugins/PluginNowPlaying/PlayerSpotify.h rename to Library/NowPlaying/PlayerSpotify.h diff --git a/Plugins/PluginNowPlaying/PlayerWLM.cpp b/Library/NowPlaying/PlayerWLM.cpp similarity index 100% rename from Plugins/PluginNowPlaying/PlayerWLM.cpp rename to Library/NowPlaying/PlayerWLM.cpp diff --git a/Plugins/PluginNowPlaying/PlayerWLM.h b/Library/NowPlaying/PlayerWLM.h similarity index 100% rename from Plugins/PluginNowPlaying/PlayerWLM.h rename to Library/NowPlaying/PlayerWLM.h diff --git a/Plugins/PluginNowPlaying/PlayerWMP.cpp b/Library/NowPlaying/PlayerWMP.cpp similarity index 94% rename from Plugins/PluginNowPlaying/PlayerWMP.cpp rename to Library/NowPlaying/PlayerWMP.cpp index 07cf0470e..b413216b5 100644 --- a/Plugins/PluginNowPlaying/PlayerWMP.cpp +++ b/Library/NowPlaying/PlayerWMP.cpp @@ -7,6 +7,7 @@ #include "StdAfx.h" #include "PlayerWMP.h" +#include "Logger.h" Player* PlayerWMP::c_Player = nullptr; extern HINSTANCE g_Instance; @@ -236,7 +237,7 @@ void PlayerWMP::Initialize() HMODULE atl = InitializeAtlLibrary(); if (!atl) { - RmLog(LOG_ERROR, L"NowPlaying: ATL not found"); + LogError(L"NowPlaying: ATL not found"); return; } diff --git a/Plugins/PluginNowPlaying/PlayerWMP.h b/Library/NowPlaying/PlayerWMP.h similarity index 100% rename from Plugins/PluginNowPlaying/PlayerWMP.h rename to Library/NowPlaying/PlayerWMP.h diff --git a/Plugins/PluginNowPlaying/PlayerWinamp.cpp b/Library/NowPlaying/PlayerWinamp.cpp similarity index 100% rename from Plugins/PluginNowPlaying/PlayerWinamp.cpp rename to Library/NowPlaying/PlayerWinamp.cpp diff --git a/Plugins/PluginNowPlaying/PlayerWinamp.h b/Library/NowPlaying/PlayerWinamp.h similarity index 100% rename from Plugins/PluginNowPlaying/PlayerWinamp.h rename to Library/NowPlaying/PlayerWinamp.h diff --git a/Plugins/PluginNowPlaying/PluginNowPlaying.rc b/Library/NowPlaying/PluginNowPlaying.rc similarity index 100% rename from Plugins/PluginNowPlaying/PluginNowPlaying.rc rename to Library/NowPlaying/PluginNowPlaying.rc diff --git a/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj b/Library/NowPlaying/PluginNowPlaying.vcxproj similarity index 100% rename from Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj rename to Library/NowPlaying/PluginNowPlaying.vcxproj diff --git a/Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj.filters b/Library/NowPlaying/PluginNowPlaying.vcxproj.filters similarity index 100% rename from Plugins/PluginNowPlaying/PluginNowPlaying.vcxproj.filters rename to Library/NowPlaying/PluginNowPlaying.vcxproj.filters diff --git a/Plugins/PluginNowPlaying/SDKs/AIMP/aimp2_sdk.h b/Library/NowPlaying/SDKs/AIMP/aimp2_sdk.h similarity index 100% rename from Plugins/PluginNowPlaying/SDKs/AIMP/aimp2_sdk.h rename to Library/NowPlaying/SDKs/AIMP/aimp2_sdk.h diff --git a/Plugins/PluginNowPlaying/SDKs/CAD/cad_sdk.h b/Library/NowPlaying/SDKs/CAD/cad_sdk.h similarity index 100% rename from Plugins/PluginNowPlaying/SDKs/CAD/cad_sdk.h rename to Library/NowPlaying/SDKs/CAD/cad_sdk.h diff --git a/Plugins/PluginNowPlaying/SDKs/Winamp/wa_cmd.h b/Library/NowPlaying/SDKs/Winamp/wa_cmd.h similarity index 100% rename from Plugins/PluginNowPlaying/SDKs/Winamp/wa_cmd.h rename to Library/NowPlaying/SDKs/Winamp/wa_cmd.h diff --git a/Plugins/PluginNowPlaying/SDKs/Winamp/wa_dlg.h b/Library/NowPlaying/SDKs/Winamp/wa_dlg.h similarity index 100% rename from Plugins/PluginNowPlaying/SDKs/Winamp/wa_dlg.h rename to Library/NowPlaying/SDKs/Winamp/wa_dlg.h diff --git a/Plugins/PluginNowPlaying/SDKs/Winamp/wa_hotkeys.h b/Library/NowPlaying/SDKs/Winamp/wa_hotkeys.h similarity index 100% rename from Plugins/PluginNowPlaying/SDKs/Winamp/wa_hotkeys.h rename to Library/NowPlaying/SDKs/Winamp/wa_hotkeys.h diff --git a/Plugins/PluginNowPlaying/SDKs/Winamp/wa_ipc.h b/Library/NowPlaying/SDKs/Winamp/wa_ipc.h similarity index 100% rename from Plugins/PluginNowPlaying/SDKs/Winamp/wa_ipc.h rename to Library/NowPlaying/SDKs/Winamp/wa_ipc.h diff --git a/Plugins/PluginNowPlaying/SDKs/iTunes/iTunesCOMInterface.h b/Library/NowPlaying/SDKs/iTunes/iTunesCOMInterface.h similarity index 100% rename from Plugins/PluginNowPlaying/SDKs/iTunes/iTunesCOMInterface.h rename to Library/NowPlaying/SDKs/iTunes/iTunesCOMInterface.h diff --git a/Plugins/PluginNowPlaying/SDKs/iTunes/iTunesCOMInterface_i.c b/Library/NowPlaying/SDKs/iTunes/iTunesCOMInterface_i.c similarity index 100% rename from Plugins/PluginNowPlaying/SDKs/iTunes/iTunesCOMInterface_i.c rename to Library/NowPlaying/SDKs/iTunes/iTunesCOMInterface_i.c diff --git a/Plugins/PluginNowPlaying/readme.txt b/Library/NowPlaying/readme.txt similarity index 100% rename from Plugins/PluginNowPlaying/readme.txt rename to Library/NowPlaying/readme.txt diff --git a/Library/Skin.cpp b/Library/Skin.cpp index 5037acc3a..6587661ba 100644 --- a/Library/Skin.cpp +++ b/Library/Skin.cpp @@ -2228,6 +2228,7 @@ bool Skin::ReadSkin() const WCHAR* const kOldDefaultPlugins[] = { L"MediaKey", + L"NowPlaying", L"WebParser" }; for (const auto* oldDefaultPlugin : kOldDefaultPlugins) diff --git a/Plugins/PluginNowPlaying/taglib/COPYING.LGPL b/Library/taglib/COPYING.LGPL similarity index 100% rename from Plugins/PluginNowPlaying/taglib/COPYING.LGPL rename to Library/taglib/COPYING.LGPL diff --git a/Plugins/PluginNowPlaying/taglib/COPYING.MPL b/Library/taglib/COPYING.MPL similarity index 100% rename from Plugins/PluginNowPlaying/taglib/COPYING.MPL rename to Library/taglib/COPYING.MPL diff --git a/Plugins/PluginNowPlaying/TagLibUnity.cpp b/Library/taglib/TagLibUnity.cpp similarity index 77% rename from Plugins/PluginNowPlaying/TagLibUnity.cpp rename to Library/taglib/TagLibUnity.cpp index 0ce83f225..4de31d92c 100644 --- a/Plugins/PluginNowPlaying/TagLibUnity.cpp +++ b/Library/taglib/TagLibUnity.cpp @@ -14,15 +14,15 @@ #pragma warning(push) #pragma warning(disable: 4244; disable: 4267) -#include "taglib\fileref.cpp" -#include "taglib\tag.cpp" -#include "taglib\tagunion.cpp" -#include "taglib\audioproperties.cpp" +#include "fileref.cpp" +#include "tag.cpp" +#include "tagunion.cpp" +#include "audioproperties.cpp" -#include "taglib\mpc\mpcfile.cpp" -#include "taglib\mpc\mpcproperties.cpp" +#include "mpc\mpcfile.cpp" +#include "mpc\mpcproperties.cpp" // Included here due to mismatch with toolkit\tfilestream.cpp. -#include "taglib\toolkit\tfile.cpp" +#include "toolkit\tfile.cpp" #pragma warning(pop) diff --git a/Plugins/PluginNowPlaying/TagLibUnity_ape.cpp b/Library/taglib/TagLibUnity_ape.cpp similarity index 76% rename from Plugins/PluginNowPlaying/TagLibUnity_ape.cpp rename to Library/taglib/TagLibUnity_ape.cpp index ff2e3ba78..f63fc81d4 100644 --- a/Plugins/PluginNowPlaying/TagLibUnity_ape.cpp +++ b/Library/taglib/TagLibUnity_ape.cpp @@ -11,10 +11,10 @@ #pragma warning(push) #pragma warning(disable: 4244; disable: 4267) -#include "taglib\ape\apefile.cpp" -#include "taglib\ape\apefooter.cpp" -#include "taglib\ape\apeitem.cpp" -#include "taglib\ape\apeproperties.cpp" -#include "taglib\ape\apetag.cpp" +#include "ape\apefile.cpp" +#include "ape\apefooter.cpp" +#include "ape\apeitem.cpp" +#include "ape\apeproperties.cpp" +#include "ape\apetag.cpp" #pragma warning(pop) diff --git a/Plugins/PluginNowPlaying/TagLibUnity_asf.cpp b/Library/taglib/TagLibUnity_asf.cpp similarity index 76% rename from Plugins/PluginNowPlaying/TagLibUnity_asf.cpp rename to Library/taglib/TagLibUnity_asf.cpp index de9d826d4..6f117f2a0 100644 --- a/Plugins/PluginNowPlaying/TagLibUnity_asf.cpp +++ b/Library/taglib/TagLibUnity_asf.cpp @@ -11,10 +11,10 @@ #pragma warning(push) #pragma warning(disable: 4244; disable: 4267) -#include "taglib\asf\asfattribute.cpp" -#include "taglib\asf\asffile.cpp" -#include "taglib\asf\asfpicture.cpp" -#include "taglib\asf\asfproperties.cpp" -#include "taglib\asf\asftag.cpp" +#include "asf\asfattribute.cpp" +#include "asf\asffile.cpp" +#include "asf\asfpicture.cpp" +#include "asf\asfproperties.cpp" +#include "asf\asftag.cpp" #pragma warning(pop) diff --git a/Plugins/PluginNowPlaying/TagLibUnity_flac.cpp b/Library/taglib/TagLibUnity_flac.cpp similarity index 73% rename from Plugins/PluginNowPlaying/TagLibUnity_flac.cpp rename to Library/taglib/TagLibUnity_flac.cpp index f44b64de8..5ad1fe7f8 100644 --- a/Plugins/PluginNowPlaying/TagLibUnity_flac.cpp +++ b/Library/taglib/TagLibUnity_flac.cpp @@ -11,10 +11,10 @@ #pragma warning(push) #pragma warning(disable: 4244; disable: 4267) -#include "taglib\flac\flacfile.cpp" -#include "taglib\flac\flacmetadatablock.cpp" -#include "taglib\flac\flacpicture.cpp" -#include "taglib\flac\flacunknownmetadatablock.cpp" -#include "taglib\flac\flacproperties.cpp" +#include "flac\flacfile.cpp" +#include "flac\flacmetadatablock.cpp" +#include "flac\flacpicture.cpp" +#include "flac\flacunknownmetadatablock.cpp" +#include "flac\flacproperties.cpp" #pragma warning(pop) diff --git a/Plugins/PluginNowPlaying/TagLibUnity_mp4.cpp b/Library/taglib/TagLibUnity_mp4.cpp similarity index 73% rename from Plugins/PluginNowPlaying/TagLibUnity_mp4.cpp rename to Library/taglib/TagLibUnity_mp4.cpp index 72275ead6..0e58645c3 100644 --- a/Plugins/PluginNowPlaying/TagLibUnity_mp4.cpp +++ b/Library/taglib/TagLibUnity_mp4.cpp @@ -11,11 +11,11 @@ #pragma warning(push) #pragma warning(disable: 4244; disable: 4267) -#include "taglib\mp4\mp4atom.cpp" -#include "taglib\mp4\mp4coverart.cpp" -#include "taglib\mp4\mp4file.cpp" -#include "taglib\mp4\mp4item.cpp" -#include "taglib\mp4\mp4properties.cpp" -#include "taglib\mp4\mp4tag.cpp" +#include "mp4\mp4atom.cpp" +#include "mp4\mp4coverart.cpp" +#include "mp4\mp4file.cpp" +#include "mp4\mp4item.cpp" +#include "mp4\mp4properties.cpp" +#include "mp4\mp4tag.cpp" #pragma warning(pop) diff --git a/Plugins/PluginNowPlaying/TagLibUnity_mpeg.cpp b/Library/taglib/TagLibUnity_mpeg.cpp similarity index 71% rename from Plugins/PluginNowPlaying/TagLibUnity_mpeg.cpp rename to Library/taglib/TagLibUnity_mpeg.cpp index f15a27127..d53922d18 100644 --- a/Plugins/PluginNowPlaying/TagLibUnity_mpeg.cpp +++ b/Library/taglib/TagLibUnity_mpeg.cpp @@ -11,12 +11,12 @@ #pragma warning(push) #pragma warning(disable: 4244; disable: 4267) -#include "taglib\mpeg\mpegfile.cpp" -#include "taglib\mpeg\mpegheader.cpp" -#include "taglib\mpeg\mpegproperties.cpp" -#include "taglib\mpeg\xingheader.cpp" +#include "mpeg\mpegfile.cpp" +#include "mpeg\mpegheader.cpp" +#include "mpeg\mpegproperties.cpp" +#include "mpeg\xingheader.cpp" -#include "taglib\mpeg\id3v1\id3v1genres.cpp" -#include "taglib\mpeg\id3v1\id3v1tag.cpp" +#include "mpeg\id3v1\id3v1genres.cpp" +#include "mpeg\id3v1\id3v1tag.cpp" #pragma warning(pop) diff --git a/Library/taglib/TagLibUnity_mpeg_id3v2.cpp b/Library/taglib/TagLibUnity_mpeg_id3v2.cpp new file mode 100644 index 000000000..acfc1d2cb --- /dev/null +++ b/Library/taglib/TagLibUnity_mpeg_id3v2.cpp @@ -0,0 +1,34 @@ +/* Copyright (C) 2014 Rainmeter Project Developers + * + * This Source Code Form is subject to the terms of the GNU General Public + * License; either version 2 of the License, or (at your option) any later + * version. If a copy of the GPL was not distributed with this file, You can + * obtain one at . */ + +// TagLib unity build: This file includes several TagLib source files. By compiling all of them +// together, the build performance is greatly increased. + +#pragma warning(push) +#pragma warning(disable: 4244; disable: 4267) + +#include "mpeg\id3v2\frames\attachedpictureframe.cpp" +#include "mpeg\id3v2\frames\commentsframe.cpp" +#include "mpeg\id3v2\frames\generalencapsulatedobjectframe.cpp" +#include "mpeg\id3v2\frames\ownershipframe.cpp" +#include "mpeg\id3v2\frames\popularimeterframe.cpp" +#include "mpeg\id3v2\frames\privateframe.cpp" +#include "mpeg\id3v2\frames\relativevolumeframe.cpp" +#include "mpeg\id3v2\frames\textidentificationframe.cpp" +#include "mpeg\id3v2\frames\uniquefileidentifierframe.cpp" +#include "mpeg\id3v2\frames\unknownframe.cpp" +#include "mpeg\id3v2\frames\unsynchronizedlyricsframe.cpp" +#include "mpeg\id3v2\frames\urllinkframe.cpp" +#include "mpeg\id3v2\id3v2extendedheader.cpp" +#include "mpeg\id3v2\id3v2footer.cpp" +#include "mpeg\id3v2\id3v2frame.cpp" +#include "mpeg\id3v2\id3v2framefactory.cpp" +#include "mpeg\id3v2\id3v2header.cpp" +#include "mpeg\id3v2\id3v2synchdata.cpp" +#include "mpeg\id3v2\id3v2tag.cpp" + +#pragma warning(pop) diff --git a/Plugins/PluginNowPlaying/TagLibUnity_ogg.cpp b/Library/taglib/TagLibUnity_ogg.cpp similarity index 67% rename from Plugins/PluginNowPlaying/TagLibUnity_ogg.cpp rename to Library/taglib/TagLibUnity_ogg.cpp index 54277a7fb..17d9c1224 100644 --- a/Plugins/PluginNowPlaying/TagLibUnity_ogg.cpp +++ b/Library/taglib/TagLibUnity_ogg.cpp @@ -11,12 +11,12 @@ #pragma warning(push) #pragma warning(disable: 4244; disable: 4267) -#include "taglib\ogg\flac\oggflacfile.cpp" -#include "taglib\ogg\oggfile.cpp" -#include "taglib\ogg\oggpage.cpp" -#include "taglib\ogg\oggpageheader.cpp" -#include "taglib\ogg\vorbis\vorbisfile.cpp" -#include "taglib\ogg\vorbis\vorbisproperties.cpp" -#include "taglib\ogg\xiphcomment.cpp" +#include "ogg\flac\oggflacfile.cpp" +#include "ogg\oggfile.cpp" +#include "ogg\oggpage.cpp" +#include "ogg\oggpageheader.cpp" +#include "ogg\vorbis\vorbisfile.cpp" +#include "ogg\vorbis\vorbisproperties.cpp" +#include "ogg\xiphcomment.cpp" #pragma warning(pop) diff --git a/Plugins/PluginNowPlaying/TagLibUnity_toolkit.cpp b/Library/taglib/TagLibUnity_toolkit.cpp similarity index 54% rename from Plugins/PluginNowPlaying/TagLibUnity_toolkit.cpp rename to Library/taglib/TagLibUnity_toolkit.cpp index e635d8b0c..fca1f73ea 100644 --- a/Plugins/PluginNowPlaying/TagLibUnity_toolkit.cpp +++ b/Library/taglib/TagLibUnity_toolkit.cpp @@ -11,24 +11,24 @@ // The following includes have been commented out and are compiled separately due to e.g. // mismatching symbols. /* -#include "taglib\mpeg\id3v2\id3v2tag.cpp" -#include "taglib\toolkit\tfile.cpp" +#include "mpeg\id3v2\id3v2tag.cpp" +#include "toolkit\tfile.cpp" */ #pragma warning(push) #pragma warning(disable: 4244; disable: 4267) -#include "taglib\toolkit\tbytevector.cpp" -#include "taglib\toolkit\tbytevectorlist.cpp" -#include "taglib\toolkit\tbytevectorstream.cpp" -#include "taglib\toolkit\tdebug.cpp" -#include "taglib\toolkit\tdebuglistener.cpp" -#include "taglib\toolkit\tfilestream.cpp" -#include "taglib\toolkit\tiostream.cpp" -#include "taglib\toolkit\tpropertymap.cpp" -#include "taglib\toolkit\trefcounter.cpp" -#include "taglib\toolkit\tstring.cpp" -#include "taglib\toolkit\tstringlist.cpp" -#include "taglib\toolkit\unicode.cpp" +#include "toolkit\tbytevector.cpp" +#include "toolkit\tbytevectorlist.cpp" +#include "toolkit\tbytevectorstream.cpp" +#include "toolkit\tdebug.cpp" +#include "toolkit\tdebuglistener.cpp" +#include "toolkit\tfilestream.cpp" +#include "toolkit\tiostream.cpp" +#include "toolkit\tpropertymap.cpp" +#include "toolkit\trefcounter.cpp" +#include "toolkit\tstring.cpp" +#include "toolkit\tstringlist.cpp" +#include "toolkit\unicode.cpp" #pragma warning(pop) diff --git a/Plugins/PluginNowPlaying/taglib/ape/ape-tag-format.txt b/Library/taglib/ape/ape-tag-format.txt similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/ape-tag-format.txt rename to Library/taglib/ape/ape-tag-format.txt diff --git a/Plugins/PluginNowPlaying/taglib/ape/apefile.cpp b/Library/taglib/ape/apefile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apefile.cpp rename to Library/taglib/ape/apefile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ape/apefile.h b/Library/taglib/ape/apefile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apefile.h rename to Library/taglib/ape/apefile.h diff --git a/Plugins/PluginNowPlaying/taglib/ape/apefooter.cpp b/Library/taglib/ape/apefooter.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apefooter.cpp rename to Library/taglib/ape/apefooter.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ape/apefooter.h b/Library/taglib/ape/apefooter.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apefooter.h rename to Library/taglib/ape/apefooter.h diff --git a/Plugins/PluginNowPlaying/taglib/ape/apeitem.cpp b/Library/taglib/ape/apeitem.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apeitem.cpp rename to Library/taglib/ape/apeitem.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ape/apeitem.h b/Library/taglib/ape/apeitem.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apeitem.h rename to Library/taglib/ape/apeitem.h diff --git a/Plugins/PluginNowPlaying/taglib/ape/apeproperties.cpp b/Library/taglib/ape/apeproperties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apeproperties.cpp rename to Library/taglib/ape/apeproperties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ape/apeproperties.h b/Library/taglib/ape/apeproperties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apeproperties.h rename to Library/taglib/ape/apeproperties.h diff --git a/Plugins/PluginNowPlaying/taglib/ape/apetag.cpp b/Library/taglib/ape/apetag.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apetag.cpp rename to Library/taglib/ape/apetag.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ape/apetag.h b/Library/taglib/ape/apetag.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ape/apetag.h rename to Library/taglib/ape/apetag.h diff --git a/Plugins/PluginNowPlaying/taglib/asf/asfattribute.cpp b/Library/taglib/asf/asfattribute.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asfattribute.cpp rename to Library/taglib/asf/asfattribute.cpp diff --git a/Plugins/PluginNowPlaying/taglib/asf/asfattribute.h b/Library/taglib/asf/asfattribute.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asfattribute.h rename to Library/taglib/asf/asfattribute.h diff --git a/Plugins/PluginNowPlaying/taglib/asf/asffile.cpp b/Library/taglib/asf/asffile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asffile.cpp rename to Library/taglib/asf/asffile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/asf/asffile.h b/Library/taglib/asf/asffile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asffile.h rename to Library/taglib/asf/asffile.h diff --git a/Plugins/PluginNowPlaying/taglib/asf/asfpicture.cpp b/Library/taglib/asf/asfpicture.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asfpicture.cpp rename to Library/taglib/asf/asfpicture.cpp diff --git a/Plugins/PluginNowPlaying/taglib/asf/asfpicture.h b/Library/taglib/asf/asfpicture.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asfpicture.h rename to Library/taglib/asf/asfpicture.h diff --git a/Plugins/PluginNowPlaying/taglib/asf/asfproperties.cpp b/Library/taglib/asf/asfproperties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asfproperties.cpp rename to Library/taglib/asf/asfproperties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/asf/asfproperties.h b/Library/taglib/asf/asfproperties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asfproperties.h rename to Library/taglib/asf/asfproperties.h diff --git a/Plugins/PluginNowPlaying/taglib/asf/asftag.cpp b/Library/taglib/asf/asftag.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asftag.cpp rename to Library/taglib/asf/asftag.cpp diff --git a/Plugins/PluginNowPlaying/taglib/asf/asftag.h b/Library/taglib/asf/asftag.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/asf/asftag.h rename to Library/taglib/asf/asftag.h diff --git a/Plugins/PluginNowPlaying/taglib/audioproperties.cpp b/Library/taglib/audioproperties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/audioproperties.cpp rename to Library/taglib/audioproperties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/audioproperties.h b/Library/taglib/audioproperties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/audioproperties.h rename to Library/taglib/audioproperties.h diff --git a/Plugins/PluginNowPlaying/taglib/fileref.cpp b/Library/taglib/fileref.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/fileref.cpp rename to Library/taglib/fileref.cpp diff --git a/Plugins/PluginNowPlaying/taglib/fileref.h b/Library/taglib/fileref.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/fileref.h rename to Library/taglib/fileref.h diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacfile.cpp b/Library/taglib/flac/flacfile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacfile.cpp rename to Library/taglib/flac/flacfile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacfile.h b/Library/taglib/flac/flacfile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacfile.h rename to Library/taglib/flac/flacfile.h diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacmetadatablock.cpp b/Library/taglib/flac/flacmetadatablock.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacmetadatablock.cpp rename to Library/taglib/flac/flacmetadatablock.cpp diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacmetadatablock.h b/Library/taglib/flac/flacmetadatablock.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacmetadatablock.h rename to Library/taglib/flac/flacmetadatablock.h diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacpicture.cpp b/Library/taglib/flac/flacpicture.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacpicture.cpp rename to Library/taglib/flac/flacpicture.cpp diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacpicture.h b/Library/taglib/flac/flacpicture.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacpicture.h rename to Library/taglib/flac/flacpicture.h diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacproperties.cpp b/Library/taglib/flac/flacproperties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacproperties.cpp rename to Library/taglib/flac/flacproperties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacproperties.h b/Library/taglib/flac/flacproperties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacproperties.h rename to Library/taglib/flac/flacproperties.h diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacunknownmetadatablock.cpp b/Library/taglib/flac/flacunknownmetadatablock.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacunknownmetadatablock.cpp rename to Library/taglib/flac/flacunknownmetadatablock.cpp diff --git a/Plugins/PluginNowPlaying/taglib/flac/flacunknownmetadatablock.h b/Library/taglib/flac/flacunknownmetadatablock.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/flac/flacunknownmetadatablock.h rename to Library/taglib/flac/flacunknownmetadatablock.h diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4atom.cpp b/Library/taglib/mp4/mp4atom.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4atom.cpp rename to Library/taglib/mp4/mp4atom.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4atom.h b/Library/taglib/mp4/mp4atom.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4atom.h rename to Library/taglib/mp4/mp4atom.h diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4coverart.cpp b/Library/taglib/mp4/mp4coverart.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4coverart.cpp rename to Library/taglib/mp4/mp4coverart.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4coverart.h b/Library/taglib/mp4/mp4coverart.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4coverart.h rename to Library/taglib/mp4/mp4coverart.h diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4file.cpp b/Library/taglib/mp4/mp4file.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4file.cpp rename to Library/taglib/mp4/mp4file.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4file.h b/Library/taglib/mp4/mp4file.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4file.h rename to Library/taglib/mp4/mp4file.h diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4item.cpp b/Library/taglib/mp4/mp4item.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4item.cpp rename to Library/taglib/mp4/mp4item.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4item.h b/Library/taglib/mp4/mp4item.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4item.h rename to Library/taglib/mp4/mp4item.h diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4properties.cpp b/Library/taglib/mp4/mp4properties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4properties.cpp rename to Library/taglib/mp4/mp4properties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4properties.h b/Library/taglib/mp4/mp4properties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4properties.h rename to Library/taglib/mp4/mp4properties.h diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4tag.cpp b/Library/taglib/mp4/mp4tag.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4tag.cpp rename to Library/taglib/mp4/mp4tag.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mp4/mp4tag.h b/Library/taglib/mp4/mp4tag.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mp4/mp4tag.h rename to Library/taglib/mp4/mp4tag.h diff --git a/Plugins/PluginNowPlaying/taglib/mpc/mpcfile.cpp b/Library/taglib/mpc/mpcfile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpc/mpcfile.cpp rename to Library/taglib/mpc/mpcfile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpc/mpcfile.h b/Library/taglib/mpc/mpcfile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpc/mpcfile.h rename to Library/taglib/mpc/mpcfile.h diff --git a/Plugins/PluginNowPlaying/taglib/mpc/mpcproperties.cpp b/Library/taglib/mpc/mpcproperties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpc/mpcproperties.cpp rename to Library/taglib/mpc/mpcproperties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpc/mpcproperties.h b/Library/taglib/mpc/mpcproperties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpc/mpcproperties.h rename to Library/taglib/mpc/mpcproperties.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v1/id3v1genres.cpp b/Library/taglib/mpeg/id3v1/id3v1genres.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v1/id3v1genres.cpp rename to Library/taglib/mpeg/id3v1/id3v1genres.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v1/id3v1genres.h b/Library/taglib/mpeg/id3v1/id3v1genres.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v1/id3v1genres.h rename to Library/taglib/mpeg/id3v1/id3v1genres.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v1/id3v1tag.cpp b/Library/taglib/mpeg/id3v1/id3v1tag.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v1/id3v1tag.cpp rename to Library/taglib/mpeg/id3v1/id3v1tag.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v1/id3v1tag.h b/Library/taglib/mpeg/id3v1/id3v1tag.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v1/id3v1tag.h rename to Library/taglib/mpeg/id3v1/id3v1tag.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp b/Library/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp rename to Library/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/attachedpictureframe.h b/Library/taglib/mpeg/id3v2/frames/attachedpictureframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/attachedpictureframe.h rename to Library/taglib/mpeg/id3v2/frames/attachedpictureframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/commentsframe.cpp b/Library/taglib/mpeg/id3v2/frames/commentsframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/commentsframe.cpp rename to Library/taglib/mpeg/id3v2/frames/commentsframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/commentsframe.h b/Library/taglib/mpeg/id3v2/frames/commentsframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/commentsframe.h rename to Library/taglib/mpeg/id3v2/frames/commentsframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp b/Library/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp rename to Library/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h b/Library/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h rename to Library/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/ownershipframe.cpp b/Library/taglib/mpeg/id3v2/frames/ownershipframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/ownershipframe.cpp rename to Library/taglib/mpeg/id3v2/frames/ownershipframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/ownershipframe.h b/Library/taglib/mpeg/id3v2/frames/ownershipframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/ownershipframe.h rename to Library/taglib/mpeg/id3v2/frames/ownershipframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/popularimeterframe.cpp b/Library/taglib/mpeg/id3v2/frames/popularimeterframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/popularimeterframe.cpp rename to Library/taglib/mpeg/id3v2/frames/popularimeterframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/popularimeterframe.h b/Library/taglib/mpeg/id3v2/frames/popularimeterframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/popularimeterframe.h rename to Library/taglib/mpeg/id3v2/frames/popularimeterframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/privateframe.cpp b/Library/taglib/mpeg/id3v2/frames/privateframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/privateframe.cpp rename to Library/taglib/mpeg/id3v2/frames/privateframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/privateframe.h b/Library/taglib/mpeg/id3v2/frames/privateframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/privateframe.h rename to Library/taglib/mpeg/id3v2/frames/privateframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp b/Library/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp rename to Library/taglib/mpeg/id3v2/frames/relativevolumeframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/relativevolumeframe.h b/Library/taglib/mpeg/id3v2/frames/relativevolumeframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/relativevolumeframe.h rename to Library/taglib/mpeg/id3v2/frames/relativevolumeframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/textidentificationframe.cpp b/Library/taglib/mpeg/id3v2/frames/textidentificationframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/textidentificationframe.cpp rename to Library/taglib/mpeg/id3v2/frames/textidentificationframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/textidentificationframe.h b/Library/taglib/mpeg/id3v2/frames/textidentificationframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/textidentificationframe.h rename to Library/taglib/mpeg/id3v2/frames/textidentificationframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp b/Library/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp rename to Library/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h b/Library/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h rename to Library/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/unknownframe.cpp b/Library/taglib/mpeg/id3v2/frames/unknownframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/unknownframe.cpp rename to Library/taglib/mpeg/id3v2/frames/unknownframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/unknownframe.h b/Library/taglib/mpeg/id3v2/frames/unknownframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/unknownframe.h rename to Library/taglib/mpeg/id3v2/frames/unknownframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp b/Library/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp rename to Library/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h b/Library/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h rename to Library/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/urllinkframe.cpp b/Library/taglib/mpeg/id3v2/frames/urllinkframe.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/urllinkframe.cpp rename to Library/taglib/mpeg/id3v2/frames/urllinkframe.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/urllinkframe.h b/Library/taglib/mpeg/id3v2/frames/urllinkframe.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/frames/urllinkframe.h rename to Library/taglib/mpeg/id3v2/frames/urllinkframe.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2.2.0.txt b/Library/taglib/mpeg/id3v2/id3v2.2.0.txt similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2.2.0.txt rename to Library/taglib/mpeg/id3v2/id3v2.2.0.txt diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2.3.0.txt b/Library/taglib/mpeg/id3v2/id3v2.3.0.txt similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2.3.0.txt rename to Library/taglib/mpeg/id3v2/id3v2.3.0.txt diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2.4.0-frames.txt b/Library/taglib/mpeg/id3v2/id3v2.4.0-frames.txt similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2.4.0-frames.txt rename to Library/taglib/mpeg/id3v2/id3v2.4.0-frames.txt diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2.4.0-structure.txt b/Library/taglib/mpeg/id3v2/id3v2.4.0-structure.txt similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2.4.0-structure.txt rename to Library/taglib/mpeg/id3v2/id3v2.4.0-structure.txt diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2extendedheader.cpp b/Library/taglib/mpeg/id3v2/id3v2extendedheader.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2extendedheader.cpp rename to Library/taglib/mpeg/id3v2/id3v2extendedheader.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2extendedheader.h b/Library/taglib/mpeg/id3v2/id3v2extendedheader.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2extendedheader.h rename to Library/taglib/mpeg/id3v2/id3v2extendedheader.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2footer.cpp b/Library/taglib/mpeg/id3v2/id3v2footer.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2footer.cpp rename to Library/taglib/mpeg/id3v2/id3v2footer.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2footer.h b/Library/taglib/mpeg/id3v2/id3v2footer.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2footer.h rename to Library/taglib/mpeg/id3v2/id3v2footer.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2frame.cpp b/Library/taglib/mpeg/id3v2/id3v2frame.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2frame.cpp rename to Library/taglib/mpeg/id3v2/id3v2frame.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2frame.h b/Library/taglib/mpeg/id3v2/id3v2frame.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2frame.h rename to Library/taglib/mpeg/id3v2/id3v2frame.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2framefactory.cpp b/Library/taglib/mpeg/id3v2/id3v2framefactory.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2framefactory.cpp rename to Library/taglib/mpeg/id3v2/id3v2framefactory.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2framefactory.h b/Library/taglib/mpeg/id3v2/id3v2framefactory.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2framefactory.h rename to Library/taglib/mpeg/id3v2/id3v2framefactory.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2header.cpp b/Library/taglib/mpeg/id3v2/id3v2header.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2header.cpp rename to Library/taglib/mpeg/id3v2/id3v2header.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2header.h b/Library/taglib/mpeg/id3v2/id3v2header.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2header.h rename to Library/taglib/mpeg/id3v2/id3v2header.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2synchdata.cpp b/Library/taglib/mpeg/id3v2/id3v2synchdata.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2synchdata.cpp rename to Library/taglib/mpeg/id3v2/id3v2synchdata.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2synchdata.h b/Library/taglib/mpeg/id3v2/id3v2synchdata.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2synchdata.h rename to Library/taglib/mpeg/id3v2/id3v2synchdata.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2tag.cpp b/Library/taglib/mpeg/id3v2/id3v2tag.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2tag.cpp rename to Library/taglib/mpeg/id3v2/id3v2tag.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2tag.h b/Library/taglib/mpeg/id3v2/id3v2tag.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/id3v2/id3v2tag.h rename to Library/taglib/mpeg/id3v2/id3v2tag.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/mpegfile.cpp b/Library/taglib/mpeg/mpegfile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/mpegfile.cpp rename to Library/taglib/mpeg/mpegfile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/mpegfile.h b/Library/taglib/mpeg/mpegfile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/mpegfile.h rename to Library/taglib/mpeg/mpegfile.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/mpegheader.cpp b/Library/taglib/mpeg/mpegheader.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/mpegheader.cpp rename to Library/taglib/mpeg/mpegheader.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/mpegheader.h b/Library/taglib/mpeg/mpegheader.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/mpegheader.h rename to Library/taglib/mpeg/mpegheader.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/mpegproperties.cpp b/Library/taglib/mpeg/mpegproperties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/mpegproperties.cpp rename to Library/taglib/mpeg/mpegproperties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/mpegproperties.h b/Library/taglib/mpeg/mpegproperties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/mpegproperties.h rename to Library/taglib/mpeg/mpegproperties.h diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/xingheader.cpp b/Library/taglib/mpeg/xingheader.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/xingheader.cpp rename to Library/taglib/mpeg/xingheader.cpp diff --git a/Plugins/PluginNowPlaying/taglib/mpeg/xingheader.h b/Library/taglib/mpeg/xingheader.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/mpeg/xingheader.h rename to Library/taglib/mpeg/xingheader.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/flac/oggflacfile.cpp b/Library/taglib/ogg/flac/oggflacfile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/flac/oggflacfile.cpp rename to Library/taglib/ogg/flac/oggflacfile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/flac/oggflacfile.h b/Library/taglib/ogg/flac/oggflacfile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/flac/oggflacfile.h rename to Library/taglib/ogg/flac/oggflacfile.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/oggfile.cpp b/Library/taglib/ogg/oggfile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/oggfile.cpp rename to Library/taglib/ogg/oggfile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/oggfile.h b/Library/taglib/ogg/oggfile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/oggfile.h rename to Library/taglib/ogg/oggfile.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/oggpage.cpp b/Library/taglib/ogg/oggpage.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/oggpage.cpp rename to Library/taglib/ogg/oggpage.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/oggpage.h b/Library/taglib/ogg/oggpage.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/oggpage.h rename to Library/taglib/ogg/oggpage.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/oggpageheader.cpp b/Library/taglib/ogg/oggpageheader.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/oggpageheader.cpp rename to Library/taglib/ogg/oggpageheader.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/oggpageheader.h b/Library/taglib/ogg/oggpageheader.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/oggpageheader.h rename to Library/taglib/ogg/oggpageheader.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/speex/speexfile.cpp b/Library/taglib/ogg/speex/speexfile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/speex/speexfile.cpp rename to Library/taglib/ogg/speex/speexfile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/speex/speexfile.h b/Library/taglib/ogg/speex/speexfile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/speex/speexfile.h rename to Library/taglib/ogg/speex/speexfile.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/speex/speexproperties.cpp b/Library/taglib/ogg/speex/speexproperties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/speex/speexproperties.cpp rename to Library/taglib/ogg/speex/speexproperties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/speex/speexproperties.h b/Library/taglib/ogg/speex/speexproperties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/speex/speexproperties.h rename to Library/taglib/ogg/speex/speexproperties.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/vorbis/vorbisfile.cpp b/Library/taglib/ogg/vorbis/vorbisfile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/vorbis/vorbisfile.cpp rename to Library/taglib/ogg/vorbis/vorbisfile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/vorbis/vorbisfile.h b/Library/taglib/ogg/vorbis/vorbisfile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/vorbis/vorbisfile.h rename to Library/taglib/ogg/vorbis/vorbisfile.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/vorbis/vorbisproperties.cpp b/Library/taglib/ogg/vorbis/vorbisproperties.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/vorbis/vorbisproperties.cpp rename to Library/taglib/ogg/vorbis/vorbisproperties.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/vorbis/vorbisproperties.h b/Library/taglib/ogg/vorbis/vorbisproperties.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/vorbis/vorbisproperties.h rename to Library/taglib/ogg/vorbis/vorbisproperties.h diff --git a/Plugins/PluginNowPlaying/taglib/ogg/xiphcomment.cpp b/Library/taglib/ogg/xiphcomment.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/xiphcomment.cpp rename to Library/taglib/ogg/xiphcomment.cpp diff --git a/Plugins/PluginNowPlaying/taglib/ogg/xiphcomment.h b/Library/taglib/ogg/xiphcomment.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/ogg/xiphcomment.h rename to Library/taglib/ogg/xiphcomment.h diff --git a/Plugins/PluginNowPlaying/taglib/tag.cpp b/Library/taglib/tag.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/tag.cpp rename to Library/taglib/tag.cpp diff --git a/Plugins/PluginNowPlaying/taglib/tag.h b/Library/taglib/tag.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/tag.h rename to Library/taglib/tag.h diff --git a/Plugins/PluginNowPlaying/taglib/taglib_config.h b/Library/taglib/taglib_config.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/taglib_config.h rename to Library/taglib/taglib_config.h diff --git a/Plugins/PluginNowPlaying/taglib/taglib_export.h b/Library/taglib/taglib_export.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/taglib_export.h rename to Library/taglib/taglib_export.h diff --git a/Plugins/PluginNowPlaying/taglib/tagunion.cpp b/Library/taglib/tagunion.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/tagunion.cpp rename to Library/taglib/tagunion.cpp diff --git a/Plugins/PluginNowPlaying/taglib/tagunion.h b/Library/taglib/tagunion.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/tagunion.h rename to Library/taglib/tagunion.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/taglib.h b/Library/taglib/toolkit/taglib.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/taglib.h rename to Library/taglib/toolkit/taglib.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tbytevector.cpp b/Library/taglib/toolkit/tbytevector.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tbytevector.cpp rename to Library/taglib/toolkit/tbytevector.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tbytevector.h b/Library/taglib/toolkit/tbytevector.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tbytevector.h rename to Library/taglib/toolkit/tbytevector.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tbytevectorlist.cpp b/Library/taglib/toolkit/tbytevectorlist.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tbytevectorlist.cpp rename to Library/taglib/toolkit/tbytevectorlist.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tbytevectorlist.h b/Library/taglib/toolkit/tbytevectorlist.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tbytevectorlist.h rename to Library/taglib/toolkit/tbytevectorlist.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tbytevectorstream.cpp b/Library/taglib/toolkit/tbytevectorstream.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tbytevectorstream.cpp rename to Library/taglib/toolkit/tbytevectorstream.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tbytevectorstream.h b/Library/taglib/toolkit/tbytevectorstream.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tbytevectorstream.h rename to Library/taglib/toolkit/tbytevectorstream.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tdebug.cpp b/Library/taglib/toolkit/tdebug.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tdebug.cpp rename to Library/taglib/toolkit/tdebug.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tdebug.h b/Library/taglib/toolkit/tdebug.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tdebug.h rename to Library/taglib/toolkit/tdebug.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tdebuglistener.cpp b/Library/taglib/toolkit/tdebuglistener.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tdebuglistener.cpp rename to Library/taglib/toolkit/tdebuglistener.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tdebuglistener.h b/Library/taglib/toolkit/tdebuglistener.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tdebuglistener.h rename to Library/taglib/toolkit/tdebuglistener.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tfile.cpp b/Library/taglib/toolkit/tfile.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tfile.cpp rename to Library/taglib/toolkit/tfile.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tfile.h b/Library/taglib/toolkit/tfile.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tfile.h rename to Library/taglib/toolkit/tfile.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tfilestream.cpp b/Library/taglib/toolkit/tfilestream.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tfilestream.cpp rename to Library/taglib/toolkit/tfilestream.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tfilestream.h b/Library/taglib/toolkit/tfilestream.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tfilestream.h rename to Library/taglib/toolkit/tfilestream.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tiostream.cpp b/Library/taglib/toolkit/tiostream.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tiostream.cpp rename to Library/taglib/toolkit/tiostream.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tiostream.h b/Library/taglib/toolkit/tiostream.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tiostream.h rename to Library/taglib/toolkit/tiostream.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tlist.h b/Library/taglib/toolkit/tlist.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tlist.h rename to Library/taglib/toolkit/tlist.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tlist.tcc b/Library/taglib/toolkit/tlist.tcc similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tlist.tcc rename to Library/taglib/toolkit/tlist.tcc diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tmap.h b/Library/taglib/toolkit/tmap.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tmap.h rename to Library/taglib/toolkit/tmap.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tmap.tcc b/Library/taglib/toolkit/tmap.tcc similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tmap.tcc rename to Library/taglib/toolkit/tmap.tcc diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tpropertymap.cpp b/Library/taglib/toolkit/tpropertymap.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tpropertymap.cpp rename to Library/taglib/toolkit/tpropertymap.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tpropertymap.h b/Library/taglib/toolkit/tpropertymap.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tpropertymap.h rename to Library/taglib/toolkit/tpropertymap.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/trefcounter.cpp b/Library/taglib/toolkit/trefcounter.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/trefcounter.cpp rename to Library/taglib/toolkit/trefcounter.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/trefcounter.h b/Library/taglib/toolkit/trefcounter.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/trefcounter.h rename to Library/taglib/toolkit/trefcounter.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tstring.cpp b/Library/taglib/toolkit/tstring.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tstring.cpp rename to Library/taglib/toolkit/tstring.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tstring.h b/Library/taglib/toolkit/tstring.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tstring.h rename to Library/taglib/toolkit/tstring.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tstringlist.cpp b/Library/taglib/toolkit/tstringlist.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tstringlist.cpp rename to Library/taglib/toolkit/tstringlist.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tstringlist.h b/Library/taglib/toolkit/tstringlist.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tstringlist.h rename to Library/taglib/toolkit/tstringlist.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/tutils.h b/Library/taglib/toolkit/tutils.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/tutils.h rename to Library/taglib/toolkit/tutils.h diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/unicode.cpp b/Library/taglib/toolkit/unicode.cpp similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/unicode.cpp rename to Library/taglib/toolkit/unicode.cpp diff --git a/Plugins/PluginNowPlaying/taglib/toolkit/unicode.h b/Library/taglib/toolkit/unicode.h similarity index 100% rename from Plugins/PluginNowPlaying/taglib/toolkit/unicode.h rename to Library/taglib/toolkit/unicode.h diff --git a/Plugins/PluginNowPlaying/NowPlaying.cpp b/Plugins/PluginNowPlaying/NowPlaying.cpp deleted file mode 100644 index 14ab03c04..000000000 --- a/Plugins/PluginNowPlaying/NowPlaying.cpp +++ /dev/null @@ -1,613 +0,0 @@ -/* Copyright (C) 2011 Rainmeter Project Developers - * - * This Source Code Form is subject to the terms of the GNU General Public - * License; either version 2 of the License, or (at your option) any later - * version. If a copy of the GPL was not distributed with this file, You can - * obtain one at . */ - -#include "StdAfx.h" -#include "NowPlaying.h" -#include "Internet.h" -#include "PlayerAIMP.h" -#include "PlayerCAD.h" -#include "PlayerITunes.h" -#include "PlayerSpotify.h" -#include "PlayerWinamp.h" -#include "PlayerWLM.h" -#include "PlayerWMP.h" - -static std::vector g_ParentMeasures; -bool g_Initialized = false; -HINSTANCE g_Instance = nullptr; - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - g_Instance = hinstDLL; - - // Disable DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls - DisableThreadLibraryCalls(hinstDLL); - break; - } - - return TRUE; -} - -PLUGIN_EXPORT void Initialize(void** data, void* rm) -{ - Measure* measure = new Measure; - *data = measure; - - if (!g_Initialized) - { - Internet::Initialize(); - g_Initialized = true; - } -} - -PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue) -{ - Measure* measure = (Measure*)data; - - // Data is stored in two structs: Measure and ParentMeasure. ParentMeasure is created for measures - // with PlayerName=someplayer. Measure is created for all measures and points to ParentMeasure as - // referenced in PlayerName=[section]. - - // Read settings from the ini-file - void* skin = RmGetSkin(rm); - LPCWSTR str = RmReadString(rm, L"PlayerName", L"", FALSE); - if (str[0] == L'[') - { - if (measure->parent) - { - // Don't let a measure measure change its parent - } - else - { - // PlayerName starts with [ so use referenced section - ++str; - size_t len = wcslen(str); - if (len > 0 && str[len - 1] == L']') - { - --len; - - std::vector::iterator iter = g_ParentMeasures.begin(); - for ( ; iter != g_ParentMeasures.end(); ++iter) - { - if (skin == (*iter)->skin && - _wcsnicmp(str, (*iter)->ownerName, len) == 0) - { - // Use same ParentMeasure as referenced section - measure->parent = (*iter); - ++measure->parent->measureCount; - - break; - } - } - - if (!measure->parent) - { - // The referenced section doesn't exist - std::wstring error = L"NowPlaying.dll: Invalid PlayerName="; - error.append(str - 1, len + 2); - error += L" in ["; - error += RmGetMeasureName(rm); - error += L"]"; - RmLog(LOG_WARNING, error.c_str()); - return; - } - } - } - } - else - { - // ParentMeasure is created when PlayerName is an actual player (and not a reference) - ParentMeasure* parent = measure->parent; - Player* oldPlayer = nullptr; - if (parent) - { - if (parent->data != data) - { - // Don't let a measure-only measure become a parent measure - return; - } - - oldPlayer = parent->player; - } - else - { - parent = new ParentMeasure; - g_ParentMeasures.push_back(parent); - parent->data = data; - parent->skin = skin; - parent->ownerName = RmGetMeasureName(rm); - measure->parent = parent; - } - - if (_wcsicmp(L"AIMP", str) == 0) - { - parent->player = PlayerAIMP::Create(); - } - else if (_wcsicmp(L"CAD", str) == 0) - { - parent->player = PlayerCAD::Create(); - } - else if (_wcsicmp(L"foobar2000", str) == 0) - { - HWND fooWindow = FindWindow(L"foo_rainmeter_class", nullptr); - if (fooWindow) - { - const WCHAR* error = L"Your foobar2000 plugin is out of date.\n\nDo you want to update the plugin now?"; - if (MessageBox(nullptr, error, L"Rainmeter", MB_YESNO | MB_ICONINFORMATION | MB_TOPMOST) == IDYES) - { - ShellExecute(nullptr, L"open", L"http://github.com/poiru/foo-cad#readme", nullptr, nullptr, SW_SHOWNORMAL); - } - } - - parent->player = PlayerCAD::Create(); - } - else if (_wcsicmp(L"iTunes", str) == 0) - { - parent->player = PlayerITunes::Create(); - } - else if (_wcsicmp(L"MediaMonkey", str) == 0) - { - parent->player = PlayerWinamp::Create(WA_MEDIAMONKEY); - } - else if (_wcsicmp(L"Spotify", str) == 0) - { - parent->player = PlayerSpotify::Create(); - } - else if (_wcsicmp(L"WinAmp", str) == 0) - { - parent->player = PlayerWinamp::Create(WA_WINAMP); - } - else if (_wcsicmp(L"WMP", str) == 0) - { - parent->player = PlayerWMP::Create(); - } - else - { - // Default to WLM - parent->player = PlayerWLM::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(); - parent->playerPath = RmReadString(rm, L"PlayerPath", L""); - parent->trackChangeAction = RmReadString(rm, L"TrackChangeAction", L"", FALSE); - parent->disableLeadingZero = RmReadInt(rm, L"DisableLeadingZero", 0) != 0; - - if (oldPlayer) - { - parent->player->SetMeasures(oldPlayer->GetMeasures()); - - // Remove instance here so that player doesn't have to reinitialize if PlayerName was - // not changed. - oldPlayer->RemoveInstance(); - } - } - - str = RmReadString(rm, L"PlayerType", L""); - if (_wcsicmp(L"ARTIST", str) == 0) - { - measure->type = MEASURE_ARTIST; - } - else if (_wcsicmp(L"TITLE", str) == 0) - { - measure->type = MEASURE_TITLE; - } - else if (_wcsicmp(L"ALBUM", str) == 0) - { - measure->type = MEASURE_ALBUM; - } - else if (_wcsicmp(L"COVER", str) == 0) - { - measure->type = MEASURE_COVER; - } - else if (_wcsicmp(L"DURATION", str) == 0) - { - measure->type = MEASURE_DURATION; - } - else if (_wcsicmp(L"POSITION", str) == 0) - { - measure->type = MEASURE_POSITION; - } - else if (_wcsicmp(L"PROGRESS", str) == 0) - { - measure->type = MEASURE_PROGRESS; - *maxValue = 100.0; - } - else if (_wcsicmp(L"RATING", str) == 0) - { - measure->type = MEASURE_RATING; - *maxValue = 5.0; - } - else if (_wcsicmp(L"STATE", str) == 0) - { - measure->type = MEASURE_STATE; - } - else if (_wcsicmp(L"STATUS", str) == 0) - { - measure->type = MEASURE_STATUS; - } - else if (_wcsicmp(L"VOLUME", str) == 0) - { - measure->type = MEASURE_VOLUME; - *maxValue = 100.0; - } - else if (_wcsicmp(L"SHUFFLE", str) == 0) - { - measure->type = MEASURE_SHUFFLE; - } - else if (_wcsicmp(L"REPEAT", str) == 0) - { - measure->type = MEASURE_REPEAT; - } - else if (_wcsicmp(L"LYRICS", str) == 0) - { - RmLog(LOG_WARNING, L"NowPlaying.dll: Using undocumented PlayerType=LYRICS!"); - measure->type = MEASURE_LYRICS; - } - else if (_wcsicmp(L"FILE", str) == 0) - { - measure->type = MEASURE_FILE; - } - else if (_wcsicmp(L"NUMBER", str) == 0) - { - measure->type = MEASURE_NUMBER; - } - else if (_wcsicmp(L"YEAR", str) == 0) - { - measure->type = MEASURE_YEAR; - } - else if (_wcsicmp(L"GENRE", str) == 0) - { - measure->type = MEASURE_GENRE; - } - else - { - std::wstring error = L"NowPlaying.dll: Invalid PlayerType="; - error += str; - error += L" in ["; - error += RmGetMeasureName(rm); - error += L"]"; - RmLog(LOG_WARNING, error.c_str()); - } - - measure->parent->player->AddMeasure(measure->type); -} - -PLUGIN_EXPORT double Update(void* data) -{ - Measure* measure = (Measure*)data; - ParentMeasure* parent = measure->parent; - if (!parent) return 0.0; - - Player* player = parent->player; - - // Only allow parent measure to update - if (parent->data == data) - { - player->UpdateMeasure(); - - // Execute TrackChangeAction= if necessary - if (!parent->trackChangeAction.empty() && - parent->trackCount != player->GetTrackCount()) - { - RmExecute(parent->skin, parent->trackChangeAction.c_str()); - parent->trackCount = player->GetTrackCount(); - } - } - - switch (measure->type) - { - case MEASURE_DURATION: - return player->GetDuration(); - - case MEASURE_POSITION: - return player->GetPosition(); - - case MEASURE_PROGRESS: - if (player->GetDuration()) - { - return (player->GetPosition() * 100) / player->GetDuration(); - } - return 0.0; - - case MEASURE_RATING: - return player->GetRating(); - - case MEASURE_VOLUME: - return player->GetVolume(); - - case MEASURE_STATE: - return player->GetState(); - - case MEASURE_STATUS: - return player->IsInitialized(); - - case MEASURE_SHUFFLE: - return player->GetShuffle(); - - case MEASURE_REPEAT: - return player->GetRepeat(); - - case MEASURE_NUMBER: - return player->GetNumber(); - - case MEASURE_YEAR: - return player->GetYear(); - } - - return 0.0; -} - -PLUGIN_EXPORT LPCWSTR GetString(void* data) -{ - Measure* measure = (Measure*)data; - ParentMeasure* parent = measure->parent; - if (!parent) return nullptr; - - const Player* player = parent->player; - static WCHAR buffer[32]; - - switch (measure->type) - { - case MEASURE_ARTIST: - return player->GetArtist(); - - case MEASURE_TITLE: - return player->GetTitle(); - - case MEASURE_ALBUM: - return player->GetAlbum(); - - case MEASURE_LYRICS: - return player->GetLyrics(); - - case MEASURE_COVER: - return player->GetCoverPath(); - - case MEASURE_FILE: - return player->GetFilePath(); - - case MEASURE_DURATION: - SecondsToTime(player->GetDuration(), parent->disableLeadingZero, buffer); - return buffer; - - case MEASURE_POSITION: - SecondsToTime(player->GetPosition(), parent->disableLeadingZero, buffer); - return buffer; - - case MEASURE_PROGRESS: - _itow_s(player->GetDuration() ? ((player->GetPosition() * 100) / player->GetDuration()) : 0, buffer, 10); - return buffer; - - case MEASURE_RATING: - _itow_s(player->GetRating(), buffer, 10); - return buffer; - - case MEASURE_VOLUME: - _itow_s(player->GetVolume(), buffer, 10); - return buffer; - - case MEASURE_STATE: - _itow_s(player->GetState(), buffer, 10); - return buffer; - - case MEASURE_STATUS: - _itow_s((int)player->IsInitialized(), buffer, 10); - return buffer; - - case MEASURE_SHUFFLE: - _itow_s((int)player->GetShuffle(), buffer, 10); - return buffer; - - case MEASURE_REPEAT: - _itow_s((int)player->GetRepeat(), buffer, 10); - return buffer; - - case MEASURE_NUMBER: - _itow_s(player->GetNumber(), buffer, 10); - return buffer; - - case MEASURE_YEAR: - _itow_s(player->GetYear(), buffer, 10); - return buffer; - - case MEASURE_GENRE: - return player->GetGenre(); - } - - return nullptr; -} - -PLUGIN_EXPORT void Finalize(void* data) -{ - Measure* measure = (Measure*)data; - ParentMeasure* parent = measure->parent; - if (parent) - { - Player* player = parent->player; - if (--parent->measureCount == 0) - { - player->RemoveInstance(); - delete parent; - - std::vector::iterator iter = std::find(g_ParentMeasures.begin(), g_ParentMeasures.end(), parent); - g_ParentMeasures.erase(iter); - - if (g_ParentMeasures.empty()) - { - Internet::Finalize(); - } - } - } - - delete measure; -} - -PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args) -{ - Measure* measure = (Measure*)data; - ParentMeasure* parent = measure->parent; - if (!parent) return; - - Player* player = parent->player; - - if (!player->IsInitialized()) - { - if (_wcsicmp(args, L"OpenPlayer") == 0 || _wcsicmp(args, L"TogglePlayer") == 0) - { - player->OpenPlayer(parent->playerPath); - } - } - else if (_wcsicmp(args, L"Pause") == 0) - { - player->Pause(); - } - else if (_wcsicmp(args, L"Play") == 0) - { - player->Play(); - } - else if (_wcsicmp(args, L"PlayPause") == 0) - { - (player->GetState() != STATE_PLAYING) ? player->Play() : player->Pause(); - } - else if (_wcsicmp(args, L"Next") == 0) - { - player->Next(); - } - else if (_wcsicmp(args, L"Previous") == 0) - { - player->Previous(); - } - else if (_wcsicmp(args, L"Stop") == 0) - { - player->Stop(); - } - else if (_wcsicmp(args, L"OpenPlayer") == 0) - { - player->OpenPlayer(parent->playerPath); - } - else if (_wcsicmp(args, L"ClosePlayer") == 0 || _wcsicmp(args, L"TogglePlayer") == 0) - { - player->ClosePlayer(); - } - else - { - LPCWSTR arg = wcschr(args, L' '); - - if (arg) - { - ++arg; // Skip the space - - if (_wcsnicmp(args, L"SetPosition", 11) == 0) - { - int position = (_wtoi(arg) * (int)player->GetDuration()) / 100; - if (arg[0] == L'+' || arg[0] == L'-') - { - position += player->GetPosition(); - } - - player->SetPosition(position); - } - else if (_wcsnicmp(args, L"SetRating", 9) == 0) - { - int rating = _wtoi(arg); - if (rating >= 0 && rating <= 5) - { - player->SetRating(rating); - } - } - else if (_wcsnicmp(args, L"SetVolume", 9) == 0) - { - int volume = _wtoi(arg); - if (arg[0] == L'+' || arg[0] == L'-') - { - // Relative to current volume - volume += player->GetVolume(); - } - - if (volume < 0) - { - volume = 0; - } - else if (volume > 100) - { - volume = 100; - } - player->SetVolume(volume);; - } - else if (_wcsnicmp(args, L"SetShuffle", 9) == 0) - { - int state = _wtoi(arg); - if (state == -1) - { - player->SetShuffle(!player->GetShuffle()); - } - else if (state == 0 || state == 1) - { - player->SetShuffle(state != 0); - } - } - else if (_wcsnicmp(args, L"SetRepeat", 9) == 0) - { - int state = _wtoi(arg); - if (state == -1) - { - player->SetRepeat(!player->GetRepeat()); - } - else if (state == 0 || state == 1) - { - player->SetRepeat(state != 0); - } - } - else - { - RmLog(LOG_WARNING, L"NowPlaying.dll: Unknown args"); - } - } - else - { - RmLog(LOG_WARNING, L"NowPlaying.dll: Unknown args"); - } - } -} - -void SecondsToTime(UINT seconds, bool leadingZero, WCHAR* buffer) -{ - int hours = seconds; - int mins = seconds; - hours /= 3600; - mins %= 3600; - int secs = mins; - mins /= 60; - secs %= 60; - - if (seconds < 0) - { - hours = mins = secs = 0; - } - - if (hours) - { - _snwprintf_s(buffer, 32, _TRUNCATE, leadingZero ? L"%i:%02i:%02i" : L"%02i:%02i:%02i", hours, mins, secs); - } - else - { - _snwprintf_s(buffer, 32, _TRUNCATE, leadingZero ? L"%i:%02i" : L"%02i:%02i", mins, secs); - } -} diff --git a/Plugins/PluginNowPlaying/NowPlaying.h b/Plugins/PluginNowPlaying/NowPlaying.h deleted file mode 100644 index 725fdd488..000000000 --- a/Plugins/PluginNowPlaying/NowPlaying.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2011 Rainmeter Project Developers - * - * This Source Code Form is subject to the terms of the GNU General Public - * License; either version 2 of the License, or (at your option) any later - * version. If a copy of the GPL was not distributed with this file, You can - * obtain one at . */ - -#ifndef __NOWPLAYING_H__ -#define __NOWPLAYING_H__ - -#include "Player.h" - -struct ParentMeasure -{ - ParentMeasure() : - player(), - data(), - skin(), - ownerName(), - measureCount(1), - trackCount(0), - disableLeadingZero(false) - {} - - Player* player; - void* data; - void* skin; - LPCWSTR ownerName; - std::wstring trackChangeAction; - std::wstring playerPath; - UINT measureCount; - UINT trackCount; - bool disableLeadingZero; -}; - -struct Measure -{ - Measure() : - parent(), - type(MEASURE_NONE) - {} - - ParentMeasure* parent; - MeasureType type; -}; - -void SecondsToTime(UINT seconds, bool leadingZero, WCHAR* buffer); - -#endif diff --git a/Plugins/PluginNowPlaying/StdAfx.cpp b/Plugins/PluginNowPlaying/StdAfx.cpp deleted file mode 100644 index c799cba12..000000000 --- a/Plugins/PluginNowPlaying/StdAfx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright (C) 2010 Rainmeter Project Developers - * - * This Source Code Form is subject to the terms of the GNU General Public - * License; either version 2 of the License, or (at your option) any later - * version. If a copy of the GPL was not distributed with this file, You can - * obtain one at . */ - -#include "StdAfx.h" diff --git a/Plugins/PluginNowPlaying/StdAfx.h b/Plugins/PluginNowPlaying/StdAfx.h deleted file mode 100644 index 8e807b0ff..000000000 --- a/Plugins/PluginNowPlaying/StdAfx.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2010 Rainmeter Project Developers - * - * This Source Code Form is subject to the terms of the GNU General Public - * License; either version 2 of the License, or (at your option) any later - * version. If a copy of the GPL was not distributed with this file, You can - * obtain one at . */ - -#ifndef __STDAFX_H__ -#define __STDAFX_H__ - -// WinAPI -#include -#include -#include -#include -#include - -// STL -#include -#include - -// Runtime -#include - -// Rainmeter's exported functions -#include "../../Library/Export.h" - -#endif diff --git a/Plugins/PluginNowPlaying/TagLibUnity_mpeg_id3v2.cpp b/Plugins/PluginNowPlaying/TagLibUnity_mpeg_id3v2.cpp deleted file mode 100644 index 7e2da7485..000000000 --- a/Plugins/PluginNowPlaying/TagLibUnity_mpeg_id3v2.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2014 Rainmeter Project Developers - * - * This Source Code Form is subject to the terms of the GNU General Public - * License; either version 2 of the License, or (at your option) any later - * version. If a copy of the GPL was not distributed with this file, You can - * obtain one at . */ - -// TagLib unity build: This file includes several TagLib source files. By compiling all of them -// together, the build performance is greatly increased. - -#pragma warning(push) -#pragma warning(disable: 4244; disable: 4267) - -#include "taglib\mpeg\id3v2\frames\attachedpictureframe.cpp" -#include "taglib\mpeg\id3v2\frames\commentsframe.cpp" -#include "taglib\mpeg\id3v2\frames\generalencapsulatedobjectframe.cpp" -#include "taglib\mpeg\id3v2\frames\ownershipframe.cpp" -#include "taglib\mpeg\id3v2\frames\popularimeterframe.cpp" -#include "taglib\mpeg\id3v2\frames\privateframe.cpp" -#include "taglib\mpeg\id3v2\frames\relativevolumeframe.cpp" -#include "taglib\mpeg\id3v2\frames\textidentificationframe.cpp" -#include "taglib\mpeg\id3v2\frames\uniquefileidentifierframe.cpp" -#include "taglib\mpeg\id3v2\frames\unknownframe.cpp" -#include "taglib\mpeg\id3v2\frames\unsynchronizedlyricsframe.cpp" -#include "taglib\mpeg\id3v2\frames\urllinkframe.cpp" -#include "taglib\mpeg\id3v2\id3v2extendedheader.cpp" -#include "taglib\mpeg\id3v2\id3v2footer.cpp" -#include "taglib\mpeg\id3v2\id3v2frame.cpp" -#include "taglib\mpeg\id3v2\id3v2framefactory.cpp" -#include "taglib\mpeg\id3v2\id3v2header.cpp" -#include "taglib\mpeg\id3v2\id3v2synchdata.cpp" -#include "taglib\mpeg\id3v2\id3v2tag.cpp" - -#pragma warning(pop) diff --git a/Rainmeter.sln b/Rainmeter.sln index 51848023f..72ef29ace 100644 --- a/Rainmeter.sln +++ b/Rainmeter.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Application", "Application\Application.vcxproj", "{D2A0903C-E760-4134-AE61-3D55BF8F760C}" EndProject @@ -49,8 +49,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginInputText", "Plugins\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginiTunes", "Plugins\PluginiTunes\PluginiTunes.vcxproj", "{A2DD3CBE-B140-4892-A875-24107FA52518}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginNowPlaying", "Plugins\PluginNowPlaying\PluginNowPlaying.vcxproj", "{C7FECFCD-E6C6-4F95-BB9A-E1762B043969}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginPerfMon", "Plugins\PluginPerfMon\PluginPerfMon.vcxproj", "{5344B52B-BAC3-479C-B41D-D465B8BDA1AD}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginPing", "Plugins\PluginPing\PluginPing.vcxproj", "{C862B662-5CC6-4E79-B1B3-905E0B98D627}" @@ -153,14 +151,6 @@ Global {2D8F1DDB-6470-45A1-B95A-3E2960641314}.Release|Win32.Build.0 = Release|Win32 {2D8F1DDB-6470-45A1-B95A-3E2960641314}.Release|x64.ActiveCfg = Release|x64 {2D8F1DDB-6470-45A1-B95A-3E2960641314}.Release|x64.Build.0 = Release|x64 - {49D56CA5-54AB-45C9-A245-EAE588FCBFE1}.Debug|Win32.ActiveCfg = Debug|x86 - {49D56CA5-54AB-45C9-A245-EAE588FCBFE1}.Debug|Win32.Build.0 = Debug|x86 - {49D56CA5-54AB-45C9-A245-EAE588FCBFE1}.Debug|x64.ActiveCfg = Debug|x64 - {49D56CA5-54AB-45C9-A245-EAE588FCBFE1}.Debug|x64.Build.0 = Debug|x64 - {49D56CA5-54AB-45C9-A245-EAE588FCBFE1}.Release|Win32.ActiveCfg = Release|x86 - {49D56CA5-54AB-45C9-A245-EAE588FCBFE1}.Release|Win32.Build.0 = Release|x86 - {49D56CA5-54AB-45C9-A245-EAE588FCBFE1}.Release|x64.ActiveCfg = Release|x64 - {49D56CA5-54AB-45C9-A245-EAE588FCBFE1}.Release|x64.Build.0 = Release|x64 {EE8EC522-8430-4B46-86A3-D943D77F9E4B}.Debug|Win32.ActiveCfg = Debug|Win32 {EE8EC522-8430-4B46-86A3-D943D77F9E4B}.Debug|Win32.Build.0 = Debug|Win32 {EE8EC522-8430-4B46-86A3-D943D77F9E4B}.Debug|x64.ActiveCfg = Debug|x64 @@ -217,14 +207,6 @@ Global {A2DD3CBE-B140-4892-A875-24107FA52518}.Release|Win32.Build.0 = Release|Win32 {A2DD3CBE-B140-4892-A875-24107FA52518}.Release|x64.ActiveCfg = Release|x64 {A2DD3CBE-B140-4892-A875-24107FA52518}.Release|x64.Build.0 = Release|x64 - {C7FECFCD-E6C6-4F95-BB9A-E1762B043969}.Debug|Win32.ActiveCfg = Debug|Win32 - {C7FECFCD-E6C6-4F95-BB9A-E1762B043969}.Debug|Win32.Build.0 = Debug|Win32 - {C7FECFCD-E6C6-4F95-BB9A-E1762B043969}.Debug|x64.ActiveCfg = Debug|x64 - {C7FECFCD-E6C6-4F95-BB9A-E1762B043969}.Debug|x64.Build.0 = Debug|x64 - {C7FECFCD-E6C6-4F95-BB9A-E1762B043969}.Release|Win32.ActiveCfg = Release|Win32 - {C7FECFCD-E6C6-4F95-BB9A-E1762B043969}.Release|Win32.Build.0 = Release|Win32 - {C7FECFCD-E6C6-4F95-BB9A-E1762B043969}.Release|x64.ActiveCfg = Release|x64 - {C7FECFCD-E6C6-4F95-BB9A-E1762B043969}.Release|x64.Build.0 = Release|x64 {5344B52B-BAC3-479C-B41D-D465B8BDA1AD}.Debug|Win32.ActiveCfg = Debug|Win32 {5344B52B-BAC3-479C-B41D-D465B8BDA1AD}.Debug|Win32.Build.0 = Debug|Win32 {5344B52B-BAC3-479C-B41D-D465B8BDA1AD}.Debug|x64.ActiveCfg = Debug|x64 @@ -329,12 +311,6 @@ Global {B9184DBA-C6B7-44FE-8BBD-0852DB22D2E4}.Release|Win32.Build.0 = Release|Win32 {B9184DBA-C6B7-44FE-8BBD-0852DB22D2E4}.Release|x64.ActiveCfg = Release|x64 {B9184DBA-C6B7-44FE-8BBD-0852DB22D2E4}.Release|x64.Build.0 = Release|x64 - {442084A6-2069-4927-B0C9-51525A720CB2}.Debug|Win32.ActiveCfg = Debug|Win32 - {442084A6-2069-4927-B0C9-51525A720CB2}.Debug|Win32.Build.0 = Debug|Win32 - {442084A6-2069-4927-B0C9-51525A720CB2}.Debug|x64.ActiveCfg = Debug|x64 - {442084A6-2069-4927-B0C9-51525A720CB2}.Debug|x64.Build.0 = Debug|x64 - {442084A6-2069-4927-B0C9-51525A720CB2}.Release|Win32.ActiveCfg = Release|Win32 - {442084A6-2069-4927-B0C9-51525A720CB2}.Release|x64.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE