Skip to content

Commit

Permalink
Add missing api fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed Nov 18, 2023
1 parent b0f209d commit 3680c83
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub struct Account {
pub username: String,
pub email: String,
pub phone: String,
pub profile_name: String,

#[default(DateTime::<Utc>::from(std::time::SystemTime::UNIX_EPOCH))]
pub created: DateTime<Utc>,
Expand Down
3 changes: 2 additions & 1 deletion src/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ pub struct FeedCarousel {
/// Link to a crunchyroll series or article.
pub link: String,

#[serde(default)]
#[serde(deserialize_with = "crate::internal::serde::deserialize_panel")]
pub panel: MediaCollection,
pub panel: Option<MediaCollection>,
pub images: FeedCarouselImages,

pub button_text: String,
Expand Down
1 change: 0 additions & 1 deletion src/internal/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ where
if let Some(mut episode_metadata) = as_map.remove("episode_metadata") {
as_map.append(episode_metadata.as_object_mut().unwrap())
}
as_map.remove("recent_variant");

serde_json::from_value(
serde_json::to_value(as_map).map_err(|e| SerdeError::custom(e.to_string()))?,
Expand Down
2 changes: 2 additions & 0 deletions src/media/anime/episode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ pub struct Episode {
listing_id: Option<crate::StrictValue>,
#[cfg(feature = "__test_strict")]
hd_flag: Option<crate::StrictValue>,
#[cfg(feature = "__test_strict")]
recent_variant: Option<crate::StrictValue>,
}

impl Episode {
Expand Down

0 comments on commit 3680c83

Please sign in to comment.