diff --git a/Cargo.toml b/Cargo.toml index 35a245b..e4e6253 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,6 @@ exclude = [ [features] tls = ["native-tls"] tor = ["tor-stream"] -media = [] default = ["tls", "tor"] [profile.release] diff --git a/README.md b/README.md index 547f4d1..427d58f 100644 --- a/README.md +++ b/README.md @@ -125,13 +125,11 @@ To enable just TLS support, or just Tor support, use `--features`: ## media player support -phetch includes experimental support for opening video files (`;` item -type) and sound files (`s` item type) in [mpv]. To test it out, -compile phetch using the `--features media` flag and then visit a -compatible Gopher server (maybe one using [gophor]?). Or check out the -"gopher types" help page by pressing `ctrl-h` then `3` in phetch: - - cargo run --features media gopher://phetch/1/help/types +phetch includes support for opening video files (`;` item type) and +sound files (`s` item type) in [mpv] or an application of your choice +using the `-m` command line flag. To test it out, visit a compatible +Gopher server (maybe one using [Gophor]?). Or check out the "gopher +types" help page by pressing `ctrl-h` then `3` in phetch. ## todo diff --git a/src/gopher/type.rs b/src/gopher/type.rs index ce09083..11ccf53 100644 --- a/src/gopher/type.rs +++ b/src/gopher/type.rs @@ -76,13 +76,6 @@ impl Type { } } - #[cfg(not(feature = "media"))] - /// Does nothing without the 'media' feature. - pub fn is_media(self) -> bool { - false - } - - #[cfg(feature = "media")] /// Check if media to open in player pub fn is_media(self) -> bool { match self { diff --git a/src/help.rs b/src/help.rs index f0bb17a..3e6bd6d 100644 --- a/src/help.rs +++ b/src/help.rs @@ -239,39 +239,6 @@ i# show emoji status indicators iemoji no "; -#[cfg(not(feature = "media"))] -const TYPES: &str = " -i ** gopher types ** -i -iphetch supports these links: -i -0text files /Mirrors/RFC/rfc1436.txt fnord.one 65446 -1menu items /lawn/ascii bitreich.org -3errors /help/types phetch -7search servers / forthworks.com 7001 -8telnet links /help/types phetch -hexternal urls URL:https://en.wikipedia.org/wiki/Phetch phetch -i -iand these download types: -i -4binhex /help/types phetch -5dosfiles /help/types phetch -6uuencoded files /help/types phetch -9binaries /help/types phetch -gGIFs /help/types phetch -Iimages downloads /help/types phetch -ssound files /help/types phetch -ddocuments /help/types phetch -i -iphetch does not support: -i -2CSO Entries /help/types phetch -+Mirrors /help/types phetch -TTelnet3270 /help/types phetch -i -"; - -#[cfg(feature = "media")] const TYPES: &str = " i ** gopher types ** i diff --git a/src/ui.rs b/src/ui.rs index c3064c6..92a0d5d 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -188,7 +188,6 @@ impl UI { // binary downloads let typ = gopher::type_for_url(url); - #[cfg(feature = "media")] if typ.is_media() { self.dirty = true; return if self.confirm(&format!("Open in media player? {}", url)) { diff --git a/src/utils.rs b/src/utils.rs index 9e64d8d..17f1bda 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -96,7 +96,6 @@ pub fn open_external(url: &str) -> Result<()> { } } -#[cfg(feature = "media")] /// Opens a media file with `mpv`. pub fn open_media(url: &str) -> Result<()> { use {crate::terminal, std::io};