From 75ad1075178e9e51a08881b83168b75d46712b92 Mon Sep 17 00:00:00 2001 From: Erica Z Date: Sun, 3 Nov 2024 19:39:27 +0100 Subject: [PATCH] 1 --- src/main.rs | 4 ++-- src/{playbin2.rs => playbin.rs} | 0 src/playbin_song.rs | 6 ++++++ src/ui/window.rs | 6 ------ 4 files changed, 8 insertions(+), 8 deletions(-) rename src/{playbin2.rs => playbin.rs} (100%) diff --git a/src/main.rs b/src/main.rs index bb49235..48cabd7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,8 +16,8 @@ pub use playbin_song::Song as PlaybinSong; pub mod subsonic; -pub mod playbin2; -pub type Playbin = playbin2::Playbin; +pub mod playbin; +pub type Playbin = playbin::Playbin; mod signal; pub use signal::{Signal, SignalEmitter, SignalHandler}; diff --git a/src/playbin2.rs b/src/playbin.rs similarity index 100% rename from src/playbin2.rs rename to src/playbin.rs diff --git a/src/playbin_song.rs b/src/playbin_song.rs index 251e742..3f154f0 100644 --- a/src/playbin_song.rs +++ b/src/playbin_song.rs @@ -98,3 +98,9 @@ impl Song { .build() } } + +impl crate::playbin::PlaybinEntry for Song { + fn url(&self) -> url::Url { + self.stream_url() + } +} diff --git a/src/ui/window.rs b/src/ui/window.rs index 5ed2d8c..f37a102 100644 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -7,12 +7,6 @@ mod imp { use std::cell::{Cell, RefCell}; use std::rc::Rc; - impl crate::playbin2::PlaybinEntry for PlaybinSong { - fn url(&self) -> url::Url { - self.stream_url() - } - } - #[derive(gtk::CompositeTemplate, glib::Properties, Default)] #[template(resource = "/eu/callcc/audrey/window.ui")] #[properties(wrapper_type = super::Window)]