diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Config.hpp | 1 | ||||
-rw-r--r-- | include/Storage.hpp | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/Config.hpp b/include/Config.hpp index 68e4462..e737fee 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -48,6 +48,7 @@ namespace QuickMedia { bool sort_by_name = false; // Series bool sort_episodes_by_name = true; bool auto_group_episodes = true; + bool recursive = true; }; struct YoutubeSponsorblock { diff --git a/include/Storage.hpp b/include/Storage.hpp index 19dd345..60c15f6 100644 --- a/include/Storage.hpp +++ b/include/Storage.hpp @@ -20,8 +20,8 @@ namespace QuickMedia { DESC }; - // Return false to stop the iterator - using FileIteratorCallback = std::function<bool(const Path &filepath, FileType file_type)>; + // Return false to stop the iterator. + using FileIteratorCallback = std::function<bool(const Path &filepath, FileType file_type, time_t last_modified_seconds)>; Path get_home_dir(); Path get_storage_dir(); @@ -34,8 +34,10 @@ namespace QuickMedia { bool file_get_last_modified_time_seconds(const char *path, time_t *result); int file_overwrite(const Path &path, const std::string &data); int file_overwrite_atomic(const Path &path, const std::string &data); + // The callback is called with 0 as the argument (last_modified_seconds) void for_files_in_dir(const Path &path, FileIteratorCallback callback); void for_files_in_dir_sort_last_modified(const Path &path, FileIteratorCallback callback, FileSortDirection sort_dir = FileSortDirection::ASC); + // The callback is called with 0 as the argument (last_modified_seconds) void for_files_in_dir_sort_name(const Path &path, FileIteratorCallback callback, FileSortDirection sort_dir = FileSortDirection::ASC); bool read_file_as_json(const Path &filepath, Json::Value &result); |