mirror of
https://github.com/GuillemCastro/spotify-dl.git
synced 2025-07-04 13:05:30 +02:00
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:
parent
afafa36263
commit
dbf1db040b
7 changed files with 85 additions and 24 deletions
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue