aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-08-04 21:45:08 +0200
committermetamuffin <metamuffin@disroot.org>2023-08-04 21:45:08 +0200
commitc3ff3320e0ba0085ada9603c3eeb7e557f037677 (patch)
tree180d1b1e120c0aa4bcf22e406869d38c67494942 /common/src
parent9bef55396cc9a9a4d83970a26bf56f07d5f0377d (diff)
downloadjellything-c3ff3320e0ba0085ada9603c3eeb7e557f037677.tar
jellything-c3ff3320e0ba0085ada9603c3eeb7e557f037677.tar.bz2
jellything-c3ff3320e0ba0085ada9603c3eeb7e557f037677.tar.zst
use view_count and like_count from info.json
Diffstat (limited to 'common/src')
-rw-r--r--common/src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/src/lib.rs b/common/src/lib.rs
index 1da312f..be0528f 100644
--- a/common/src/lib.rs
+++ b/common/src/lib.rs
@@ -36,6 +36,7 @@ pub struct NodePublic {
#[serde(default)] pub description: Option<String>,
#[serde(default)] pub index: Option<usize>,
#[serde(default)] pub media: Option<MediaInfo>,
+ #[serde(default)] pub ratings: Vec<Rating>,
#[serde(default)] pub federated: Option<String>,
}
@@ -103,6 +104,17 @@ pub struct SourceTrack {
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
+pub enum Rating {
+ RottenTomatoes(u8),
+ Metacritic(u8),
+ Imdb(f32),
+ YoutubeViews(usize),
+ YoutubeLikes(usize),
+ YoutubeFollowers(usize),
+}
+
+#[derive(Debug, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "snake_case")]
pub enum SourceTrackKind {
Video {
width: u64,