Qt: Use disc sets for changing discs

This commit is contained in:
Stenzek
2023-08-23 18:12:10 +10:00
parent 381bd92f87
commit 7d914a9384
7 changed files with 169 additions and 44 deletions

View File

@ -10,6 +10,8 @@
#include "common/string.h"
#include "gsl/span"
#include <ctime>
#include <functional>
#include <mutex>
@ -102,6 +104,11 @@ std::string GetCoverImagePathForEntry(const Entry* entry);
std::string GetCoverImagePath(const std::string& path, const std::string& serial, const std::string& title);
std::string GetNewCoverImagePathForEntry(const Entry* entry, const char* new_filename, bool use_serial);
/// Returns a list of (title, entry) for entries matching serials. Titles will match the gamedb title,
/// except when two files have the same serial, in which case the filename will be used instead.
std::vector<std::pair<std::string, const Entry*>>
GetMatchingEntriesForSerial(const gsl::span<const std::string> serials);
/// Downloads covers using the specified URL templates. By default, covers are saved by title, but this can be changed
/// with the use_serial parameter. save_callback optionall takes the entry and the path the new cover is saved to.
bool DownloadCovers(const std::vector<std::string>& url_templates, bool use_serial = false,