diff --git a/Cargo.toml b/Cargo.toml index 7bcf5739..1ea42a04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ features = ["v1_5"] [dependencies.gemini] package = "ggemini" -version = "0.12.0" +version = "0.13.0" [dependencies.gemtext] package = "ggemtext" @@ -47,5 +47,5 @@ version = "0.9.1" # development [patch.crates-io] -# ggemini = { git = "https://github.com/YGGverse/ggemini.git" } +ggemini = { path = "https://github.com/YGGverse/ggemini.git" } # ggemtext = { git = "https://github.com/YGGverse/ggemtext.git" } diff --git a/src/app/browser/window/tab/item/page.rs b/src/app/browser/window/tab/item/page.rs index defecd37..35892bd7 100644 --- a/src/app/browser/window/tab/item/page.rs +++ b/src/app/browser/window/tab/item/page.rs @@ -528,8 +528,8 @@ impl Page { } ); } else { // browse - match response.meta.mime { - Some(gemini::client::connection::response::meta::Mime::TextGemini) => { + match response.meta.mime.unwrap().value.to_lowercase().as_str() { + "text/gemini" => { // Read entire input stream to buffer gemini::client::connection::response::data::Text::from_stream_async( response.connection.stream(), @@ -592,12 +592,7 @@ impl Page { } ); }, - Some( - gemini::client::connection::response::meta::Mime::ImagePng | - gemini::client::connection::response::meta::Mime::ImageGif | - gemini::client::connection::response::meta::Mime::ImageJpeg | - gemini::client::connection::response::meta::Mime::ImageWebp - ) => { + "image/png" | "image/gif" | "image/jpeg" | "image/webp" => { // Final image size unknown, show loading widget let status = content.to_status_loading( Some(Duration::from_secs(1)) // show if download time > 1 second