Compare commits

..

No commits in common. "f05e17ee3afdaa55218b0a4f09d5d5146c220113" and "f338ab751aac1261945430d0b2509b84e673e5d9" have entirely different histories.

4 changed files with 3 additions and 14 deletions

4
Cargo.lock generated
View file

@ -1264,9 +1264,9 @@ dependencies = [
[[package]]
name = "rustix"
version = "0.37.25"
version = "0.37.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4eb579851244c2c03e7c24f501c3432bed80b8f720af1d6e5b0e0f01555a035"
checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06"
dependencies = [
"bitflags",
"errno",

View file

@ -25,7 +25,6 @@ pub struct QueueItem {
#[derive(Debug)]
pub enum Entry {
Song {
track: Option<i32>,
name: String,
artist: String,
path: String,
@ -273,7 +272,6 @@ impl Mpd {
.flat_map(|prop| {
if let Some(file) = prop.get("file") {
Some(Entry::Song {
track: prop.get("Track").and_then(|track| track.parse().ok()),
name: prop.get("Title").unwrap_or(&get_filename(file)).clone(),
artist: prop.get("Artist").unwrap_or(&String::new()).clone(),
path: file.to_string(),

View file

@ -225,10 +225,6 @@ ul.dir li .material-symbols-outlined {
object-fit: cover;
}
.track {
margin-right: 0.75rem;
}
.player {
width: 25rem;
padding: 1rem 1rem 0;

View file

@ -48,7 +48,7 @@
<ul class="dir" hx-boost="true" tabindex="-1">
{% for entry in entries %}
{% match entry %}
{% when mpd::Entry::Song with { track, name, path, artist } %}
{% when mpd::Entry::Song with { name, path, artist } %}
<li
hx-post="/queue?path={{ path|urlencode }}"
hx-trigger="click,keyup[key=='Enter']"
@ -64,11 +64,6 @@
alt="Album art"
>
</div>
{% if let Some(track) = track %}
<div class="track">
{{ track }}.
</div>
{% endif %}
<div class="song">
<div class="song__name">{{ name }}</div>
<div class="song__artist">{{ artist }}</div>