rama_http/protocols/rss/feed_ext/
podcast.rs1use std::time::Duration;
4
5use jiff::Timestamp;
6use rama_net::uri::Uri;
7
8#[derive(Debug, Clone, PartialEq)]
10pub struct PodcastTranscript {
11 pub url: String,
12 pub type_: String,
13 pub language: Option<String>,
14 pub rel: Option<String>,
15}
16
17#[derive(Debug, Clone, PartialEq)]
19pub struct PodcastAlternateEnclosure {
20 pub type_: String,
21 pub length: Option<u64>,
22 pub bitrate: Option<f64>,
23 pub height: Option<u64>,
24 pub lang: Option<String>,
25 pub title: Option<String>,
28 pub rel: Option<String>,
31 pub codecs: Option<String>,
32 pub default: bool,
36 pub sources: Vec<PodcastSource>,
37 pub integrity: Option<PodcastIntegrity>,
38}
39
40#[derive(Debug, Clone, PartialEq)]
42pub struct PodcastSource {
43 pub uri: Uri,
44 pub content_type: Option<String>,
45}
46
47#[derive(Debug, Clone, PartialEq)]
49pub struct PodcastIntegrity {
50 pub type_: String,
51 pub value: String,
52}
53
54#[derive(Debug, Clone, PartialEq)]
56pub struct PodcastChapters {
57 pub url: String,
58 pub type_: String,
59}
60
61#[derive(Debug, Clone, PartialEq)]
64pub struct PodcastSoundbite {
65 pub start_time: Duration,
66 pub duration: Duration,
67 pub title: Option<String>,
68}
69
70#[derive(Debug, Clone, PartialEq)]
72pub struct PodcastPerson {
73 pub name: String,
74 pub role: Option<String>,
75 pub group: Option<String>,
76 pub img: Option<String>,
77 pub href: Option<String>,
78}
79
80#[derive(Debug, Clone, PartialEq)]
82pub struct PodcastLocation {
83 pub name: String,
84 pub geo: Option<String>,
85 pub osm: Option<String>,
86}
87
88#[derive(Debug, Clone, PartialEq)]
90pub struct PodcastSeason {
91 pub number: u64,
92 pub name: Option<String>,
93}
94
95#[derive(Debug, Clone, PartialEq)]
97pub struct PodcastEpisode {
98 pub number: f64,
99 pub display: Option<String>,
100}
101
102#[derive(Debug, Clone, PartialEq)]
104pub struct PodcastFunding {
105 pub url: String,
106 pub title: Option<String>,
107}
108
109#[derive(Debug, Clone, PartialEq)]
111pub struct PodcastTrailer {
112 pub title: String,
113 pub url: String,
114 pub pub_date: Option<Timestamp>,
115 pub length: Option<u64>,
116 pub type_: Option<String>,
117 pub season: Option<u64>,
118}
119
120#[derive(Debug, Clone, PartialEq)]
122pub struct PodcastRemoteItem {
123 pub feed_guid: String,
124 pub item_guid: Option<String>,
125 pub feed_url: Option<String>,
126 pub title: Option<String>,
127 pub medium: Option<String>,
128}
129
130#[derive(Debug, Clone, Default, PartialEq)]
132pub struct Podcast {
133 pub transcripts: Vec<PodcastTranscript>,
134 pub alternate_enclosures: Vec<PodcastAlternateEnclosure>,
135 pub chapters: Option<PodcastChapters>,
136 pub soundbites: Vec<PodcastSoundbite>,
137 pub persons: Vec<PodcastPerson>,
138 pub location: Option<PodcastLocation>,
139 pub season: Option<PodcastSeason>,
140 pub episode: Option<PodcastEpisode>,
141 pub remote_items: Vec<PodcastRemoteItem>,
145}
146
147#[derive(Debug, Clone, Default, PartialEq)]
149pub struct PodcastFeed {
150 pub guid: Option<String>,
151 pub locked: Option<bool>,
153 pub locked_owner: Option<String>,
157 pub fundings: Vec<PodcastFunding>,
158 pub persons: Vec<PodcastPerson>,
159 pub location: Option<PodcastLocation>,
160 pub trailers: Vec<PodcastTrailer>,
161 pub license: Option<String>,
162 pub medium: Option<String>,
163 pub remote_items: Vec<PodcastRemoteItem>,
164}