Merge pull request #173 from izderadicka/playlist-linux-fix
Playlist ordering and mime
This commit is contained in:
commit
62067b232f
1 changed files with 10 additions and 5 deletions
|
|
@ -152,7 +152,7 @@ impl HttpApi {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
playlist_items.sort();
|
playlist_items.sort_by(|left, right| left.1.cmp(&right.1));
|
||||||
Ok(playlist_items)
|
Ok(playlist_items)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,10 +177,15 @@ impl HttpApi {
|
||||||
})
|
})
|
||||||
.join("\r\n");
|
.join("\r\n");
|
||||||
(
|
(
|
||||||
[(
|
if cfg!(any(target_os = "macos", target_os = "ios")) {
|
||||||
"Content-Type",
|
[(
|
||||||
"application/vnd.apple.mpegurl; charset=utf-8",
|
"Content-Type",
|
||||||
)],
|
"application/vnd.apple.mpegurl; charset=utf-8",
|
||||||
|
)]
|
||||||
|
} else {
|
||||||
|
// apple mime does not work with VLC on linux
|
||||||
|
[("Content-Type", "text/plain; charset=utf-8")]
|
||||||
|
},
|
||||||
body,
|
body,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue