'How hard could it be'
This commit is contained in:
@@ -35,7 +35,8 @@ lazy_static! {
|
||||
static ref DB_PATH: PathBuf = TEMPDIR.path().join("hammond.db");
|
||||
}
|
||||
|
||||
pub(crate) fn connection() -> Pool {
|
||||
// FIXME: this should not be public
|
||||
pub fn connection() -> Pool {
|
||||
POOL.clone()
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,9 @@ pub mod utils;
|
||||
pub mod feed;
|
||||
#[allow(missing_docs)]
|
||||
pub mod errors;
|
||||
pub(crate) mod database;
|
||||
// FIXME: this should not be public
|
||||
#[allow(missing_docs)]
|
||||
pub mod database;
|
||||
pub(crate) mod models;
|
||||
mod parser;
|
||||
mod schema;
|
||||
|
||||
@@ -215,6 +215,22 @@ pub struct EpisodeWidgetQuery {
|
||||
podcast_id: i32,
|
||||
}
|
||||
|
||||
impl From<Episode> for EpisodeWidgetQuery {
|
||||
fn from(e: Episode) -> EpisodeWidgetQuery {
|
||||
EpisodeWidgetQuery {
|
||||
rowid: e.rowid,
|
||||
title: e.title,
|
||||
uri: e.uri,
|
||||
local_uri: e.local_uri,
|
||||
epoch: e.epoch,
|
||||
length: e.length,
|
||||
duration: e.duration,
|
||||
played: e.played,
|
||||
podcast_id: e.podcast_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl EpisodeWidgetQuery {
|
||||
/// Get the value of the sqlite's `ROW_ID`
|
||||
pub fn rowid(&self) -> i32 {
|
||||
|
||||
Reference in New Issue
Block a user