mirror of
https://github.com/Dangoware/dmp-core.git
synced 2025-04-19 13:22:54 -05:00
Fixed errors in foobar reader
This commit is contained in:
parent
cab60e1560
commit
5000d24a77
3 changed files with 5 additions and 4 deletions
|
@ -6,6 +6,7 @@ pub mod music_storage {
|
||||||
pub mod db_reader {
|
pub mod db_reader {
|
||||||
pub mod foobar {
|
pub mod foobar {
|
||||||
pub mod reader;
|
pub mod reader;
|
||||||
|
pub mod utils;
|
||||||
}
|
}
|
||||||
pub mod musicbee {
|
pub mod musicbee {
|
||||||
pub mod reader;
|
pub mod reader;
|
||||||
|
|
|
@ -36,7 +36,7 @@ impl ExternalLibrary for FoobarPlaylist {
|
||||||
}
|
}
|
||||||
|
|
||||||
let meta_size = i32::from_le_bytes(get_bytes(&mut buf_iter)) as usize;
|
let meta_size = i32::from_le_bytes(get_bytes(&mut buf_iter)) as usize;
|
||||||
let metadata = get_bytes_vec(&mut buf_iter, meta_size);
|
let metadata = &get_bytes_vec(&mut buf_iter, meta_size);
|
||||||
let track_count = i32::from_le_bytes(get_bytes(&mut buf_iter));
|
let track_count = i32::from_le_bytes(get_bytes(&mut buf_iter));
|
||||||
|
|
||||||
// Read all the track fields
|
// Read all the track fields
|
||||||
|
@ -135,7 +135,7 @@ impl ExternalLibrary for FoobarPlaylist {
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
songs: retrieved_songs,
|
songs: retrieved_songs,
|
||||||
metadata,
|
metadata: metadata.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ pub struct FoobarPlaylistTrack {
|
||||||
|
|
||||||
impl FoobarPlaylistTrack {
|
impl FoobarPlaylistTrack {
|
||||||
fn find_song(&self) -> Song {
|
fn find_song(&self) -> Song {
|
||||||
let location = URI::Local(self.file_name.into());
|
let location = URI::Local(self.file_name.clone().into());
|
||||||
|
|
||||||
Song {
|
Song {
|
||||||
location,
|
location,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
pub fn meta_offset(metadata: Vec<u8>, offset: usize) -> String {
|
pub fn meta_offset(metadata: &Vec<u8>, offset: usize) -> String {
|
||||||
let mut result_vec = Vec::new();
|
let mut result_vec = Vec::new();
|
||||||
|
|
||||||
let mut i = offset;
|
let mut i = offset;
|
||||||
|
|
Loading…
Reference in a new issue