Put all directories and images in database, use the info to associate an image to each artist
This commit is contained in:
@@ -76,22 +76,6 @@ namespace lms::core::stringUtils
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
template<>
|
||||
std::optional<db::ImageId> readAs(std::string_view str)
|
||||
{
|
||||
std::vector<std::string_view> values{ core::stringUtils::splitString(str, '-') };
|
||||
if (values.size() != 2)
|
||||
return std::nullopt;
|
||||
|
||||
if (values[0] != "im")
|
||||
return std::nullopt;
|
||||
|
||||
if (const auto value{ core::stringUtils::readAs<db::ImageId::ValueType>(values[1]) })
|
||||
return db::ImageId{ *value };
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
template<>
|
||||
std::optional<db::MediaLibraryId> readAs(std::string_view str)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "core/String.hpp"
|
||||
#include "database/ArtistId.hpp"
|
||||
#include "database/ImageId.hpp"
|
||||
#include "database/MediaLibraryId.hpp"
|
||||
#include "database/ReleaseId.hpp"
|
||||
#include "database/TrackId.hpp"
|
||||
@@ -34,7 +33,6 @@ namespace lms::api::subsonic
|
||||
};
|
||||
|
||||
std::string idToString(db::ArtistId id);
|
||||
std::string idToString(db::ImageId id);
|
||||
std::string idToString(db::MediaLibraryId id);
|
||||
std::string idToString(db::ReleaseId id);
|
||||
std::string idToString(db::TrackId id);
|
||||
@@ -51,9 +49,6 @@ namespace lms::core::stringUtils
|
||||
template<>
|
||||
std::optional<db::ArtistId> readAs(std::string_view str);
|
||||
|
||||
template<>
|
||||
std::optional<db::ImageId> readAs(std::string_view str);
|
||||
|
||||
template<>
|
||||
std::optional<db::MediaLibraryId> readAs(std::string_view str);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace lms::api::subsonic::Scan
|
||||
{
|
||||
std::size_t count{};
|
||||
|
||||
if (scanStatus.currentScanStepStats && scanStatus.currentScanStepStats->currentStep == ScanStep::ScanAudioFiles)
|
||||
if (scanStatus.currentScanStepStats && scanStatus.currentScanStepStats->currentStep == ScanStep::ScanFiles)
|
||||
count = scanStatus.currentScanStepStats->processedElems;
|
||||
|
||||
statusResponse.setAttribute("count", count);
|
||||
|
||||
Reference in New Issue
Block a user