Now using new artwork table everywhere in app and subsonic API to refer to artworks
This commit is contained in:
@@ -20,24 +20,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <ctime>
|
||||
#include <variant>
|
||||
|
||||
#include "core/String.hpp"
|
||||
#include "database/ImageId.hpp"
|
||||
#include "database/TrackEmbeddedImageId.hpp"
|
||||
#include "database/ArtworkId.hpp"
|
||||
|
||||
namespace lms::api::subsonic
|
||||
{
|
||||
struct CoverArtId
|
||||
{
|
||||
std::variant<db::ImageId, db::TrackEmbeddedImageId> id;
|
||||
std::optional<std::time_t> timestamp;
|
||||
|
||||
CoverArtId(db::ImageId _id, std::time_t _timestamp)
|
||||
: id{ _id }
|
||||
, timestamp{ _timestamp } {}
|
||||
CoverArtId(db::TrackEmbeddedImageId _id)
|
||||
: id{ _id } {}
|
||||
db::ArtworkId id;
|
||||
std::time_t timestamp;
|
||||
};
|
||||
|
||||
std::string idToString(CoverArtId coverId);
|
||||
@@ -46,9 +38,6 @@ namespace lms::api::subsonic
|
||||
// Used to parse parameters
|
||||
namespace lms::core::stringUtils
|
||||
{
|
||||
template<>
|
||||
std::optional<db::ImageId> readAs(std::string_view str);
|
||||
|
||||
template<>
|
||||
std::optional<api::subsonic::CoverArtId> readAs(std::string_view str);
|
||||
} // namespace lms::core::stringUtils
|
||||
|
||||
Reference in New Issue
Block a user