aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--Cargo.toml2
-rw-r--r--src/main.rs2
-rw-r--r--src/match_handler.rs3
-rw-r--r--src/structs.rs12
5 files changed, 7 insertions, 15 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 4ba9f1d..ad65474 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+0.8.1
+- Fix parser to actually see "sub" subcommand
+
0.8.0
- Add a few subcommands / subcommand shortcuts
- Internal cleanup
diff --git a/Cargo.toml b/Cargo.toml
index 5b71faf..b13c130 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "podcast"
edition = "2018"
-version = "0.8.0"
+version = "0.8.1"
authors = ["Nathan Jaremko <njaremko@gmail.com>"]
description = "A command line podcast manager"
license = "GPL-3.0"
diff --git a/src/main.rs b/src/main.rs
index 2e312e7..8be9e82 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -30,7 +30,7 @@ pub mod errors {
use self::errors::*;
use self::structs::*;
-const VERSION: &str = "0.8.0";
+const VERSION: &str = "0.8.1";
fn main() -> Result<()> {
utils::create_directories().chain_err(|| "unable to create directories")?;
diff --git a/src/match_handler.rs b/src/match_handler.rs
index 3fd7c6a..599e8f1 100644
--- a/src/match_handler.rs
+++ b/src/match_handler.rs
@@ -66,7 +66,8 @@ pub fn handle_matches(
}
Some("sub") | Some("subscribe") => {
let subscribe_matches = matches
- .subcommand_matches("subscribe")
+ .subcommand_matches("sub")
+ .or_else(|| matches.subcommand_matches("subscribe"))
.chain_err(|| "unable to find subcommand matches")?;
let url = subscribe_matches
.value_of("URL")
diff --git a/src/structs.rs b/src/structs.rs
index 56c1674..d6bad40 100644
--- a/src/structs.rs
+++ b/src/structs.rs
@@ -211,18 +211,6 @@ impl Podcast {
))
}
- pub fn delete(title: &str) -> Result<()> {
- let mut path = get_xml_dir()?;
- let mut filename = String::from(title);
- filename.push_str(".xml");
- path.push(filename);
- fs::remove_file(path).chain_err(|| UNABLE_TO_REMOVE_FILE)
- }
-
- pub fn delete_all() -> Result<()> {
- fs::remove_dir_all(get_xml_dir()?).chain_err(|| UNABLE_TO_READ_DIRECTORY)
- }
-
pub fn episodes(&self) -> Vec<Episode> {
let mut result = Vec::new();
for item in self.0.items().to_owned() {