feat!: playlists
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::{fs, path::Path};
|
||||
use image::EncodableLayout;
|
||||
use webp::Encoder;
|
||||
use axum::Router;
|
||||
use image::EncodableLayout;
|
||||
use std::{fs, path::Path};
|
||||
use tower_http::services::ServeDir;
|
||||
use webp::Encoder;
|
||||
|
||||
use crate::music::metadata::CoverData;
|
||||
|
||||
@@ -40,7 +40,11 @@ pub fn get_all_cover_hashes() -> Vec<String> {
|
||||
hashes
|
||||
}
|
||||
|
||||
pub fn write_cover(hash: &str, cover: &CoverData, base_path: &str) -> Result<(), Box<dyn std::error::Error>> {
|
||||
pub fn write_cover(
|
||||
hash: &str,
|
||||
cover: &CoverData,
|
||||
base_path: &str,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
if cover.mime_type != "image/jpeg"
|
||||
&& cover.mime_type != "image/png"
|
||||
&& cover.mime_type != "image/webp"
|
||||
|
||||
Reference in New Issue
Block a user