EpisodesView: Use show cover image.
This commit is contained in:
@@ -61,7 +61,7 @@ pub(crate) mod models;
|
||||
mod parser;
|
||||
mod schema;
|
||||
|
||||
pub use models::queryables::{Episode, EpisodeWidgetQuery, Podcast, Source};
|
||||
pub use models::queryables::{Episode, EpisodeViewWidgetQuery, EpisodeWidgetQuery, Podcast, Source};
|
||||
|
||||
/// [XDG Base Direcotory](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) Paths.
|
||||
#[allow(missing_debug_implementations)]
|
||||
|
||||
@@ -354,9 +354,17 @@ pub struct EpisodeViewWidgetQuery {
|
||||
}
|
||||
|
||||
impl EpisodeViewWidgetQuery {
|
||||
/// Get the `image_uri`.
|
||||
///
|
||||
/// Represents the uri(url usually) that the Feed cover image is located at.
|
||||
pub fn image_uri(&self) -> Option<&str> {
|
||||
self.image_uri.as_ref().map(|s| s.as_str())
|
||||
}
|
||||
|
||||
/// `Podcast` table foreign key.
|
||||
pub fn podcast_id(&self) -> i32 {
|
||||
self.podcast_id
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Queryable, Identifiable, AsChangeset, Associations, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user