aboutsummaryrefslogtreecommitdiff
path: root/common/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-12-08 19:53:12 +0100
committermetamuffin <metamuffin@disroot.org>2025-12-08 19:53:12 +0100
commit6edf0fd93abf7e58b4c0974e3d3e54bcf8517946 (patch)
tree32577db9d987897d4037ba9af0084b95b55e145c /common/src/lib.rs
parente4584a8135584e6591bac7d5397cf227cf3cff92 (diff)
downloadjellything-6edf0fd93abf7e58b4c0974e3d3e54bcf8517946.tar
jellything-6edf0fd93abf7e58b4c0974e3d3e54bcf8517946.tar.bz2
jellything-6edf0fd93abf7e58b4c0974e3d3e54bcf8517946.tar.zst
human-readable cache keys
Diffstat (limited to 'common/src/lib.rs')
-rw-r--r--common/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index cf79cc5..670d9af 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -68,7 +68,7 @@ pub struct Node {
pub federated: Option<String>,
pub tags: BTreeSet<String>,
pub ratings: BTreeMap<RatingType, f64>,
- pub pictures: BTreeMap<PictureSlot, Picture>,
+ pub pictures: BTreeMap<PictureSlot, Asset>,
pub credits: BTreeMap<CreditCategory, Vec<Appearance>>,
pub identifiers: BTreeMap<IdentifierType, String>,
pub visibility: Visibility,
@@ -104,9 +104,8 @@ pub enum IdentifierType {
Omdb,
}
-// TODO custom b64 ser
-#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Copy)]
-pub struct Picture(pub [u8; 32]);
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone, Hash)]
+pub struct Asset(pub String);
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct Appearance {