Partial cleanup of dbqueries.

This commit is contained in:
Jordan Petridis
2017-11-05 14:56:24 +02:00
parent 27c73e3d30
commit 7b5bca2162
6 changed files with 73 additions and 100 deletions
+1 -1
View File
@@ -145,5 +145,5 @@ fn init_flowbox(db: &Database, stack: &gtk::Stack, flowbox: &gtk::FlowBox) {
on_flowbox_child_activate(&db, &stack, &parent);
}));
// Populate the flowbox with the Podcasts.
populate_flowbox(db, stack, &flowbox);
populate_flowbox(db, stack, flowbox);
}
+2 -2
View File
@@ -152,7 +152,7 @@ fn on_download_clicked(
fn on_play_bttn_clicked(db: &Database, episode_id: i32) {
let local_uri = {
let tempdb = db.lock().unwrap();
dbqueries::get_episode_local_uri(&tempdb, episode_id).unwrap()
dbqueries::get_episode_local_uri_from_id(&tempdb, episode_id).unwrap()
};
if let Some(uri) = local_uri {
@@ -175,7 +175,7 @@ fn on_play_bttn_clicked(db: &Database, episode_id: i32) {
fn on_delete_bttn_clicked(db: &Database, episode_id: i32) {
let mut ep = {
let tempdb = db.lock().unwrap();
dbqueries::get_episode(&tempdb, episode_id).unwrap()
dbqueries::get_episode_from_id(&tempdb, episode_id).unwrap()
};
let e = delete_local_content(db, &mut ep);