Skip to content

Commit

Permalink
chore: small tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Feb 26, 2025
1 parent 305e932 commit ac76923
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/models/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ impl<E: Env + 'static> UpdateWithCtx<E> for Player {
.as_ref()
.map(|meta_request| &meta_request.path.id)
{
item_state_update(&mut self.library_item, &self.next_video)
item_state_update(&mut self.library_item, self.next_video.as_ref())
} else {
Effects::none().unchanged()
};
Expand Down Expand Up @@ -311,7 +311,7 @@ impl<E: Env + 'static> UpdateWithCtx<E> for Player {
);

let item_state_update_effects =
item_state_update(&mut self.library_item, &self.next_video);
item_state_update(&mut self.library_item, self.next_video.as_ref());
let push_to_library_effects = match &self.library_item {
Some(library_item) => Effects::msg(Msg::Internal(Internal::UpdateLibraryItem(
library_item.to_owned(),
Expand Down Expand Up @@ -906,7 +906,7 @@ fn push_to_library<E: Env + 'static>(

fn item_state_update(
library_item: &mut Option<LibraryItem>,
next_video: &Option<Video>,
next_video: Option<&Video>,
) -> Effects {
match library_item {
Some(library_item)
Expand Down
1 change: 1 addition & 0 deletions src/models/streaming_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use crate::types::torrent::InfoHash;
pub struct PlaybackDevice {
pub id: String,
pub name: String,
/// E.g. `external`
pub r#type: String,
}

Expand Down

0 comments on commit ac76923

Please sign in to comment.