Added description field to jnovel PostInfo struct
This commit is contained in:
parent
da9505cd61
commit
dd11620ffa
1 changed files with 9 additions and 1 deletions
|
@ -149,7 +149,7 @@ impl PartialOrd for PartInfo {
|
|||
#[derive(Debug, Clone)]
|
||||
pub(crate) enum PostInfo {
|
||||
Chapter { part: PartInfo, volume: u8, lemmy_info: LemmyPostInfo },
|
||||
Volume { part: PartInfo, lemmy_info: LemmyPostInfo },
|
||||
Volume { part: PartInfo, description: String, lemmy_info: LemmyPostInfo },
|
||||
}
|
||||
|
||||
impl PostInfo {
|
||||
|
@ -166,6 +166,13 @@ impl PostInfo {
|
|||
Volume {lemmy_info: lemmy_info, ..} => lemmy_info.clone()
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn get_description(&self) -> Option<String> {
|
||||
match self {
|
||||
_Chapter => None,
|
||||
Volume {description, ..} => Some(description.clone())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for PostInfo {
|
||||
|
@ -286,6 +293,7 @@ pub(crate) async fn check_feed(series_slug: &str, series_has_parts: bool) -> Res
|
|||
|
||||
let new_post_info = Volume {
|
||||
part: new_part_info,
|
||||
description: volume.short_description.clone(),
|
||||
lemmy_info: post_details,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue