Bump mp3 encoding to 320kbps, attach album cover and artist/album/title metadata to the file, handle file collision gracefully (useful for syncing playlists - download only missing files)

This commit is contained in:
Erik Kaju 2025-06-19 23:52:37 +03:00
parent afafa36263
commit dbf1db040b
7 changed files with 85 additions and 24 deletions

View file

@ -19,14 +19,14 @@ pub struct ChannelSink {
impl ChannelSink {
pub fn new(track: TrackMetadata) -> (Self, SinkEventChannel) {
pub fn new(track: &TrackMetadata) -> (Self, SinkEventChannel) {
let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
(
ChannelSink {
sender: tx,
bytes_sent: 0,
bytes_total: Self::convert_track_duration_to_size(&track),
bytes_total: Self::convert_track_duration_to_size(track),
},
rx,
)