From 30f50c997ca4aae3643050778cbf3c0c3cdc9160 Mon Sep 17 00:00:00 2001 From: casey Date: Thu, 5 May 2016 01:55:38 -0700 Subject: [PATCH] Checkpoint commit for Indexer logging, plus a few necessary file/class renames. --- ...derTaglib.cpp => TaglibMetadataReader.cpp} | 66 +++++++++---------- ...gReaderTaglib.h => TaglibMetadataReader.h} | 59 ++++++++++++----- src/contrib/taglib_plugin/taglib_plugin.cpp | 4 +- .../taglib_plugin/taglib_plugin.vcxproj | 6 +- .../taglib_plugin.vcxproj.filters | 12 ++-- src/core/audio/Buffer.cpp | 2 +- src/core/core.vcxproj | 2 +- src/core/core.vcxproj.filters | 12 ++-- src/core/library/Indexer.cpp | 35 ++++++---- src/core/library/Indexer.h | 2 +- src/core/library/LibraryBase.h | 31 +++------ src/core/library/LocalLibrary.cpp | 15 ----- src/core/library/LocalLibrary.h | 5 +- src/core/library/track/Track.h | 6 +- src/core/sdk/IAnalyzer.h | 8 +-- src/core/sdk/IMetadataReader.h | 6 +- src/core/sdk/{ITrack.h => IMetadataWriter.h} | 4 +- src/square/ConsoleUI.cpp | 4 +- 18 files changed, 140 insertions(+), 139 deletions(-) rename src/contrib/taglib_plugin/{TagReaderTaglib.cpp => TaglibMetadataReader.cpp} (85%) rename src/contrib/taglib_plugin/{TagReaderTaglib.h => TaglibMetadataReader.h} (58%) rename src/core/sdk/{ITrack.h => IMetadataWriter.h} (94%) diff --git a/src/contrib/taglib_plugin/TagReaderTaglib.cpp b/src/contrib/taglib_plugin/TaglibMetadataReader.cpp similarity index 85% rename from src/contrib/taglib_plugin/TagReaderTaglib.cpp rename to src/contrib/taglib_plugin/TaglibMetadataReader.cpp index ae76b6971..6c3e6273f 100644 --- a/src/contrib/taglib_plugin/TagReaderTaglib.cpp +++ b/src/contrib/taglib_plugin/TaglibMetadataReader.cpp @@ -34,7 +34,7 @@ // ////////////////////////////////////////////////////////////////////////////// -#include "TagReaderTaglib.h" +#include "TaglibMetadataReader.h" #include #include @@ -73,17 +73,17 @@ static inline std::wstring utf8to16(const char* utf8) { } #endif -TagReaderTaglib::TagReaderTaglib() { +TaglibMetadataReader::TaglibMetadataReader() { } -TagReaderTaglib::~TagReaderTaglib() { +TaglibMetadataReader::~TaglibMetadataReader() { } -void TagReaderTaglib::Destroy() { +void TaglibMetadataReader::Destroy() { delete this; } -bool TagReaderTaglib::CanReadTag(const char *extension){ +bool TaglibMetadataReader::CanReadTag(const char *extension){ if (extension) { std::string ext(extension); boost::algorithm::to_lower(ext); @@ -99,7 +99,7 @@ bool TagReaderTaglib::CanReadTag(const char *extension){ return false; } -bool TagReaderTaglib::ReadTag(const char* uri, musik::core::ITrack *track) { +bool TaglibMetadataReader::ReadTag(const char* uri, musik::core::IMetadataWriter *track) { std::string path(uri); std::string extension; @@ -119,7 +119,7 @@ bool TagReaderTaglib::ReadTag(const char* uri, musik::core::ITrack *track) { return this->GetGenericTag(uri, track); } -bool TagReaderTaglib::GetGenericTag(const char* uri, musik::core::ITrack *track) { +bool TaglibMetadataReader::GetGenericTag(const char* uri, musik::core::IMetadataWriter *target) { #ifdef WIN32 TagLib::FileRef file(utf8to16(uri).c_str()); #else @@ -132,27 +132,27 @@ bool TagReaderTaglib::GetGenericTag(const char* uri, musik::core::ITrack *track) if(tag) { if (!tag->title().isEmpty()) { - this->SetTagValue("title", tag->title(), track); + this->SetTagValue("title", tag->title(), target); } else { - this->SetTagValue("title", uri, track); + this->SetTagValue("title", uri, target); } - this->SetTagValue("album",tag->album(), track); - this->SetSlashSeparatedValues("artist",tag->artist() ,track); - this->SetTagValue("genre",tag->genre(), track); - this->SetTagValue("comment",tag->comment(), track); + this->SetTagValue("album",tag->album(), target); + this->SetSlashSeparatedValues("artist",tag->artist() , target); + this->SetTagValue("genre",tag->genre(), target); + this->SetTagValue("comment",tag->comment(), target); if (tag->track()) { - this->SetTagValue("track", tag->track(), track); + this->SetTagValue("track", tag->track(), target); } if (tag->year()) { - this->SetTagValue("year", tag->year(), track); + this->SetTagValue("year", tag->year(), target); } TagLib::AudioProperties *audio = file.audioProperties(); - this->SetAudioProperties(audio,track); + this->SetAudioProperties(audio, target); return true; } @@ -161,7 +161,7 @@ bool TagReaderTaglib::GetGenericTag(const char* uri, musik::core::ITrack *track) return false; } -bool TagReaderTaglib::GetID3v2Tag(const char* uri, musik::core::ITrack *track) { +bool TaglibMetadataReader::GetID3v2Tag(const char* uri, musik::core::IMetadataWriter *track) { TagLib::ID3v2::FrameFactory::instance()->setDefaultTextEncoding(TagLib::String::UTF8); #ifdef WIN32 @@ -327,37 +327,37 @@ bool TagReaderTaglib::GetID3v2Tag(const char* uri, musik::core::ITrack *track) { return false; } -void TagReaderTaglib::SetTagValue( +void TaglibMetadataReader::SetTagValue( const char* key, const TagLib::String tagString, - musik::core::ITrack *track) + musik::core::IMetadataWriter *track) { std::string value(tagString.begin(), tagString.end()); track->SetValue(key, value.c_str()); } -void TagReaderTaglib::SetTagValue( +void TaglibMetadataReader::SetTagValue( const char* key, const char* string, - musik::core::ITrack *track) + musik::core::IMetadataWriter *track) { std::string temp(string); track->SetValue(key, temp.c_str()); } -void TagReaderTaglib::SetTagValue( +void TaglibMetadataReader::SetTagValue( const char* key, const int tagInt, - musik::core::ITrack *track) + musik::core::IMetadataWriter *target) { std::string temp = boost::str(boost::format("%1%") % tagInt); - track->SetValue(key, temp.c_str()); + target->SetValue(key, temp.c_str()); } -void TagReaderTaglib::SetTagValues( +void TaglibMetadataReader::SetTagValues( const char* key, const TagLib::ID3v2::FrameList &frame, - musik::core::ITrack *track) + musik::core::IMetadataWriter *target) { if (!frame.isEmpty()) { TagLib::ID3v2::FrameList::ConstIterator value = frame.begin(); @@ -366,16 +366,16 @@ void TagReaderTaglib::SetTagValues( TagLib::String tagString = (*value)->toString(); if(!tagString.isEmpty()) { std::string value(tagString.begin(), tagString.end()); - track->SetValue(key,value.c_str()); + target->SetValue(key,value.c_str()); } } } } -void TagReaderTaglib::SetSlashSeparatedValues( +void TaglibMetadataReader::SetSlashSeparatedValues( const char* key, TagLib::String tagString, - musik::core::ITrack *track) + musik::core::IMetadataWriter *track) { if(!tagString.isEmpty()) { std::string value(tagString.begin(), tagString.end()); @@ -391,10 +391,10 @@ void TagReaderTaglib::SetSlashSeparatedValues( } } -void TagReaderTaglib::SetSlashSeparatedValues( +void TaglibMetadataReader::SetSlashSeparatedValues( const char* key, const TagLib::ID3v2::FrameList &frame, - musik::core::ITrack *track) + musik::core::IMetadataWriter *track) { if(!frame.isEmpty()) { TagLib::ID3v2::FrameList::ConstIterator value = frame.begin(); @@ -405,9 +405,9 @@ void TagReaderTaglib::SetSlashSeparatedValues( } } -void TagReaderTaglib::SetAudioProperties( +void TaglibMetadataReader::SetAudioProperties( TagLib::AudioProperties *audioProperties, - musik::core::ITrack *track) + musik::core::IMetadataWriter *track) { /* FIXME: it's overkill to bring boost in just to convert ints to strings */ diff --git a/src/contrib/taglib_plugin/TagReaderTaglib.h b/src/contrib/taglib_plugin/TaglibMetadataReader.h similarity index 58% rename from src/contrib/taglib_plugin/TagReaderTaglib.h rename to src/contrib/taglib_plugin/TaglibMetadataReader.h index 41ae7f191..9c33a4d03 100644 --- a/src/contrib/taglib_plugin/TagReaderTaglib.h +++ b/src/contrib/taglib_plugin/TaglibMetadataReader.h @@ -62,25 +62,52 @@ #include #include -class TagReaderTaglib : public musik::core::metadata::IMetadataReader { - public: - TagReaderTaglib(); - virtual ~TagReaderTaglib(); - bool ReadTag(const char *uri, musik::core::ITrack *track); - virtual bool CanReadTag(const char *extension); +class TaglibMetadataReader : public musik::core::metadata::IMetadataReader { + public: + TaglibMetadataReader(); + virtual ~TaglibMetadataReader(); + bool ReadTag(const char *uri, musik::core::IMetadataWriter *target); + virtual bool CanReadTag(const char *extension); virtual void Destroy(); - private: - void SetTagValue(const char* key,const char* string,musik::core::ITrack *track); - void SetTagValue(const char* key,const TagLib::String tagString,musik::core::ITrack *track); - void SetTagValue(const char* key,const int tagInt,musik::core::ITrack *track); - void SetTagValues(const char* key,const TagLib::ID3v2::FrameList &frame,musik::core::ITrack *track); - void SetAudioProperties(TagLib::AudioProperties *audioProperties,musik::core::ITrack *track); + private: + void SetTagValue( + const char* key, + const char* string,musik::core::IMetadataWriter *target); - void SetSlashSeparatedValues(const char* key,const TagLib::ID3v2::FrameList &frame,musik::core::ITrack *track); - void SetSlashSeparatedValues(const char* key,TagLib::String tagString,musik::core::ITrack *track); + void SetTagValue( + const char* key, + const TagLib::String tagString, + musik::core::IMetadataWriter *target); - bool GetID3v2Tag(const char* uri, musik::core::ITrack *track); - bool GetGenericTag(const char* uri, musik::core::ITrack *track); + void SetTagValue( + const char* key, + const int tagInt,musik::core::IMetadataWriter *target); + + void SetTagValues(const char* key, + const TagLib::ID3v2::FrameList &frame, + musik::core::IMetadataWriter *target); + + void SetAudioProperties( + TagLib::AudioProperties *audioProperties, + musik::core::IMetadataWriter *target); + + void SetSlashSeparatedValues( + const char* key, + const TagLib::ID3v2::FrameList &frame, + musik::core::IMetadataWriter *target); + + void SetSlashSeparatedValues( + const char* key, + TagLib::String tagString, + musik::core::IMetadataWriter *target); + + bool GetID3v2Tag( + const char* uri, + musik::core::IMetadataWriter *target); + + bool GetGenericTag( + const char* uri, + musik::core::IMetadataWriter *target); }; diff --git a/src/contrib/taglib_plugin/taglib_plugin.cpp b/src/contrib/taglib_plugin/taglib_plugin.cpp index ebb4ae150..3e7ad39fa 100644 --- a/src/contrib/taglib_plugin/taglib_plugin.cpp +++ b/src/contrib/taglib_plugin/taglib_plugin.cpp @@ -36,7 +36,7 @@ #include "stdafx.h" -#include "TagReaderTaglib.h" +#include "TaglibMetadataReader.h" #include "core/sdk/IPlugin.h" #ifndef _HAVE_TAGLIB #include @@ -77,7 +77,7 @@ class TaglibPlugin : public musik::core::IPlugin { extern "C" { DLLEXPORT musik::core::metadata::IMetadataReader* GetMetadataReader() { - return new TagReaderTaglib(); + return new TaglibMetadataReader(); } DLLEXPORT musik::core::IPlugin* GetPlugin() { diff --git a/src/contrib/taglib_plugin/taglib_plugin.vcxproj b/src/contrib/taglib_plugin/taglib_plugin.vcxproj index e3563c45e..697ea45f6 100755 --- a/src/contrib/taglib_plugin/taglib_plugin.vcxproj +++ b/src/contrib/taglib_plugin/taglib_plugin.vcxproj @@ -213,7 +213,7 @@ - + @@ -330,7 +330,7 @@ - + @@ -341,4 +341,4 @@ - + \ No newline at end of file diff --git a/src/contrib/taglib_plugin/taglib_plugin.vcxproj.filters b/src/contrib/taglib_plugin/taglib_plugin.vcxproj.filters index e61b27b49..1cb06b158 100755 --- a/src/contrib/taglib_plugin/taglib_plugin.vcxproj.filters +++ b/src/contrib/taglib_plugin/taglib_plugin.vcxproj.filters @@ -16,9 +16,6 @@ plugin - - plugin - taglib-1.11 @@ -328,14 +325,14 @@ taglib-1.11 + + plugin + plugin - - plugin - taglib-1.11 @@ -675,5 +672,8 @@ taglib-1.11 + + plugin + \ No newline at end of file diff --git a/src/core/audio/Buffer.cpp b/src/core/audio/Buffer.cpp index 906056a47..ca3988649 100644 --- a/src/core/audio/Buffer.cpp +++ b/src/core/audio/Buffer.cpp @@ -186,7 +186,7 @@ bool Buffer::Append(BufferPtr appendBuffer) { { long newBufferSize = (this->Samples() + appendBuffer->Samples()) * this->channels; - if (newBufferSize > this->internalBufferSize) { /* resize */ + if (newBufferSize > this->internalBufferSize) { /* resize, then copy, if too small */ float *newBuffer = new float[newBufferSize]; CopyFloat(newBuffer, this->buffer, this->sampleSize * this->channels); diff --git a/src/core/core.vcxproj b/src/core/core.vcxproj index c4de2fe29..cd9949482 100755 --- a/src/core/core.vcxproj +++ b/src/core/core.vcxproj @@ -160,7 +160,7 @@ - + diff --git a/src/core/core.vcxproj.filters b/src/core/core.vcxproj.filters index 216d381e1..3df4b309d 100755 --- a/src/core/core.vcxproj.filters +++ b/src/core/core.vcxproj.filters @@ -198,18 +198,12 @@ src\sdk - - src\sdk - src\sdk src\sdk - - src\sdk - src\sdk @@ -315,5 +309,11 @@ src\sdk + + src\sdk + + + src\sdk + \ No newline at end of file diff --git a/src/core/library/Indexer.cpp b/src/core/library/Indexer.cpp index b3022f394..e33bd411f 100644 --- a/src/core/library/Indexer.cpp +++ b/src/core/library/Indexer.cpp @@ -79,6 +79,21 @@ Indexer::~Indexer(){ } } +static std::string getStatus(int status, int fileCount, float overall, float current) { + switch (status) { + case 1: return boost::str(boost::format("Counting files: %1%") % fileCount); + case 2: return boost::str(boost::format("Indexing: %.2f") % (overall * 100)) + "%"; + case 3: return boost::str(boost::format("Removing old files: %.2f") % (overall * 100)) + "%"; + case 4: return "Cleaning up."; + case 5: return "Optimizing."; + case 6: return boost::str(boost::format("Analyzing: %.2f%% (current %.1f%%)") + % (100.0 * overall / (double) fileCount) + % (current * 100.0)); + } + + return "unknown indexer status"; +} + ////////////////////////////////////////// ///\brief ///Get the current status (text) @@ -86,22 +101,13 @@ Indexer::~Indexer(){ std::string Indexer::GetStatus() { boost::mutex::scoped_lock lock(this->progressMutex); - std::string status; - switch(this->status) { - case 1: return boost::str(boost::format("Counting files: %1%")%this->nofFiles ); - case 2: return boost::str(boost::format("Indexing: %.2f") % (this->overallProgress*100)) + "%"; - case 3: return boost::str(boost::format("Removing old files: %.2f") % (this->overallProgress*100)) + "%"; - case 4: return "Cleaning up."; - case 5: return "Optimizing."; - case 6: return boost::str(boost::format("Analyzing: %.2f%% (current %.1f%%)") - % (100.0 * this->overallProgress / (double) this->nofFiles) - % (this->currentProgress * 100.0)); - } - - return status; + return getStatus( + this->status, + this->nofFiles, + this->overallProgress, + this->currentProgress); } - ////////////////////////////////////////// ///\brief ///Restart the sync @@ -404,6 +410,7 @@ void Indexer::SyncDirectory( for( ; file != end && !this->Exited() && !this->Restarted();++file) { if (is_directory(file->status())) { /* recursion here */ + std::cout << getStatus(this->status, this->nofFiles, this->overallProgress, this->currentProgress) << "\n"; this->SyncDirectory(file->path().string(), dirId,pathId,syncPath); } else { diff --git a/src/core/library/Indexer.h b/src/core/library/Indexer.h index 1e125b206..7bc83902d 100644 --- a/src/core/library/Indexer.h +++ b/src/core/library/Indexer.h @@ -57,7 +57,7 @@ namespace musik { namespace core { ///but can also be used as a standalone class for indexing files. ///All you need to do is create a Indexer object and call Startup() ////////////////////////////////////////// - class Indexer : public ThreadHelper,private boost::noncopyable { + class Indexer : public ThreadHelper, private boost::noncopyable { public: Indexer(); ~Indexer(); diff --git a/src/core/library/LibraryBase.h b/src/core/library/LibraryBase.h index 8570fc3bf..89f104c75 100644 --- a/src/core/library/LibraryBase.h +++ b/src/core/library/LibraryBase.h @@ -63,8 +63,8 @@ namespace musik { namespace core { class LibraryBase; } - typedef boost::shared_ptr LibraryPtr; - typedef boost::weak_ptr LibraryWeakPtr; + typedef boost::shared_ptr LibraryPtr; + typedef boost::weak_ptr LibraryWeakPtr; } } namespace musik { namespace core { namespace library { @@ -90,7 +90,7 @@ namespace musik { namespace core { namespace library { protected: LibraryBase(std::string name,int id); - public: + public: virtual ~LibraryBase(); ////////////////////////////////////////// @@ -104,21 +104,6 @@ namespace musik { namespace core { namespace library { ////////////////////////////////////////// virtual bool Startup() = 0; - ////////////////////////////////////////// - ///\brief - ///Get state of the library - /// - ///\returns - ///Status of the library. May be empty. - /// - ///Get the current status of the Library. - ///Will for instance report current status of the indexer in the LocalLibrary. - /// - ///\remarks - ///Empty string means that the library thread is holding. - ////////////////////////////////////////// - virtual std::string GetInfo() = 0; - virtual bool AddQuery( const query::QueryBase &query,unsigned int options=0 ); virtual bool RunCallbacks(); std::string GetLibraryDirectory(); @@ -126,9 +111,9 @@ namespace musik { namespace core { namespace library { virtual musik::core::Indexer *Indexer(); virtual std::string BasePath(); bool Exited(); - const std::string& Identifier(); - int Id(); - const std::string& Name(); + const std::string& Identifier(); + int Id(); + const std::string& Name(); virtual const std::string& AuthorizationKey(); static bool IsStaticMetaKey(std::string &metakey); @@ -258,7 +243,7 @@ namespace musik { namespace core { namespace library { public: boost::mutex libraryMutex; - LibraryWeakPtr self; + LibraryWeakPtr self; LibraryPtr GetSelfPtr(); int userId; }; @@ -268,5 +253,5 @@ namespace musik { namespace core { namespace library { namespace musik { namespace core { typedef boost::shared_ptr LibraryPtr; - typedef boost::weak_ptr LibraryWeakPtr; + typedef boost::weak_ptr LibraryWeakPtr; } } diff --git a/src/core/library/LocalLibrary.cpp b/src/core/library/LocalLibrary.cpp index 3a09c13d8..e149897b2 100644 --- a/src/core/library/LocalLibrary.cpp +++ b/src/core/library/LocalLibrary.cpp @@ -78,21 +78,6 @@ LocalLibrary::~LocalLibrary() { this->threads.join_all(); } -////////////////////////////////////////// -///\brief -///Get a short status string of what is going on in the Library. -/// -///\returns -///Information string. -/// -///The information is mostly used to get the information -///about the Indexer. -////////////////////////////////////////// -std::string LocalLibrary::GetInfo(){ - return this->indexer.GetStatus(); -} - - ////////////////////////////////////////// ///\brief ///Startup the library threads. diff --git a/src/core/library/LocalLibrary.h b/src/core/library/LocalLibrary.h index e51ae42ca..942aa755f 100644 --- a/src/core/library/LocalLibrary.h +++ b/src/core/library/LocalLibrary.h @@ -67,15 +67,14 @@ namespace musik{ namespace core{ namespace library{ ///Indexer ////////////////////////////////////////// class LocalLibrary : public library::LibraryBase { - private: + private: LocalLibrary(std::string name, int id); public: - static LibraryPtr Create(std::string name,int id); + static LibraryPtr Create(std::string name,int id); ~LocalLibrary(void); bool Startup(); - std::string GetInfo(); musik::core::Indexer *Indexer(); protected: diff --git a/src/core/library/track/Track.h b/src/core/library/track/Track.h index 6b2dc2ff1..e80fafd29 100644 --- a/src/core/library/track/Track.h +++ b/src/core/library/track/Track.h @@ -36,7 +36,7 @@ #pragma once -#include +#include #include #include #include @@ -60,13 +60,13 @@ namespace musik{ namespace core{ ///\brief ///The most basic implementation of a track ////////////////////////////////////////// - class Track : public ITrack { + class Track : public IMetadataWriter { public: typedef std::multimap MetadataMap; typedef std::pair MetadataIteratorRange; virtual ~Track(); - + virtual DBID Id(); virtual musik::core::LibraryPtr Library(); diff --git a/src/core/sdk/IAnalyzer.h b/src/core/sdk/IAnalyzer.h index 578852b93..7dc5070c3 100644 --- a/src/core/sdk/IAnalyzer.h +++ b/src/core/sdk/IAnalyzer.h @@ -34,7 +34,7 @@ #pragma once #include "config.h" -#include "ITrack.h" +#include "IMetadataWriter.h" #include "IBuffer.h" namespace musik { namespace core { namespace audio { @@ -64,13 +64,13 @@ namespace musik { namespace core { namespace audio { ///Start analyzing the track. Returns true if ///the analyzing should continue. ////////////////////////////////////////// - virtual bool Start(musik::core::ITrack *track) = 0; + virtual bool Start(musik::core::IMetadataWriter *target) = 0; ////////////////////////////////////////// ///\brief ///Analyze a buffer ////////////////////////////////////////// - virtual bool Analyze(musik::core::ITrack *track, IBuffer *buffer) = 0; + virtual bool Analyze(musik::core::IMetadataWriter *target, IBuffer *buffer) = 0; ////////////////////////////////////////// ///\brief @@ -78,7 +78,7 @@ namespace musik { namespace core { namespace audio { ///If this call makes changes to the track it should ///return true. ////////////////////////////////////////// - virtual bool End(musik::core::ITrack *track) = 0; + virtual bool End(musik::core::IMetadataWriter *target) = 0; }; diff --git a/src/core/sdk/IMetadataReader.h b/src/core/sdk/IMetadataReader.h index 62b4a302d..1aee15618 100644 --- a/src/core/sdk/IMetadataReader.h +++ b/src/core/sdk/IMetadataReader.h @@ -37,13 +37,13 @@ #pragma once #include "config.h" -#include "ITrack.h" +#include "IMetadataWriter.h" namespace musik { namespace core { namespace metadata { - class IMetadataReader { + class IMetadataReader { public: - virtual bool ReadTag(const char *uri, musik::core::ITrack *track) = 0; + virtual bool ReadTag(const char *uri, musik::core::IMetadataWriter *target) = 0; virtual bool CanReadTag(const char *extension) = 0; virtual void Destroy() = 0; }; diff --git a/src/core/sdk/ITrack.h b/src/core/sdk/IMetadataWriter.h similarity index 94% rename from src/core/sdk/ITrack.h rename to src/core/sdk/IMetadataWriter.h index b5ee754b4..b75c9e567 100644 --- a/src/core/sdk/ITrack.h +++ b/src/core/sdk/IMetadataWriter.h @@ -44,11 +44,11 @@ namespace musik { namespace core { ///\brief ///The virtual base for all tracks ////////////////////////////////////////// - class ITrack { + class IMetadataWriter { public: virtual void SetValue(const char* metakey, const char* value) = 0; virtual void ClearValue(const char* metakey) = 0; - virtual void SetThumbnail(const char *data, long size) = 0; + virtual void SetThumbnail(const char *data, long size) = 0; /* should be SetBlob with a key */ }; } } diff --git a/src/square/ConsoleUI.cpp b/src/square/ConsoleUI.cpp index 4382a9b1f..3681aa159 100644 --- a/src/square/ConsoleUI.cpp +++ b/src/square/ConsoleUI.cpp @@ -99,9 +99,7 @@ void ConsoleUI::Run() using musik::core::TrackPtr; LibraryPtr library = LibraryFactory::Libraries().at(0); /* there's always at least 1... */ - //library->Indexer()->AddPath("E:/music/ripped/MR_Bungle"); - //library->Indexer()->AddPath("E:/music/downloaded/the beatles (remastered)"); - library->Indexer()->AddPath("E:/testmusic"); + library->Indexer()->AddPath("E:/music/"); library->Indexer()->RestartSync(); while (!this->shouldQuit) {