Enable DSF support for libav builds

This commit is contained in:
CDrummond 2025-03-05 17:58:19 +00:00
parent ac87ebb66c
commit 751dca7091
2 changed files with 11 additions and 3 deletions

View File

@ -3,13 +3,16 @@
1. Add support for (DSD) WavPack - thanks to Bart Lauret
2. Update version of bliss library.
3. Use 'ffmpeg' commandline to decode files, and not ffmpeg libraries by
defualt. Pass "--features=libav" to cargo to build against ffmpeg
libraries.
defualt. Pass '--features=libav' to cargo to build against ffmpeg
libraries. Pass '--features=libav,libavstatic' to cargo to build against
ffmpeg libraries, and statically link these in.
4. Add ability to specify LMS JSONRPC port.
5. If new files analysed and 'ignore' file exists then update DB's 'ignore'
flags.
6. Add option to write analysis results to files, and use for future scans.
7. If log level set to 'trace' then set this level for the Bliss library too.
8. Enable support for '.dsf' files, but only if compiled against ffmpeg
libraries.
0.2.3
-----

View File

@ -40,6 +40,10 @@ use bliss_audio::{decoder::Decoder, BlissResult, Song};
const DONT_ANALYSE: &str = ".notmusic";
const MAX_ERRORS_TO_SHOW: usize = 100;
const MAX_TAG_ERRORS_TO_SHOW: usize = 50;
#[cfg(feature = "libav")]
const VALID_EXTENSIONS: [&str; 7] = ["m4a", "mp3", "ogg", "flac", "opus", "wv", "dsf"];
#[cfg(not(feature = "libav"))]
const VALID_EXTENSIONS: [&str; 6] = ["m4a", "mp3", "ogg", "flac", "opus", "wv"];
fn get_file_list(db: &mut db::Db, mpath: &Path, path: &Path, track_paths: &mut Vec<String>, cue_tracks:&mut Vec<cue::CueTrack>, file_count:&mut usize, max_num_files: usize, use_tags: bool, tagged_file_count:&mut usize, dry_run: bool) {
@ -201,7 +205,8 @@ fn analyse_new_files(db: &db::Db, mpath: &PathBuf, track_paths: Vec<String>, max
album: track.album.unwrap_or_default().to_string(),
album_artist: track.album_artist.unwrap_or_default().to_string(),
genre: track.genre.unwrap_or_default().to_string(),
duration: track.duration.as_secs() as u32
duration: track.duration.as_secs() as u32,
analysis: None
};
// Remove prefix from audio_file_path