Headerbar: Do not allow insertion of invalid urls.
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
#![recursion_limit = "1024"]
|
||||
#![cfg_attr(all(test, feature = "clippy"), allow(option_unwrap_used, result_unwrap_used))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(blacklisted_name))]
|
||||
#![cfg_attr(feature = "clippy",
|
||||
warn(option_unwrap_used, result_unwrap_used, print_stdout,
|
||||
wrong_pub_self_convention, mut_mut, non_ascii_literal, similar_names,
|
||||
unicode_not_nfc, enum_glob_use, if_not_else, items_after_statements,
|
||||
used_underscore_binding))]
|
||||
#![cfg_attr(all(test, feature = "clippy"), allow(option_unwrap_used, result_unwrap_used))]
|
||||
|
||||
//! A libraty for parsing, indexing and retrieving podcast Feeds,
|
||||
//! into and from a Database.
|
||||
//! FIXME: Docs
|
||||
|
||||
#![allow(unknown_lints)]
|
||||
#![deny(bad_style, const_err, dead_code, improper_ctypes, legacy_directory_ownership,
|
||||
@@ -19,7 +18,6 @@
|
||||
unused_parens, while_true)]
|
||||
#![deny(missing_debug_implementations, missing_docs, trivial_casts, trivial_numeric_casts)]
|
||||
#![deny(unused_extern_crates, unused)]
|
||||
#![deny(unused_extern_crates, unused)]
|
||||
|
||||
// #![feature(conservative_impl_trait)]
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ use std::path::Path;
|
||||
|
||||
/// Scan downloaded `episode` entries that might have broken `local_uri`s and set them to `None`.
|
||||
fn download_checker() -> Result<()> {
|
||||
let episodes = dbqueries::get_downloaded_episodes()?;
|
||||
let mut episodes = dbqueries::get_downloaded_episodes()?;
|
||||
|
||||
episodes
|
||||
.into_par_iter()
|
||||
.par_iter_mut()
|
||||
.filter(|ep| !Path::new(ep.local_uri().unwrap()).exists())
|
||||
.for_each(|mut ep| {
|
||||
.for_each(|ep| {
|
||||
ep.set_local_uri(None);
|
||||
if let Err(err) = ep.save() {
|
||||
error!("Error while trying to update episode: {:#?}", ep);
|
||||
|
||||
Reference in New Issue
Block a user