diff --git a/functions.cpp b/functions.cpp index 132badd..778d064 100644 --- a/functions.cpp +++ b/functions.cpp @@ -54,6 +54,7 @@ std::vector< RenameLibrary > getLibraries(const std::vector > getCustomKeyOptions(const string &key); const string getCustomKeyDefault(const string &key); const string getName(); const bool canRenameMultipleFiles(); +const bool shouldPerformSearch(); } #endif // TV_RENAME_HPP diff --git a/main.cpp b/main.cpp index bbd1a14..a45148b 100644 --- a/main.cpp +++ b/main.cpp @@ -85,6 +85,10 @@ std::string getLibrariesJson() { result << " \"multiple_files\": " << ( library.first->canRenameMultipleFiles() ? "true" : "false" ) + << ",\n"; + result << " \"should_search\": " + << ( library.first->shouldPerformSearch() ? "true" + : "false" ) << "\n },\n"; } result.seekp( -2, std::ios_base::end ); diff --git a/rename_library.hpp b/rename_library.hpp index f2c6aab..f2c7515 100644 --- a/rename_library.hpp +++ b/rename_library.hpp @@ -14,6 +14,7 @@ struct RenameLibrary { const std::string ( *getCustomKeyDefault )(const std::string &); const std::string ( *getName )(); const bool ( *canRenameMultipleFiles )(); + const bool ( *shouldPerformSearch )(); void *libhndl; std::string name; std::string config; diff --git a/simple_rename/simple.cpp b/simple_rename/simple.cpp index d55778d..4236cd5 100644 --- a/simple_rename/simple.cpp +++ b/simple_rename/simple.cpp @@ -68,3 +68,7 @@ const string getName() { const bool canRenameMultipleFiles() { return false; } + +const bool shouldPerformSearch() { + return false; +} diff --git a/themoviedb/moviedb.cpp b/themoviedb/moviedb.cpp index 015c095..128c84a 100644 --- a/themoviedb/moviedb.cpp +++ b/themoviedb/moviedb.cpp @@ -527,3 +527,7 @@ const string getName() { const bool canRenameMultipleFiles() { return false; } + +const bool shouldPerformSearch() { + return true; +} diff --git a/thetvdb/tv_rename.cpp b/thetvdb/tv_rename.cpp index 5d4cdef..e8ea29c 100644 --- a/thetvdb/tv_rename.cpp +++ b/thetvdb/tv_rename.cpp @@ -652,3 +652,7 @@ const string getName() { const bool canRenameMultipleFiles() { return true; } + +const bool shouldPerformSearch() { + return true; +}