├── .gitignore ├── configs ├── linux.ini ├── macos.ini └── windows.ini ├── scripts └── bliss-analyser-arm ├── docker ├── Dockerfile_x86_symphonia ├── docker-build-x86-ffmpeg.sh ├── docker-build-x86-symphonia.sh ├── docker-build-arm-symphonia.sh ├── Dockerfile_arm_symphonia ├── Dockerfile_x86_ffmpeg ├── docker-build-arm-ffmpeg.sh └── Dockerfile_arm_ffmpeg ├── Cargo.toml ├── README.md ├── ChangeLog ├── src ├── upload.rs ├── tags.rs ├── main.rs ├── analyse.rs └── db.rs ├── download.py ├── .github └── workflows │ └── build.yml ├── UserGuide.md ├── LICENSE └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | bliss.db 3 | -------------------------------------------------------------------------------- /configs/linux.ini: -------------------------------------------------------------------------------- 1 | [Bliss] 2 | music=/home/user/Music 3 | lms=127.0.0.1 4 | -------------------------------------------------------------------------------- /configs/macos.ini: -------------------------------------------------------------------------------- 1 | [Bliss] 2 | music=/Users/user/Music 3 | lms=127.0.0.1 4 | -------------------------------------------------------------------------------- /configs/windows.ini: -------------------------------------------------------------------------------- 1 | [Bliss] 2 | music=c:\Users\user\Music 3 | lms=127.0.0.1 4 | -------------------------------------------------------------------------------- /scripts/bliss-analyser-arm: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ARCH=`arch` 4 | SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; 5 | 6 | if [ "$ARCH" = "aarch64" ] ; then 7 | $SCRIPT_DIR/bin/bliss-analyser-aarch64 $* 8 | else 9 | $SCRIPT_DIR/bin/bliss-analyser-armhf $* 10 | fi 11 | -------------------------------------------------------------------------------- /docker/Dockerfile_x86_symphonia: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | RUN dpkg --add-architecture amd64 4 | RUN apt-get update 5 | 6 | RUN apt-get install -y curl git pkg-config yasm 7 | RUN apt-get install -y build-essential clang 8 | RUN apt-get install -y musl-tools musl-dev musl 9 | 10 | RUN curl https://sh.rustup.rs -sSf | sh -s -- -y 11 | ENV PATH="/root/.cargo/bin/:${PATH}" 12 | RUN rustup target add x86_64-unknown-linux-musl 13 | 14 | RUN mkdir /build 15 | ENV CARGO_TARGET_DIR /build 16 | ENV CARGO_HOME /build/cache 17 | 18 | RUN mkdir /src 19 | 20 | WORKDIR /src 21 | CMD ["/src/docker/docker-build-x86-symphonia.sh"] 22 | 23 | -------------------------------------------------------------------------------- /docker/docker-build-x86-ffmpeg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | set -eux 3 | 4 | uname -a 5 | DESTDIR=/src/releases 6 | mkdir -p $DESTDIR 7 | 8 | function build { 9 | echo Building for $1 to $3... 10 | 11 | if [[ ! -f /build/$1/release/bliss-analyser ]]; then 12 | cargo build --release --features=update-aubio-bindings,libav,staticlibav --target $1 13 | fi 14 | 15 | $2 /build/$1/release/bliss-analyser && cp /build/$1/release/bliss-analyser $DESTDIR/$3 16 | } 17 | 18 | build x86_64-unknown-linux-musl strip bliss-analyser 19 | 20 | cp UserGuide.md $DESTDIR/README.md 21 | cp LICENSE $DESTDIR/ 22 | cp configs/linux.ini $DESTDIR/config.ini 23 | -------------------------------------------------------------------------------- /docker/docker-build-x86-symphonia.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## #!/usr/bin/env bash 3 | set -eux 4 | 5 | uname -a 6 | DESTDIR=/src/releases 7 | mkdir -p $DESTDIR 8 | 9 | function build { 10 | echo Building for $1 to $3... 11 | 12 | if [[ ! -f /build/$1/release/bliss-analyser ]]; then 13 | cargo build --release --features update-aubio-bindings,symphonia --target $1 14 | fi 15 | 16 | $2 /build/$1/release/bliss-analyser && cp /build/$1/release/bliss-analyser $DESTDIR/$3 17 | } 18 | 19 | build x86_64-unknown-linux-musl strip bliss-analyser 20 | 21 | cp UserGuide.md $DESTDIR/README.md 22 | cp LICENSE $DESTDIR/ 23 | cp configs/linux.ini $DESTDIR/config.ini 24 | -------------------------------------------------------------------------------- /docker/docker-build-arm-symphonia.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## #!/usr/bin/env bash 3 | set -eux 4 | 5 | uname -a 6 | DESTDIR=/src/releases 7 | 8 | mkdir -p $DESTDIR/bin 9 | rm -rf $DESTDIR/bin/* 10 | 11 | function build { 12 | echo Building for $1 to $3... 13 | 14 | if [[ ! -f /build/$1/release/bliss-analyser ]]; then 15 | cargo build --release --features=symphonia --target $1 16 | fi 17 | 18 | $2 /build/$1/release/bliss-analyser && cp /build/$1/release/bliss-analyser $DESTDIR/$3 19 | } 20 | 21 | build arm-unknown-linux-gnueabihf arm-linux-gnueabihf-strip bin/bliss-analyser-armhf 22 | build aarch64-unknown-linux-gnu aarch64-linux-gnu-strip bin/bliss-analyser-aarch64 23 | 24 | cp UserGuide.md $DESTDIR/README.md 25 | cp LICENSE $DESTDIR/ 26 | cp configs/linux.ini $DESTDIR/config.ini 27 | cp scripts/bliss-analyser-arm $DESTDIR/bliss-analyser 28 | -------------------------------------------------------------------------------- /docker/Dockerfile_arm_symphonia: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | RUN dpkg --add-architecture arm64 && \ 4 | dpkg --add-architecture armhf 5 | RUN apt-get update 6 | 7 | RUN apt-get install -y curl git pkg-config yasm 8 | RUN apt-get install -y build-essential clang 9 | RUN apt-get install -y crossbuild-essential-armhf crossbuild-essential-arm64 10 | 11 | RUN curl https://sh.rustup.rs -sSf | sh -s -- -y 12 | ENV PATH="/root/.cargo/bin/:${PATH}" 13 | RUN rustup target add aarch64-unknown-linux-gnu && \ 14 | rustup target add arm-unknown-linux-gnueabihf 15 | 16 | RUN mkdir /.cargo && \ 17 | echo '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' > /.cargo/config && \ 18 | echo '[target.arm-unknown-linux-gnueabihf]\nlinker = "arm-linux-gnueabihf-gcc"' >> /.cargo/config 19 | 20 | RUN mkdir /build 21 | ENV CARGO_TARGET_DIR /build 22 | ENV CARGO_HOME /build/cache 23 | 24 | RUN mkdir /src 25 | 26 | WORKDIR /src 27 | CMD ["/src/docker/docker-build-arm-symphonia.sh"] 28 | 29 | -------------------------------------------------------------------------------- /docker/Dockerfile_x86_ffmpeg: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | RUN dpkg --add-architecture amd64 4 | RUN apt-get update 5 | 6 | RUN apt-get install -y curl git pkg-config yasm 7 | RUN apt-get install -y build-essential clang 8 | 9 | # Download and extract musl-cross toolchain for x86_64 10 | RUN curl -LO https://musl.cc/x86_64-linux-musl-cross.tgz \ 11 | && tar -xzf x86_64-linux-musl-cross.tgz \ 12 | && mv x86_64-linux-musl-cross /opt/musl-toolchain \ 13 | && rm x86_64-linux-musl-cross.tgz 14 | 15 | ENV PATH="/opt/musl-toolchain/bin:/root/.cargo/bin:${PATH}" 16 | 17 | # Optionally, still install musl-tools (for musl-gcc wrapper, not strictly needed now) 18 | RUN apt-get install -y musl-tools musl-dev musl 19 | 20 | RUN curl https://sh.rustup.rs -sSf | sh -s -- -y 21 | RUN rustup target add x86_64-unknown-linux-musl 22 | 23 | RUN mkdir /build 24 | ENV CARGO_TARGET_DIR /build 25 | ENV CARGO_HOME /build/cache 26 | 27 | RUN mkdir /src 28 | 29 | WORKDIR /src 30 | CMD ["/src/docker/docker-build-x86-ffmpeg.sh"] -------------------------------------------------------------------------------- /docker/docker-build-arm-ffmpeg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## #!/usr/bin/env bash 3 | set -eux 4 | 5 | uname -a 6 | DESTDIR=/src/releases 7 | 8 | mkdir -p $DESTDIR/bin 9 | rm -rf $DESTDIR/bin/* 10 | 11 | function build { 12 | echo Building for $1 to $3... 13 | 14 | if [[ ! -f /build/$1/release/bliss-analyser ]]; then 15 | export RUST_BACKTRACE=full 16 | export PKG_CONFIG=${1//unknown-/}-pkg-config 17 | BINDGEN_EXTRA_CLANG_ARGS="--sysroot /usr/${1//unknown-/}" cargo build --release --features=libav,staticlibav --target $1 18 | fi 19 | 20 | $2 /build/$1/release/bliss-analyser && cp /build/$1/release/bliss-analyser $DESTDIR/$3 21 | } 22 | 23 | build arm-unknown-linux-gnueabihf arm-linux-gnueabihf-strip bin/bliss-analyser-armhf 24 | build aarch64-unknown-linux-gnu aarch64-linux-gnu-strip bin/bliss-analyser-aarch64 25 | 26 | cp UserGuide.md $DESTDIR/README.md 27 | cp LICENSE $DESTDIR/ 28 | cp configs/linux.ini $DESTDIR/config.ini 29 | cp scripts/bliss-analyser-arm $DESTDIR/bliss-analyser 30 | -------------------------------------------------------------------------------- /docker/Dockerfile_arm_ffmpeg: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | RUN dpkg --add-architecture arm64 && \ 4 | dpkg --add-architecture armhf 5 | RUN apt-get update 6 | 7 | RUN apt-get install -y curl git pkg-config yasm 8 | RUN apt-get install -y build-essential clang 9 | RUN apt-get install -y crossbuild-essential-armhf crossbuild-essential-arm64 10 | 11 | RUN apt-get install -y libavutil-dev:arm64 libavcodec-dev:arm64 libavformat-dev:arm64 \ 12 | libavfilter-dev:arm64 libavdevice-dev:arm64 libswresample-dev:arm64 libfftw3-dev:arm64 13 | 14 | RUN apt-get install -y libavutil-dev:armhf libavcodec-dev:armhf libavformat-dev:armhf \ 15 | libavfilter-dev:armhf libavdevice-dev:armhf libswresample-dev:armhf libfftw3-dev:armhf 16 | 17 | RUN curl https://sh.rustup.rs -sSf | sh -s -- -y 18 | ENV PATH="/root/.cargo/bin/:${PATH}" 19 | RUN rustup target add aarch64-unknown-linux-gnu && \ 20 | rustup target add arm-unknown-linux-gnueabihf 21 | 22 | RUN mkdir /.cargo && \ 23 | echo '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' > /.cargo/config && \ 24 | echo '[target.arm-unknown-linux-gnueabihf]\nlinker = "arm-linux-gnueabihf-gcc"' >> /.cargo/config 25 | 26 | RUN mkdir /build 27 | ENV CARGO_TARGET_DIR /build 28 | ENV CARGO_HOME /build/cache 29 | 30 | RUN mkdir /src 31 | 32 | WORKDIR /src 33 | CMD ["/src/docker/docker-build-arm-ffmpeg.sh"] 34 | 35 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bliss-analyser" 3 | version = "0.5.2" 4 | authors = ["Craig Drummond "] 5 | edition = "2021" 6 | license = "GPL-3.0-only" 7 | description = "Analyse audio files with bliss-rs" 8 | repository = "https://github.com/CDrummond/bliss-analyser" 9 | keywords = ["audio", "song", "similarity"] 10 | readme = "README.md" 11 | 12 | [profile.release] 13 | strip=true 14 | 15 | [dependencies] 16 | argparse = "0.2.2" 17 | anyhow = "1.0.40" 18 | rusqlite = { version = "0.34.0", features = ["bundled"] } 19 | log = "0.4.14" 20 | env_logger = "0.11.7" 21 | indicatif = "0.16.2" 22 | lofty = "0.22.2" 23 | filetime = "0.2" 24 | dirs = "1" 25 | chrono = "0.4.40" 26 | regex = "1" 27 | substring = "1.4.5" 28 | ureq = "2.4.0" 29 | configparser = "3.0.0" 30 | if_chain = "1.0.2" 31 | num_cpus = "1.13.0" 32 | which = { version = "7.0.2", optional = true } 33 | rcue = { version = "0.1.3", optional = true } 34 | hhmmss = { version = "0.1.0", optional = true } 35 | ctrlc = "3.4" 36 | serde_json = "1.0.145" 37 | 38 | [features] 39 | libav = ["bliss-audio/ffmpeg"] 40 | update-aubio-bindings = ["bliss-audio/update-aubio-bindings"] 41 | staticlibav = ["bliss-audio/build-ffmpeg", "bliss-audio/ffmpeg-static"] 42 | symphonia = ["bliss-audio/symphonia-all", "bliss-audio/symphonia-aiff", "bliss-audio/symphonia-alac"] 43 | rpi = ["bliss-audio/rpi"] 44 | 45 | [dependencies.bliss-audio] 46 | default-features = false 47 | features = ["aubio-static"] 48 | version = "0.11.1" 49 | #git = "https://github.com/Polochon-street/bliss-rs.git" 50 | #rev = "006927ac16752ff2e00bfe0d6b7756f67fa822c0" 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bliss Analyser 2 | 3 | Simple rust app to analyse songs with [bliss-rs](https://github.com/Polochon-street/bliss-rs). 4 | The output of this is a SQLite database containing song metadata and 5 | bliss analysis. This is then intended to be used by [Bliss Mixer](https://github.com/CDrummond/bliss-mixer) 6 | 7 | 8 | # Building 9 | 10 | This application can be built in 4 variants: 11 | 12 | 1. Using `libavcodec`, etc, to decode files. 13 | 2. Using `libavcodec`, etc, to decode files, but statically linked to `libavcodec`, etc. 14 | 3. Using `symphonia` to decode files. 15 | 16 | 17 | `libavcodec` is the fastest (~15% faster than `symphonia`), but might have issues with 18 | library, versioning, etc., unless these libraries are statically linked in. `libavcodec` 19 | statically linked may reduce supported file formats, but is more portable. 20 | file formats, but is more portable. 21 | 22 | `symphonia` also produces a more portable application, is only slightly slower to decode 23 | files, but has more limited codec support, and can fail on more files. 24 | 25 | 26 | ## Build for 'libavcodec' library usage 27 | 28 | `clang`, `pkg-config`, and `ffmpeg` are required to build, as well as 29 | [Rust](https://www.rust-lang.org/tools/install) 30 | 31 | To install dependencies on a Debian system: 32 | 33 | ``` 34 | apt install -y clang libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev libavdevice-dev pkg-config 35 | ``` 36 | 37 | To install dependencies on a Fedora system: 38 | ``` 39 | dnf install ffmpeg-devel clang pkg-config 40 | ``` 41 | 42 | Build with `cargo build --release --features=libav` 43 | 44 | If building on a Raspberry Pi, then `rpi` also needs to be passed to `--features`, e.g. 45 | `cargo build --release --features=libav,rpi` 46 | 47 | The resultant application will be less portable, due to dependencies on `libavcodec` libraries (and 48 | their dependencies). 49 | 50 | 51 | 52 | ## Build for 'libavcodec' library usage, statically linked 53 | 54 | `clang`, `pkg-config`, and `ffmpeg` are required to build, as well as 55 | [Rust](https://www.rust-lang.org/tools/install) 56 | 57 | To install dependencies on a Debian system: 58 | 59 | ``` 60 | apt install -y clang libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev libavdevice-dev pkg-config 61 | ``` 62 | 63 | To install dependencies on a Fedora system: 64 | ``` 65 | dnf install ffmpeg-devel clang pkg-config 66 | ``` 67 | 68 | Build with `cargo build --release --features=libav,staticlibav` 69 | 70 | If building on a Raspberry Pi, then `rpi` also needs to be passed to `--features`, e.g. 71 | `cargo build --release --features=libav,staticlibav,rpi` 72 | 73 | 74 | 75 | ## Build for 'symphonia' 76 | 77 | `clang`, and `pkg-config` are required to build, as well as 78 | [Rust](https://www.rust-lang.org/tools/install) 79 | 80 | To install dependencies on a Debian system: 81 | 82 | ``` 83 | apt install -y clang pkg-config 84 | ``` 85 | 86 | To install dependencies on a Fedora system: 87 | ``` 88 | dnf install clang pkg-config 89 | ``` 90 | 91 | Build with `cargo build --release --features=symphonia` 92 | 93 | 94 | 95 | 96 | # Usage 97 | 98 | Please refer to `UserGuide.md` for details of how this tool may be used. 99 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 0.5.2 2 | ----- 3 | 1. Fix Linux builds. 4 | 5 | 0.5.1 6 | ----- 7 | 1. Use serde_json to build JSONRPC notification strings. 8 | 9 | 0.5.0 10 | ----- 11 | 1. Update to bliss-rs 0.11.1 12 | 2. Only build static-libav and symphonia by default. 13 | 3. Don't crash if file has no tags. 14 | 4. Set log level for tag reader library. 15 | 5. Multi-threaded read of existing analysis tags. 16 | 6. Store file failures in DB so don't re-analyse unless timestamp of file 17 | changes. 18 | 7. Drop support for using ffmpeg via commandline. 19 | 20 | 0.4.0 21 | ----- 22 | 1. Add action to export results from DB to files. 23 | 2. Add option to preserve file modification time when writing tags. 24 | 3. Store analysis in BLISS_ANALYSIS tag, not in a COMMENT tag. 25 | 4. Fix reading of tags during analysis phase. 26 | 5. Check for multiple genre tags, and if found add as semi-colon separated 27 | list to DB. 28 | 6. When analysing files, always read tags (if present), but only write tags 29 | if '--tags' is specified on commandline. 30 | 7. Use max of 16 significant digits (trailing zeros stripped) when writing 31 | analysis results to file tags. 32 | 8. Strip symbols from release binaries. 33 | 9. Gracefully handle Ctrl-C. 34 | 35 | 0.3.0 36 | ----- 37 | 1. Add support for (DSD) WavPack - thanks to Bart Lauret 38 | 2. Update version of tag reader library. 39 | 3. Update version of bliss library. 40 | 4. Allow builds to either use dynamic ffmpeg libraries, static ffmpeg 41 | libraries, symphonia, or ffmpeg on commandline. 42 | 5. Add ability to specify LMS JSONRPC port. 43 | 6. If new files analysed and 'ignore' file exists then update DB's 'ignore' 44 | flags. 45 | 7. Add option to write analysis results to files, and use for future scans. 46 | 8. If log level set to 'trace' then set this level for the bliss library too. 47 | 9. Enable support for '.dsf' files. 48 | 49 | 0.2.3 50 | ----- 51 | 1. Add option to limit number of concurrent threads. 52 | 2. Update version of tag reader library. 53 | 3. Update version of bliss library. 54 | 55 | 0.2.2 56 | ----- 57 | 1. Update version of tag reader library. 58 | 2. Update version of bliss library. 59 | 60 | 0.2.1 61 | ----- 62 | 1. Update version of tag reader library. 63 | 2. Fix checking if CUE already analysed. 64 | 65 | 0.2.0 66 | ----- 67 | 1. Tidy up code, thanks to Serial-ATA 68 | 2. Update version of tag reader library, should now support ID3v2 in FLAC. 69 | 3. Show error message if can't open, or create, DB file. 70 | 4. Update version of bliss-rs, this now handles CUE processing internally. 71 | 72 | 0.1.0 73 | ----- 74 | 1. Add support for analysing CUE files. 75 | 2. Output list of (up to 100) tracks that failed to analyse. 76 | 3. When performing a dry-run analysis (--dry-run) print paths of all tracks to 77 | be analysed and to be removed. 78 | 4. Use git version of tag reader library. 79 | 5. Support up to 5 music folders (music, music_1, music_2, music_3, and 80 | music_4). 81 | 82 | 0.0.2 83 | ----- 84 | 1. Package vcruntime140.dll with Windows ZIP. 85 | 2. Update user docs. 86 | 3. Update ignore syntax to allow adding SQL WHERE clauses. 87 | 4. Use newer version of tag reader library. 88 | 5. If fail to remove old tracks from DB, then output more info. 89 | 6. Fix removing old tracks when run under Windows. 90 | 91 | 0.0.1 92 | ----- 93 | 1. Initial release. 94 | -------------------------------------------------------------------------------- /src/upload.rs: -------------------------------------------------------------------------------- 1 | /** 2 | * Analyse music with Bliss 3 | * 4 | * Copyright (c) 2022-2025 Craig Drummond 5 | * GPLv3 license. 6 | * 7 | **/ 8 | 9 | use std::fs::File; 10 | use std::io::BufReader; 11 | use std::process; 12 | use substring::Substring; 13 | use ureq; 14 | 15 | fn fail(msg: &str) { 16 | log::error!("{}", msg); 17 | process::exit(-1); 18 | } 19 | 20 | pub fn stop_mixer(lms_host: &String, json_port: u16) { 21 | let stop_req = "{\"id\":1, \"method\":\"slim.request\",\"params\":[\"\",[\"blissmixer\",\"stop\"]]}"; 22 | 23 | log::info!("Asking plugin to stop mixer"); 24 | let req = ureq::post(&format!("http://{}:{}/jsonrpc.js", lms_host, json_port)).send_string(&stop_req); 25 | if let Err(e) = req { 26 | log::error!("Failed to ask plugin to stop mixer. {}", e); 27 | } 28 | } 29 | 30 | pub fn upload_db(db_path: &String, lms_host: &String, json_port: u16) { 31 | // First tell LMS to restart the mixer in upload mode 32 | let start_req = "{\"id\":1, \"method\":\"slim.request\",\"params\":[\"\",[\"blissmixer\",\"start-upload\"]]}"; 33 | let mut port: u16 = 0; 34 | 35 | log::info!("Requesting LMS plugin to allow uploads"); 36 | 37 | match ureq::post(&format!("http://{}:{}/jsonrpc.js", lms_host, json_port)).send_string(&start_req) { 38 | Ok(resp) => match resp.into_string() { 39 | Ok(text) => match text.find("\"port\":") { 40 | Some(s) => { 41 | let txt = text.to_string().substring(s + 7, text.len()).to_string(); 42 | match txt.find("}") { 43 | Some(e) => { 44 | let p = txt.substring(0, e); 45 | let test = p.parse::(); 46 | match test { 47 | Ok(val) => { port = val; } 48 | Err(_) => { fail("Could not parse resp (cast)"); } 49 | } 50 | } 51 | None => { fail("Could not parse resp (closing)"); } 52 | } 53 | } 54 | None => { fail("Could not parse resp (no port)"); } 55 | } 56 | Err(_) => fail("No text?"), 57 | } 58 | Err(e) => { fail(&format!("Failed to ask LMS plugin to allow upload. {}", e)); } 59 | } 60 | 61 | if port == 0 { 62 | fail("Invalid port"); 63 | } 64 | 65 | // Now we have port number, do the actual upload... 66 | log::info!("Uploading {}", db_path); 67 | match File::open(db_path) { 68 | Ok(file) => match file.metadata() { 69 | Ok(meta) => { 70 | let buffered_reader = BufReader::new(file); 71 | log::info!("Length: {}", meta.len()); 72 | match ureq::put(&format!("http://{}:{}/upload", lms_host, port)) 73 | .set("Content-Length", &meta.len().to_string()) 74 | .set("Content-Type", "application/octet-stream") 75 | .send(buffered_reader) { 76 | Ok(_) => { 77 | log::info!("Database uploaded"); 78 | stop_mixer(lms_host, json_port); 79 | } 80 | Err(e) => { fail(&format!("Failed to upload database. {}", e)); } 81 | } 82 | } 83 | Err(e) => { fail(&format!("Failed to open database. {}", e)); } 84 | } 85 | Err(e) => { fail(&format!("Failed to open database. {}", e)); } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /download.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # 4 | # LMS-BlissMixer 5 | # 6 | # Copyright (c) 2022-2025 Craig Drummond 7 | # MIT license. 8 | # 9 | 10 | import datetime, os, requests, shutil, subprocess, sys, tempfile, time 11 | 12 | GITHUB_TOKEN_FILE = "%s/.config/github-token" % os.path.expanduser('~') 13 | GITHUB_REPO = "CDrummond/bliss-analyser" 14 | LINUX_ARM_ARTIFACTS = ["bliss-analyser-linux-arm-ffmpeg", "bliss-analyser-linux-arm-symphonia"] 15 | LINUX_X86_ARTIFACTS = ["bliss-analyser-linux-x86-ffmpeg", "bliss-analyser-linux-x86-symphonia"] 16 | MAC_ARTIFACTS = ["bliss-analyser-mac-symphonia"] 17 | WINDOWS_ARTIFACTS = ["bliss-analyser-windows-ffmpeg", "bliss-analyser-windows-symphonia"] 18 | UNIX_ARTIFACTS = LINUX_ARM_ARTIFACTS + LINUX_X86_ARTIFACTS + MAC_ARTIFACTS 19 | GITHUB_ARTIFACTS = UNIX_ARTIFACTS + WINDOWS_ARTIFACTS 20 | 21 | 22 | def info(s): 23 | print("INFO: %s" %s) 24 | 25 | 26 | def error(s): 27 | print("ERROR: %s" % s) 28 | exit(-1) 29 | 30 | 31 | def usage(): 32 | print("Usage: %s .." % sys.argv[0]) 33 | exit(-1) 34 | 35 | 36 | def to_time(tstr): 37 | return time.mktime(datetime.datetime.strptime(tstr, "%Y-%m-%dT%H:%M:%SZ").timetuple()) 38 | 39 | 40 | def get_items(repo, artifacts): 41 | info("Getting artifact list") 42 | js = requests.get("https://api.github.com/repos/%s/actions/artifacts" % repo).json() 43 | if js is None or not "artifacts" in js: 44 | error("Failed to list artifacts") 45 | 46 | items={} 47 | for a in js["artifacts"]: 48 | if a["name"] in artifacts and (not a["name"] in items or to_time(a["created_at"])>items[a["name"]]["date"]): 49 | items[a["name"]]={"date":to_time(a["created_at"]), "url":a["archive_download_url"]} 50 | 51 | return items 52 | 53 | 54 | def download_artifacts(version): 55 | items = get_items(GITHUB_REPO, GITHUB_ARTIFACTS) 56 | if len(items)!=len(GITHUB_ARTIFACTS): 57 | error("Failed to determine all artifacts") 58 | token = None 59 | with open(GITHUB_TOKEN_FILE, "r") as f: 60 | token = f.readlines()[0].strip() 61 | headers = {"Authorization": "token %s" % token}; 62 | 63 | for item in items: 64 | dest = "%s-%s.zip" % (item, version) 65 | info("Downloading %s" % item) 66 | r = requests.get(items[item]['url'], headers=headers, stream=True) 67 | with open(dest, 'wb') as f: 68 | for chunk in r.iter_content(chunk_size=1024*1024): 69 | if chunk: 70 | f.write(chunk) 71 | if not os.path.exists(dest): 72 | info("Failed to download %s" % item) 73 | 74 | 75 | def make_executable(version): 76 | cwd = os.getcwd() 77 | for a in UNIX_ARTIFACTS: 78 | archive = "%s-%s.zip" % (a, version) 79 | info("Making analyser executable in %s" % archive) 80 | with tempfile.TemporaryDirectory() as td: 81 | subprocess.call(["unzip", archive, "-d", td], shell=False) 82 | os.remove(archive) 83 | os.chdir(td) 84 | subprocess.call(["chmod", "a+x", "%s/bliss-analyser" % td], shell=False) 85 | bindir = os.path.join(td, "bin") 86 | if os.path.isdir(bindir): 87 | for e in os.listdir(bindir): 88 | subprocess.call(["chmod", "a+x", os.path.join(bindir, e)], shell=False) 89 | shutil.make_archive("%s/%s-%s" % (cwd, a, version), "zip") 90 | os.chdir(cwd) 91 | 92 | 93 | def checkVersion(version): 94 | try: 95 | parts=version.split('.') 96 | major=int(parts[0]) 97 | minor=int(parts[1]) 98 | patch=int(parts[2]) 99 | except: 100 | error("Invalid version number") 101 | 102 | 103 | if 1==len(sys.argv): 104 | usage() 105 | 106 | version=sys.argv[1] 107 | if version!="test": 108 | checkVersion(version) 109 | 110 | download_artifacts(version) 111 | make_executable(version) 112 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build for all platforms 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | env: 7 | CARGO_TERM_COLOR: always 8 | 9 | jobs: 10 | Linux_x86_symphonia: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v1 16 | 17 | - name: Build x86 18 | run: | 19 | docker build -t bliss-analyser-x86-symphonia - < docker/Dockerfile_x86_symphonia 20 | docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-x86-symphonia 21 | 22 | - name: Upload artifacts 23 | uses: actions/upload-artifact@v4 24 | with: 25 | name: bliss-analyser-linux-x86-symphonia 26 | path: releases/ 27 | 28 | # Linux_x86_ffmpeg: 29 | # runs-on: ubuntu-latest 30 | # 31 | # steps: 32 | # - name: Checkout 33 | # uses: actions/checkout@v1 34 | # 35 | # - name: Build x86 36 | # run: | 37 | # docker build -t bliss-analyser-x86-ffmpeg - < docker/Dockerfile_x86_ffmpeg 38 | # docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-x86-ffmpeg 39 | # 40 | # - name: Upload artifacts 41 | # uses: actions/upload-artifact@v4 42 | # with: 43 | # name: bliss-analyser-linux-x86-ffmpeg 44 | # path: releases/ 45 | 46 | Linux_x86_ffmpeg: 47 | runs-on: ubuntu-22.04 48 | 49 | steps: 50 | - name: Checkout 51 | uses: actions/checkout@v4 52 | 53 | - name: Packages 54 | run: sudo apt-get update && sudo apt-get install build-essential yasm -y 55 | 56 | - name: Build x86 static-ffmpeg version 57 | run: | 58 | cargo build --release --features=libav,staticlibav 59 | strip target/release/bliss-analyser 60 | mkdir releases 61 | cp target/release/bliss-analyser releases/bliss-analyser 62 | cp UserGuide.md releases/README.md 63 | cp LICENSE releases/ 64 | cp configs/linux.ini releases/config.ini 65 | 66 | - name: Upload artifacts 67 | uses: actions/upload-artifact@v4 68 | with: 69 | name: bliss-analyser-linux-x86-ffmpeg 70 | path: releases/ 71 | 72 | Linux_arm_symphonia: 73 | runs-on: ubuntu-latest 74 | 75 | steps: 76 | - name: Checkout 77 | uses: actions/checkout@v1 78 | 79 | - name: Build ARM 80 | run: | 81 | docker build -t bliss-analyser-arm-symphonia - < docker/Dockerfile_arm_symphonia 82 | docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-arm-symphonia 83 | 84 | - name: Upload artifacts 85 | uses: actions/upload-artifact@v4 86 | with: 87 | name: bliss-analyser-linux-arm-symphonia 88 | path: releases/ 89 | 90 | Linux_arm_ffmpeg: 91 | runs-on: ubuntu-latest 92 | 93 | steps: 94 | - name: Checkout 95 | uses: actions/checkout@v1 96 | 97 | - name: Build ARM 98 | run: | 99 | docker build -t bliss-analyser-arm-ffmpeg - < docker/Dockerfile_arm_ffmpeg 100 | docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-arm-ffmpeg 101 | 102 | - name: Upload artifacts 103 | uses: actions/upload-artifact@v4 104 | with: 105 | name: bliss-analyser-linux-arm-ffmpeg 106 | path: releases/ 107 | 108 | macOS_symphonia: 109 | runs-on: macos-13 110 | 111 | steps: 112 | - name: Install Rust 113 | uses: actions-rs/toolchain@v1 114 | with: 115 | toolchain: stable 116 | 117 | - name: Checkout 118 | uses: actions/checkout@v2 119 | 120 | - name: Install deps 121 | run: | 122 | brew install pkg-config 123 | 124 | - name: Install Rust support for ARM64 & prepare environment 125 | run: | 126 | rustup target add aarch64-apple-darwin 127 | mkdir releases 128 | 129 | - name: Build 130 | run: | 131 | cargo build --release --features update-aubio-bindings,symphonia 132 | strip target/release/bliss-analyser 133 | cp target/release/bliss-analyser releases/bliss-analyser-x86_64 134 | cargo build --target=aarch64-apple-darwin --release --features update-aubio-bindings,symphonia 135 | strip target/aarch64-apple-darwin/release/bliss-analyser 136 | cp target/aarch64-apple-darwin/release/bliss-analyser releases/bliss-analyser-arm64 137 | cp UserGuide.md releases/README.md 138 | cp LICENSE releases/ 139 | cp configs/macos.ini releases/config.ini 140 | 141 | - name: Build fat binary 142 | run: | 143 | lipo -create \ 144 | -arch x86_64 releases/bliss-analyser-x86_64 \ 145 | -arch arm64 releases/bliss-analyser-arm64 \ 146 | -output releases/bliss-analyser 147 | 148 | - name: Remove unused binaries 149 | run: 150 | rm releases/bliss-analyser-x86_64 releases/bliss-analyser-arm64 151 | 152 | - name: Upload artifacts 153 | uses: actions/upload-artifact@v4 154 | with: 155 | name: bliss-analyser-mac-symphonia 156 | path: releases/ 157 | 158 | 159 | Windows_symphonia: 160 | runs-on: windows-2022 161 | 162 | steps: 163 | - name: Checkout 164 | uses: actions/checkout@v2 165 | 166 | - name: Install Rust 167 | uses: actions-rs/toolchain@v1 168 | with: 169 | toolchain: stable 170 | override: true 171 | components: rustfmt, clippy 172 | 173 | - name: Build 174 | run: | 175 | cargo build --release --features=symphonia 176 | strip target/release/bliss-analyser.exe 177 | mkdir releases 178 | cp target/release/bliss-analyser.exe releases/bliss-analyser.exe 179 | cp UserGuide.md releases/README.md 180 | cp LICENSE releases/ 181 | cp configs/windows.ini releases/config.ini 182 | cp c:\Windows\system32\vcruntime140.dll releases 183 | 184 | - name: Upload artifacts 185 | uses: actions/upload-artifact@v4 186 | with: 187 | name: bliss-analyser-windows-symphonia 188 | path: releases/ 189 | 190 | 191 | Windows_ffmpeg: 192 | runs-on: windows-2022 193 | 194 | steps: 195 | - name: Checkout 196 | uses: actions/checkout@v2 197 | 198 | - name: Install deps 199 | run: | 200 | $VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath) 201 | Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n" 202 | Invoke-WebRequest "https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-7.1.1-full_build-shared.7z" -OutFile ffmpeg-shared.7z 203 | 7z x ffmpeg-shared.7z 204 | mkdir deps 205 | mv ffmpeg-*/* deps/ 206 | Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\deps`n" 207 | Add-Content $env:GITHUB_PATH "${pwd}\deps\bin`n" 208 | 209 | - name: Install Rust 210 | uses: actions-rs/toolchain@v1 211 | with: 212 | toolchain: stable 213 | override: true 214 | components: rustfmt, clippy 215 | 216 | - name: Build 217 | run: | 218 | cargo build --release --features=libav 219 | strip target/release/bliss-analyser.exe 220 | mkdir releases 221 | cp target/release/bliss-analyser.exe releases/bliss-analyser.exe 222 | cp deps/bin/*.dll releases/ 223 | cp UserGuide.md releases/README.md 224 | cp LICENSE releases/ 225 | cp configs/windows.ini releases/config.ini 226 | cp c:\Windows\system32\vcruntime140.dll releases 227 | 228 | - name: Upload artifacts 229 | uses: actions/upload-artifact@v4 230 | with: 231 | name: bliss-analyser-windows-ffmpeg 232 | path: releases/ 233 | -------------------------------------------------------------------------------- /src/tags.rs: -------------------------------------------------------------------------------- 1 | /** 2 | * Analyse music with Bliss 3 | * 4 | * Copyright (c) 2022-2025 Craig Drummond 5 | * GPLv3 license. 6 | * 7 | **/ 8 | 9 | use crate::db; 10 | use lofty::config::WriteOptions; 11 | use lofty::file::FileType; 12 | use lofty::prelude::{Accessor, AudioFile, ItemKey, TagExt, TaggedFileExt}; 13 | use lofty::tag::{ItemValue, Tag, TagItem}; 14 | use regex::Regex; 15 | use std::fs::File; 16 | use std::fs; 17 | use std::path::Path; 18 | use substring::Substring; 19 | use std::time::SystemTime; 20 | use bliss_audio::{Analysis, AnalysisIndex, FeaturesVersion}; 21 | 22 | const MAX_GENRE_VAL: usize = 192; 23 | const NUM_ANALYSIS_VALS: usize = 23; 24 | const ANALYSIS_TAG: &str = "BLISS_ANALYSIS"; 25 | const ANALYSIS_TAG_FORMAT_VER: u16 = 2; 26 | 27 | fn fmt(val: f32) -> String { 28 | format!("{:.16}", val).trim_end_matches("0").to_string() 29 | } 30 | 31 | pub fn write_analysis(track: &String, analysis: &Analysis, preserve_mod_times: bool) -> bool { 32 | let value = format!("{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}", ANALYSIS_TAG_FORMAT_VER, 33 | fmt(analysis[AnalysisIndex::Tempo]), fmt(analysis[AnalysisIndex::Zcr]), fmt(analysis[AnalysisIndex::MeanSpectralCentroid]), fmt(analysis[AnalysisIndex::StdDeviationSpectralCentroid]), fmt(analysis[AnalysisIndex::MeanSpectralRolloff]), 34 | fmt(analysis[AnalysisIndex::StdDeviationSpectralRolloff]), fmt(analysis[AnalysisIndex::MeanSpectralFlatness]), fmt(analysis[AnalysisIndex::StdDeviationSpectralFlatness]), fmt(analysis[AnalysisIndex::MeanLoudness]), fmt(analysis[AnalysisIndex::StdDeviationLoudness]), 35 | fmt(analysis[AnalysisIndex::Chroma1]), fmt(analysis[AnalysisIndex::Chroma2]), fmt(analysis[AnalysisIndex::Chroma3]), fmt(analysis[AnalysisIndex::Chroma4]), fmt(analysis[AnalysisIndex::Chroma5]), 36 | fmt(analysis[AnalysisIndex::Chroma6]), fmt(analysis[AnalysisIndex::Chroma7]), fmt(analysis[AnalysisIndex::Chroma8]), fmt(analysis[AnalysisIndex::Chroma9]), fmt(analysis[AnalysisIndex::Chroma10]), 37 | fmt(analysis[AnalysisIndex::Chroma11]), fmt(analysis[AnalysisIndex::Chroma12]), fmt(analysis[AnalysisIndex::Chroma13])); 38 | 39 | let mut written = false; 40 | if let Ok(mut file) = lofty::read_from_path(Path::new(track)) { 41 | let tag = match file.primary_tag_mut() { 42 | Some(primary_tag) => primary_tag, 43 | None => { 44 | if let Some(first_tag) = file.first_tag_mut() { 45 | first_tag 46 | } else { 47 | let tag_type = file.primary_tag_type(); 48 | file.insert_tag(Tag::new(tag_type)); 49 | file.primary_tag_mut().unwrap() 50 | } 51 | }, 52 | }; 53 | 54 | // Store analysis results 55 | let tag_key = ItemKey::Unknown(ANALYSIS_TAG.to_string()); 56 | tag.remove_key(&tag_key); 57 | let lower_tag_key = ItemKey::Unknown(ANALYSIS_TAG.to_lowercase().to_string()); 58 | tag.remove_key(&lower_tag_key); 59 | tag.insert_unchecked(TagItem::new(tag_key, ItemValue::Text(value))); 60 | 61 | // If we have any of the older analysis-in-comment tags, then remove these 62 | let entries = tag.get_strings(&ItemKey::Comment); 63 | let mut keep: Vec = Vec::new(); 64 | let mut have_old = false; 65 | for entry in entries { 66 | if entry.starts_with(ANALYSIS_TAG) { 67 | have_old = true; 68 | } else { 69 | keep.push(ItemValue::Text(entry.to_string())); 70 | } 71 | } 72 | if have_old { 73 | tag.remove_key(&ItemKey::Comment); 74 | for k in keep { 75 | tag.push(TagItem::new(ItemKey::Comment, k)); 76 | } 77 | } 78 | 79 | let now = SystemTime::now(); 80 | let mut mod_time = now; 81 | 82 | if preserve_mod_times { 83 | if let Ok(fmeta) = fs::metadata(track) { 84 | if let Ok(time) = fmeta.modified() { 85 | mod_time = time; 86 | } 87 | } 88 | } 89 | if let Ok(_) = tag.save_to_path(Path::new(track), WriteOptions::default()) { 90 | if preserve_mod_times { 91 | if mod_time Option { 104 | let parts = tag_str.split(","); 105 | let mut index = 0; 106 | let mut num_read_vals = 0; 107 | let mut vals = [0.; NUM_ANALYSIS_VALS]; 108 | let val_start_pos = version_pos+1; 109 | for part in parts { 110 | if index==start_tag_pos && start_tag_pos() { 116 | Ok(ver) => { 117 | if ver!=ANALYSIS_TAG_FORMAT_VER { 118 | break; 119 | } 120 | }, 121 | Err(_) => { 122 | break; 123 | } 124 | } 125 | } else if (index - val_start_pos) < NUM_ANALYSIS_VALS { 126 | match part.parse::() { 127 | Ok(val) => { 128 | num_read_vals += 1; 129 | vals[index - val_start_pos] = val; 130 | }, 131 | Err(_) => { 132 | break; 133 | } 134 | } 135 | } else { 136 | break; 137 | } 138 | index += 1; 139 | } 140 | if num_read_vals == NUM_ANALYSIS_VALS { 141 | return Some(Analysis::new(vals.to_vec(), FeaturesVersion::LATEST).expect("number of vals should be 23")); 142 | } 143 | None 144 | } 145 | 146 | pub fn read(track: &String, read_analysis: bool) -> db::Metadata { 147 | let mut meta = db::Metadata { 148 | duration: 180, 149 | ..db::Metadata::default() 150 | }; 151 | 152 | if let Ok(file) = lofty::read_from_path(Path::new(track)) { 153 | let tag = match file.primary_tag() { 154 | Some(primary_tag) => primary_tag, 155 | None => { 156 | if let Some(first_tag) = file.first_tag() { 157 | first_tag 158 | } else { 159 | return meta; 160 | } 161 | } 162 | }; 163 | 164 | meta.title = tag.title().unwrap_or_default().to_string(); 165 | meta.artist = tag.artist().unwrap_or_default().to_string(); 166 | meta.album = tag.album().unwrap_or_default().to_string(); 167 | meta.album_artist = tag.get_string(&ItemKey::AlbumArtist).unwrap_or_default().to_string(); 168 | 169 | // If file has multiple genre tags then read all. 170 | let genres = tag.get_strings(&ItemKey::Genre); 171 | let mut genre_list:Vec = Vec::new(); 172 | 173 | for genre in genres { 174 | genre_list.push(genre.to_string()); 175 | } 176 | if genre_list.len()>1 { 177 | meta.genre = genre_list.join(";"); 178 | } else { 179 | meta.genre = tag.genre().unwrap_or_default().to_string(); 180 | } 181 | 182 | // Check whether MP3 has numeric genre, and if so covert to text 183 | if file.file_type().eq(&FileType::Mpeg) { 184 | match tag.genre() { 185 | Some(genre) => { 186 | let test = genre.parse::(); 187 | match test { 188 | Ok(val) => { 189 | let idx: usize = val as usize; 190 | if idx < MAX_GENRE_VAL { 191 | meta.genre = lofty::id3::v1::GENRES[idx].to_string(); 192 | } 193 | } 194 | Err(_) => { 195 | // Check for "(number)text" 196 | let re = Regex::new(r"^\([0-9]+\)").unwrap(); 197 | if re.is_match(&genre) { 198 | match genre.find(")") { 199 | Some(end) => { 200 | let test = genre.to_string().substring(1, end).parse::(); 201 | 202 | if let Ok(val) = test { 203 | let idx: usize = val as usize; 204 | if idx < MAX_GENRE_VAL { 205 | meta.genre = lofty::id3::v1::GENRES[idx].to_string(); 206 | } 207 | } 208 | } 209 | None => { } 210 | } 211 | } 212 | } 213 | } 214 | } 215 | None => { } 216 | } 217 | } 218 | 219 | meta.duration = file.properties().duration().as_secs() as u32; 220 | 221 | if read_analysis { 222 | match tag.get_string(&ItemKey::Unknown(ANALYSIS_TAG.to_string())) { 223 | Some(tag_str) => { 224 | match read_analysis_string(tag_str, 100, 0) { 225 | Some(analysis) => { 226 | meta.analysis = Some(analysis); 227 | } 228 | None => { } 229 | } 230 | } 231 | None => { } 232 | } 233 | 234 | if meta.analysis.is_none() { 235 | // Try lowercase 236 | match tag.get_string(&ItemKey::Unknown(ANALYSIS_TAG.to_lowercase().to_string())) { 237 | Some(tag_str) => { 238 | match read_analysis_string(tag_str, 100, 0) { 239 | Some(analysis) => { 240 | meta.analysis = Some(analysis); 241 | } 242 | None => { } 243 | } 244 | } 245 | None => { } 246 | } 247 | } 248 | 249 | if meta.analysis.is_none() { 250 | // Try old, stored in comment 251 | let entries = tag.get_strings(&ItemKey::Comment); 252 | for entry in entries { 253 | if entry.len()>(ANALYSIS_TAG.len()+(NUM_ANALYSIS_VALS*8)) && entry.starts_with(ANALYSIS_TAG) { 254 | match read_analysis_string(entry, 0, 1) { 255 | Some(analysis) => { 256 | meta.analysis = Some(analysis); 257 | break; 258 | } 259 | None => { } 260 | } 261 | } 262 | } 263 | } 264 | } 265 | } 266 | 267 | meta 268 | } 269 | -------------------------------------------------------------------------------- /UserGuide.md: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | `bliss-analyser` is a command-line application to scan your music collection and 5 | upload its database of music analysis to LMS. The `Bliss Mixer` LMS plugin can 6 | then use this information to provide music mixes for LMS's `Don't Stop the Music` 7 | feature. 8 | 9 | **NOTE:** You must run this application from a terminal window (e.g. cmd.com or 10 | PowerShell for Windows), as there is no graphical user interface. 11 | 12 | 13 | 14 | Quick guide 15 | =========== 16 | 17 | 1. Install the `Bliss Mixer` LMS plugin. 18 | 19 | 2. Edit the supplied `config.ini` in the current folder to set appropriate values 20 | for `music` and `lms` - e.g.: 21 | ``` 22 | [Bliss] 23 | music=/home/user/Music 24 | lms=127.0.0.1 25 | ``` 26 | 27 | 3. Analyse your tracks: 28 | ``` 29 | ./bliss-analyser analyse 30 | ``` 31 | 32 | 4. Upload analysis database to LMS: 33 | ``` 34 | ./bliss-analyser upload 35 | ``` 36 | 37 | 5. Set LMS to use `Bliss` in `Don't Stop the Music` 38 | 39 | 6. Play some music! 40 | 41 | 42 | Configuration 43 | ============= 44 | 45 | `bliss-analyser` can (optionally) read its configuration from an INI-style file. 46 | By default `bliss-analyser` looks for a file named `config.ini` in its current 47 | folder, however the exact name and location can be specified as a command-line 48 | parameter. This file has the following syntax: 49 | 50 | ``` 51 | [Bliss] 52 | music=/home/user/Music 53 | db=bliss.db 54 | lms=127.0.0.1 55 | ignore=ignore.txt 56 | readtags=true 57 | writetags=true 58 | ``` 59 | 60 | The following items are supported: 61 | * `music` specifies the location of your music collection - e.g. `c:\Users\user\Music` 62 | for windows. This default to `Music` within the user's home folder. Up to 4 other 63 | music folders may be specified via `music_1`, `music_2`, `music_3`, and `music_4` 64 | * `db` specifies the name and location of the database file used to store the 65 | analysis results. This will default to `bliss.db` in the current folder. 66 | * `lms` specifies the hostname, or IP address, of your LMS server. This is used 67 | when uploading the database file to LMS. This defaults to `127.0.0.1` If your LMS is 68 | password protected then use `user:pass@server` - e.g. `lms=pi:abc123@127.0.0.1` 69 | * `json` specifies the JSONRPC port number of your LMS server. This will default 70 | to `9000`. 71 | * `ignore` specifies the name and location of a file containing items to ignore 72 | in mixes. See the `Ignore` section later on for more details. 73 | * `readtags` specifies whether analysis results should be read from files whe 74 | analysing. 75 | * `writetags` specifies whether analysis results should be written to files when 76 | analysed. 77 | * `preserve` specifies whether file modification time should be preserved when 78 | writing tags. Set to `true` or `false`. 79 | 80 | 81 | Command-line parameters 82 | ======================= 83 | 84 | `bliss-analyser` accepts the following optional parameters: 85 | 86 | * `-c` / `--config` Location of the INI config file detailed above. 87 | * `-m` / `--music` Location of your music collection, 88 | * `-d` / `--db` Name and location of the database file. 89 | * `-l` / `--logging` Logging level; `trace`, `debug`, `info`, `warn`, `error`. 90 | Default is `info`. 91 | * `-k` / `--keep-old` When analysing tracks, `bliss-analyser` will remove any 92 | tracks specified in its database that are no-longer on the file-system. This 93 | parameter is used to prevent this. 94 | * `-r` / `--dry-run` If this is supplied when analysing tracks, then no actual 95 | analysis will be performed, instead the logging will inform you how many new 96 | tracks are to be analysed and how many old tracks are left in the database. 97 | * `-i` / `--ignore` Name and location of the file containing items to ignore. 98 | * `-L` / `--lms` Hostname, or IP address, of your LMS server. 99 | * `-J` / `--json` JSONRPC port number of your LMS server. 100 | * `-n` / `--numtracks` Specify maximum number of tracks to analyse. 101 | * `-R` / `--readtags` When using the `analyse` task, read analysis results from a 102 | files a `BLISS_ANALYSIS` tag (it present) in files. 103 | * `-W` / `--writetags` When using the `analyse` task, write analysis results to files 104 | within a `BLISS_ANALYSIS` tag. 105 | * `-p` / `--preserve` Attempt to preserve file modification time when writing tags. 106 | * `-t` / `--threads` Maximum number of threads to use for analysis. 107 | 108 | Equivalent items specified in the INI config file (detailed above) will override 109 | any specified on the command-line. 110 | 111 | `bliss-analyser` requires one extra parameter, which is used to determine the 112 | required task. This takes the following values: 113 | 114 | * `analyse` Performs analysis of tracks. 115 | * `upload` Uploads the database to LMS. 116 | * `stopmixer` Asks LMS plugin to stop its instance of `bliss-mixer` 117 | * `tags` Re-reads tags from your music collection, and updates the database for 118 | any changes. 119 | * `ignore` Reads the `ignore` file and updates the database to flag tracks as 120 | to be ignored for mixes. 121 | * `export` Exports tags from database and stores within the audio files. 122 | * `clearfail` If analysis fails for a track then the track path and its modification 123 | time is stored in the database, so that running analysis again ignores these files. 124 | This action clears this information, so that an analysis run will attempt to analyse 125 | these files. 126 | 127 | 128 | Analysing tracks 129 | ================ 130 | 131 | Before you can create any mixes, your tracks need to be analysed. Assuming 132 | `config.ini` is in the current folder and contains valid entries, this is 133 | accomplished as follows: 134 | 135 | (Linux / macOS) 136 | ``` 137 | ./bliss-analyser analyse 138 | ``` 139 | 140 | (Windows) 141 | ``` 142 | .\bliss-analyser.exe analyse 143 | ``` 144 | 145 | This will first iterate all sub-folders of your music collection to build a list 146 | of filenames to analyse. New tracks that are not currently in the database are 147 | then analysed, and a progress bar showing the current percentage and time used 148 | is shown. 149 | 150 | As a rough guide, a 2015-era i7 8-core laptop with SSD analyses around 14000 151 | tracks/hour. 152 | 153 | If analysis fails for a track, then the track's path and timestamp are stored 154 | within the database so that subsquent analysis calls will skip these tracks. 155 | 156 | 157 | Tags 158 | ---- 159 | When analysing tracks, the analyser will first check for a `BLISS_ANALYSIS` tag 160 | within the file, and if found this will be used instead of re-analysing the file. 161 | 162 | If `--writetags` is passed, the analysis results will be stored within a 163 | `BLISS_ANALYSIS` tag in the file itself. Note, however, that only tracks that are 164 | not currently in the database will be analysed - therefore any such tracks would 165 | not have the `BLISS_ANALYSIS` tag updated. To export analysis results from the 166 | database to files themselves use the `export` task. 167 | 168 | *NOTE* Use of the `BLISS_ANALYSIS` tag is not supported for CUE files. 169 | 170 | 171 | CUE files 172 | --------- 173 | 174 | If the analyser encounters an audio file with a matching CUE file (e.g. 175 | `album.flac` and `album.cue` in same folder) then it will attempt to analyse the 176 | individual tracks contained within. 177 | 178 | 179 | Exclude folders 180 | --------------- 181 | 182 | If you have audio books, or other audio items, within your music folder that you 183 | do not wish to have analysed, you can prevent `bliss-analyser` from analysing 184 | these be creating a file named `.notmusic` within the required folder. e.g. 185 | 186 | ``` 187 | /home/user/Music/Audiobooks/.notmusic 188 | ``` 189 | 190 | 191 | 192 | Uploading database 193 | ================== 194 | 195 | Once your tracks have been analysed, you need to `upload` your database to LMS 196 | so that its plugin can then use this information to create mixes. Assuming 197 | `config.ini` is in the current folder and contains valid entries, this is 198 | accomplished as follows: 199 | 200 | (Linux / macOS) 201 | ``` 202 | ./bliss-analyser upload 203 | ``` 204 | 205 | (Windows) 206 | ``` 207 | .\bliss-analyser.exe upload 208 | ``` 209 | 210 | If your LMS is running on the same machine as `bliss-analyser` and you have set 211 | the db path to be the location within your LMS's `Cache` folder which 212 | `bliss-mixer` will use to access `bliss.db`, then there is no need to 'upload' 213 | the database and all you need to do is stop any running `bliss-mixer`. This can 214 | be accomplished manually, or via the following: 215 | 216 | (Linux / macOS) 217 | ``` 218 | ./bliss-analyser stopmixer 219 | ``` 220 | 221 | (Windows) 222 | ``` 223 | .\bliss-analyser.exe stopmixer 224 | ``` 225 | 226 | *NOTE* You must already have the `Bliss Mixer` LMS plugin installed, or you will 227 | not be able to upload the database. 228 | 229 | 230 | 231 | Re-reading tags 232 | =============== 233 | 234 | If you have changed the tags in some files then the analysis database will have 235 | the old tags. To update this database with the changed tags, run `bliss-analyser` 236 | as follows (assuming `config.ini` is in the current folder and contains valid 237 | entries): 238 | 239 | (Linux / macOS) 240 | ``` 241 | ./bliss-analyser tags 242 | ``` 243 | 244 | (Windows) 245 | ``` 246 | .\bliss-analyser.exe tags 247 | ``` 248 | 249 | *NOTE* Tag re-reading is not implemented for CUE tracks. Therefore if you update 250 | your CUE files you will need to remove these from the database and re-analyse, 251 | or manually edit the meta-data in `bliss.db` using an SQLite GUI. 252 | 253 | 254 | 255 | Ignoring tracks in mixes 256 | ======================== 257 | 258 | Its possible that you have some tracks that you never want added to mixes, but 259 | as these are in your music collection they might be in your music queue and so 260 | could possibly be chosen as `seed` tracks for mixes. Therefore you'd want the 261 | analysis in the database, so that you can find mixable tracks for them, but 262 | would not want them be chosen as mixable tracks from other seeds. This is 263 | accomplished be setting the `Ignore` column to `1` for such tracks. To make this 264 | easier, `bliss-analyser` can read a text file containing items to ignore and 265 | will update the database as appropriate. 266 | 267 | This `ignore` file is a plain text file where each line contains either: 268 | 269 | 1. The unique path to be ignored. i.e. it could contain the complete path 270 | (relative to your music folder) of a track, an album name (to exclude a whole 271 | album), or an artist name (to exclude all tracks by the artist). 272 | 2. An SQL selector. If so, line must start "SQL:" followed by code that will be 273 | run after WHERE 274 | 275 | ``` 276 | ABBA/Gold - Greatest Hits/01 Dancing Queen.mp3 277 | AC-DC/Power Up/ 278 | The Police/ 279 | SQL:Genre='Blues' 280 | SQL:Genre LIKE '%Dance%' 281 | SQL:Genre='Rock' 282 | SQL:Genre LIKE 'Rock;%' 283 | SQL:Genre LIKE '%;Rock' 284 | SQL:Genre LIKE '%;Rock;%' 285 | ``` 286 | 287 | This would exclude 'Dancing Queen' by ABBA, all of AC/DC's 'Power Up', all 288 | tracks by 'The Police', all tracks with 'Genre' set to 'Blues', and all tracks 289 | that have 'Dance' or 'Rock' as part of their 'Genre'. 290 | 291 | The SQL LIKE lines do sub-string matching. So '%Dance%' will match any genre 292 | string that contains 'Dance' - e.g. 'Classical Dance'. The 4 lines with 'Rock' 293 | show how you can explicitly look for an exact match. The 1st line means 'Rock' 294 | is the only genre, 2nd means 'Rock' is the first genre, 3rd means 'Rock' is the 295 | last genre, and 4th means 'Rock' is amongst other genres. 296 | 297 | Assuming `config.ini` is in the current folder and contains valid entries, this 298 | is accomplished as follows: 299 | 300 | (Linux / macOS) 301 | ``` 302 | ./bliss-analyser ignore 303 | ``` 304 | 305 | (Windows) 306 | ``` 307 | .\bliss-analyser.exe ignore 308 | ``` 309 | 310 | 311 | 312 | Exporting Analysis 313 | ================== 314 | 315 | If you have analysis results stored within the database, and not within 316 | the files themselves, then you can use the `export` action to copy these 317 | analysis results from the database and into the files. 318 | 319 | (Linux / macOS) 320 | ``` 321 | ./bliss-analyser export 322 | ``` 323 | 324 | (Windows) 325 | ``` 326 | .\bliss-analyser.exe export 327 | ``` 328 | 329 | *NOTE* Exporting of analysis results is not implemented for CUE tracks. 330 | 331 | 332 | 333 | Clearing Failed Tracks 334 | ====================== 335 | 336 | Any tracks that could not be analysed are stored in the database so that 337 | subsequent analysis runs ignore such files - unless the files themselves 338 | have been updated. 339 | 340 | You can remove this list of failed tracks, from database, via the 341 | following command: 342 | 343 | 344 | (Linux / macOS) 345 | ``` 346 | ./bliss-analyser clearfail 347 | ``` 348 | 349 | (Windows) 350 | ``` 351 | .\bliss-analyser.exe clearfail 352 | ``` 353 | 354 | 355 | 356 | Credits 357 | ======= 358 | 359 | The actual music analysis is performed by the `bliss-rs` library. See 360 | https://lelele.io/bliss.html for more information on this. 361 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | /** 2 | * Analyse music with Bliss 3 | * 4 | * Copyright (c) 2022-2025 Craig Drummond 5 | * GPLv3 license. 6 | * 7 | **/ 8 | 9 | use argparse::{ArgumentParser, Store, StoreTrue}; 10 | use chrono::Local; 11 | use configparser::ini::Ini; 12 | use dirs; 13 | use log::LevelFilter; 14 | use std::io::Write; 15 | use std::path::PathBuf; 16 | use std::process; 17 | use num_cpus; 18 | mod analyse; 19 | mod db; 20 | mod tags; 21 | mod upload; 22 | 23 | const VERSION: &'static str = env!("CARGO_PKG_VERSION"); 24 | const TOP_LEVEL_INI_TAG: &str = "Bliss"; 25 | 26 | fn main() { 27 | let mut config_file = "config.ini".to_string(); 28 | let mut db_path = "bliss.db".to_string(); 29 | let mut logging = "info".to_string(); 30 | let mut music_path = ".".to_string(); 31 | let mut music_1_path = "".to_string(); 32 | let mut music_2_path = "".to_string(); 33 | let mut music_3_path = "".to_string(); 34 | let mut music_4_path = "".to_string(); 35 | let mut ignore_file = "ignore.txt".to_string(); 36 | let mut keep_old: bool = false; 37 | let mut dry_run: bool = false; 38 | let mut task = "".to_string(); 39 | let mut lms_host = "127.0.0.1".to_string(); 40 | let mut lms_json_port:u16 = 9000; 41 | let mut max_num_files: usize = 0; 42 | let mut music_paths: Vec = Vec::new(); 43 | let mut max_threads: i16 = 0; 44 | let mut write_tags = false; 45 | let mut read_tags = false; 46 | let mut preserve_mod_times = false; 47 | let mut send_notifs = false; 48 | 49 | match dirs::home_dir() { 50 | Some(path) => { 51 | music_path = String::from(path.join("Music").to_string_lossy()); 52 | } 53 | None => {} 54 | } 55 | 56 | { 57 | let config_file_help = format!("config file (default: {})", &config_file); 58 | let music_path_help = format!("Music folder (default: {})", &music_path); 59 | let alt_music_path_help = format!("Other music folder"); 60 | let db_path_help = format!("Database location (default: {})", &db_path); 61 | let logging_help = format!("Log level; trace, debug, info, warn, error. (default: {})", logging); 62 | let ignore_file_help = format!("File contains items to mark as ignored. (default: {})", ignore_file); 63 | let lms_host_help = format!("LMS hostname or IP address (default: {})", &lms_host); 64 | let lms_json_port_help = format!("LMS JSONRPC port (default: {})", &lms_json_port); 65 | let description = format!("Bliss Analyser v{}", VERSION); 66 | 67 | // arg_parse.refer 'borrows' db_path, etc, and can only have one 68 | // borrow per scope, hence this section is enclosed in { } 69 | let mut arg_parse = ArgumentParser::new(); 70 | arg_parse.set_description(&description); 71 | arg_parse.refer(&mut config_file).add_option(&["-c", "--config"], Store, &config_file_help); 72 | arg_parse.refer(&mut music_path).add_option(&["-m", "--music"], Store, &music_path_help); 73 | arg_parse.refer(&mut music_1_path).add_option(&["--music_1"], Store, &alt_music_path_help); 74 | arg_parse.refer(&mut music_2_path).add_option(&["--music_2"], Store, &alt_music_path_help); 75 | arg_parse.refer(&mut music_3_path).add_option(&["--music_3"], Store, &alt_music_path_help); 76 | arg_parse.refer(&mut music_4_path).add_option(&["--music_4"], Store, &alt_music_path_help); 77 | arg_parse.refer(&mut db_path).add_option(&["-d", "--db"], Store, &db_path_help); 78 | arg_parse.refer(&mut logging).add_option(&["-l", "--logging"], Store, &logging_help); 79 | arg_parse.refer(&mut keep_old).add_option(&["-k", "--keep-old"], StoreTrue, "Don't remove files from DB if they don't exist (used with analyse task)"); 80 | arg_parse.refer(&mut dry_run).add_option(&["-r", "--dry-run"], StoreTrue, "Dry run, only show what needs to be done (used with analyse task)"); 81 | arg_parse.refer(&mut ignore_file).add_option(&["-i", "--ignore"], Store, &ignore_file_help); 82 | arg_parse.refer(&mut lms_host).add_option(&["-L", "--lms"], Store, &lms_host_help); 83 | arg_parse.refer(&mut lms_json_port).add_option(&["-J", "--json"], Store, &lms_json_port_help); 84 | arg_parse.refer(&mut max_num_files).add_option(&["-n", "--numfiles"], Store, "Maximum number of files to analyse"); 85 | arg_parse.refer(&mut max_threads).add_option(&["-t", "--threads"], Store, "Maximum number of threads to use for analysis"); 86 | arg_parse.refer(&mut write_tags).add_option(&["-W", "--writetags"], StoreTrue, "When analysing files, also store results within files themselves"); 87 | arg_parse.refer(&mut read_tags).add_option(&["-R", "--readtags"], StoreTrue, "When analysing files, attempt to read results from tags"); 88 | arg_parse.refer(&mut preserve_mod_times).add_option(&["-p", "--preserve"], StoreTrue, "Preserve modification time when writing results to files"); 89 | arg_parse.refer(&mut send_notifs).add_option(&["-N", "--notifs"], StoreTrue, "Periodically send notification messages to LMS"); 90 | arg_parse.refer(&mut task).add_argument("task", Store, "Task to perform; analyse, tags, ignore, upload, export, clearfail, stopmixer."); 91 | arg_parse.parse_args_or_exit(); 92 | } 93 | 94 | if !(logging.eq_ignore_ascii_case("trace") || logging.eq_ignore_ascii_case("debug") || logging.eq_ignore_ascii_case("info") 95 | || logging.eq_ignore_ascii_case("warn") || logging.eq_ignore_ascii_case("error")) { 96 | logging = String::from("info"); 97 | } 98 | let other_level = if logging.eq_ignore_ascii_case("trace") { LevelFilter::Trace } else { LevelFilter::Error }; 99 | let mut builder = env_logger::Builder::from_env(env_logger::Env::default().filter_or("XXXXXXXX", logging)); 100 | builder.filter(Some("bliss_audio"), other_level); 101 | builder.filter(Some("symphonia"), other_level); 102 | builder.filter(Some("lofty"), other_level); 103 | builder.format(|buf, record| { 104 | writeln!(buf, "[{} {:.1}] {}", Local::now().format("%Y-%m-%d %H:%M:%S"), record.level(), record.args()) 105 | }); 106 | builder.init(); 107 | 108 | if task.is_empty() { 109 | log::error!("No task specified, please choose from; analyse, tags, ignore, upload, export, clearfail, stopmixer"); 110 | process::exit(-1); 111 | } 112 | 113 | if !task.eq_ignore_ascii_case("analyse") && !task.eq_ignore_ascii_case("tags") && !task.eq_ignore_ascii_case("ignore") 114 | && !task.eq_ignore_ascii_case("upload") && !task.eq_ignore_ascii_case("export") && !task.eq_ignore_ascii_case("stopmixer") && !task.eq_ignore_ascii_case("analyse-lms") { 115 | log::error!("Invalid task ({}) supplied", task); 116 | process::exit(-1); 117 | } 118 | 119 | 120 | if !config_file.is_empty() { 121 | let path = PathBuf::from(&config_file); 122 | if path.exists() && path.is_file() { 123 | let mut config = Ini::new(); 124 | match config.load(&config_file) { 125 | Ok(_) => { 126 | let path_keys: [&str; 5] = ["music", "music_1", "music_2", "music_3", "music_4"]; 127 | for key in &path_keys { 128 | match config.get(TOP_LEVEL_INI_TAG, key) { 129 | Some(val) => { music_paths.push(PathBuf::from(&val)); } 130 | None => { } 131 | } 132 | } 133 | match config.get(TOP_LEVEL_INI_TAG, "db") { 134 | Some(val) => { db_path = val; } 135 | None => { } 136 | } 137 | match config.get(TOP_LEVEL_INI_TAG, "lms") { 138 | Some(val) => { lms_host = val; } 139 | None => { } 140 | } 141 | match config.get(TOP_LEVEL_INI_TAG, "json") { 142 | Some(val) => { lms_json_port = val.parse::().unwrap(); } 143 | None => { } 144 | } 145 | match config.get(TOP_LEVEL_INI_TAG, "ignore") { 146 | Some(val) => { ignore_file = val; } 147 | None => { } 148 | } 149 | match config.get(TOP_LEVEL_INI_TAG, "writetags") { 150 | Some(val) => { write_tags = val.eq("true"); } 151 | None => { } 152 | } 153 | match config.get(TOP_LEVEL_INI_TAG, "readtags") { 154 | Some(val) => { read_tags = val.eq("true"); } 155 | None => { } 156 | } 157 | match config.get(TOP_LEVEL_INI_TAG, "preserve") { 158 | Some(val) => { preserve_mod_times = val.eq("true"); } 159 | None => { } 160 | } 161 | } 162 | Err(e) => { 163 | log::error!("Failed to load config file. {}", e); 164 | process::exit(-1); 165 | } 166 | } 167 | } 168 | } 169 | 170 | if music_paths.is_empty() { 171 | music_paths.push(PathBuf::from(&music_path)); 172 | if !music_1_path.is_empty() { 173 | music_paths.push(PathBuf::from(&music_1_path)); 174 | } 175 | if !music_2_path.is_empty() { 176 | music_paths.push(PathBuf::from(&music_2_path)); 177 | } 178 | if !music_3_path.is_empty() { 179 | music_paths.push(PathBuf::from(&music_3_path)); 180 | } 181 | if !music_4_path.is_empty() { 182 | music_paths.push(PathBuf::from(&music_4_path)); 183 | } 184 | } 185 | 186 | let mut thread_limit:usize = num_cpus::get() as usize; 187 | if max_threads<0 && (max_threads.abs() as usize) < thread_limit-1 { 188 | thread_limit = thread_limit - (max_threads.abs() as usize) 189 | } else if max_threads>0 && (max_threads as usize) < thread_limit { 190 | thread_limit = max_threads as usize; 191 | } 192 | 193 | if task.eq_ignore_ascii_case("stopmixer") { 194 | upload::stop_mixer(&lms_host, lms_json_port); 195 | } else { 196 | if db_path.len() < 3 { 197 | log::error!("Invalid DB path ({}) supplied", db_path); 198 | process::exit(-1); 199 | } 200 | 201 | let path = PathBuf::from(&db_path); 202 | if path.exists() && !path.is_file() { 203 | log::error!("DB path ({}) is not a file", db_path); 204 | process::exit(-1); 205 | } 206 | 207 | if task.eq_ignore_ascii_case("upload") { 208 | if path.exists() { 209 | upload::upload_db(&db_path, &lms_host, lms_json_port); 210 | } else { 211 | log::error!("DB ({}) does not exist", db_path); 212 | process::exit(-1); 213 | } 214 | } else { 215 | for mpath in &music_paths { 216 | if !mpath.exists() { 217 | log::error!("Music path ({}) does not exist", mpath.to_string_lossy()); 218 | process::exit(-1); 219 | } 220 | if !mpath.is_dir() { 221 | log::error!("Music path ({}) is not a directory", mpath.to_string_lossy()); 222 | process::exit(-1); 223 | } 224 | } 225 | 226 | if task.eq_ignore_ascii_case("tags") { 227 | db::read_tags(&db_path, &music_paths); 228 | } else if task.eq_ignore_ascii_case("ignore") { 229 | let ignore_path = PathBuf::from(&ignore_file); 230 | if !ignore_path.exists() { 231 | log::error!("Ignore file ({}) does not exist", ignore_file); 232 | process::exit(-1); 233 | } 234 | if !ignore_path.is_file() { 235 | log::error!("Ignore file ({}) is not a file", ignore_file); 236 | process::exit(-1); 237 | } 238 | db::update_ignore(&db_path, &ignore_path); 239 | } else if task.eq_ignore_ascii_case("export") { 240 | db::export(&db_path, &music_paths, thread_limit, preserve_mod_times); 241 | } else if task.eq_ignore_ascii_case("clearfail") { 242 | db::clear_failures(&db_path); 243 | } else { 244 | let ignore_path = PathBuf::from(&ignore_file); 245 | let modified = analyse::analyse_files(&db_path, &music_paths, dry_run, keep_old, max_num_files, thread_limit, 246 | &ignore_path, read_tags, write_tags, preserve_mod_times, &lms_host, lms_json_port, 247 | send_notifs); 248 | if modified && task.eq_ignore_ascii_case("analyse-lms") && path.exists() { 249 | upload::stop_mixer(&lms_host, lms_json_port); 250 | } 251 | } 252 | } 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /src/analyse.rs: -------------------------------------------------------------------------------- 1 | /** 2 | * Analyse music with Bliss 3 | * 4 | * Copyright (c) 2022-2025 Craig Drummond 5 | * GPLv3 license. 6 | * 7 | **/ 8 | 9 | use crate::db; 10 | use crate::tags; 11 | use anyhow::Result; 12 | use if_chain::if_chain; 13 | use indicatif::{ProgressBar, ProgressStyle}; 14 | use std::collections::HashSet; 15 | use std::convert::TryInto; 16 | use filetime::FileTime; 17 | use std::fs; 18 | use std::fs::DirEntry; 19 | use std::num::NonZero; 20 | use std::path::{Path, PathBuf}; 21 | #[cfg(feature = "libav")] 22 | use bliss_audio::decoder::ffmpeg::FFmpegDecoder as SongDecoder; 23 | #[cfg(feature = "symphonia")] 24 | use bliss_audio::decoder::symphonia::SymphoniaDecoder as SongDecoder; 25 | use bliss_audio::{AnalysisOptions, decoder::Decoder}; 26 | use ureq; 27 | use std::time::{SystemTime, UNIX_EPOCH}; 28 | use std::thread; 29 | use std::sync::mpsc; 30 | use std::sync::mpsc::{Receiver, Sender}; 31 | use serde_json::json; 32 | 33 | const DONT_ANALYSE: &str = ".notmusic"; 34 | const MAX_ERRORS_TO_SHOW: usize = 100; 35 | const MAX_TAG_ERRORS_TO_SHOW: usize = 50; 36 | const MIN_NOTIF_TIME:u64 = 2; 37 | const VALID_EXTENSIONS: [&str; 7] = ["m4a", "mp3", "ogg", "flac", "opus", "wv", "dsf"]; 38 | 39 | static mut TERMINATE_ANALYSIS_FLAG: bool = false; 40 | 41 | struct NotifInfo { 42 | pub enabled: bool, 43 | pub address: String, 44 | pub last_send: u64, 45 | pub start_time: u64 46 | } 47 | 48 | fn terminate_analysis() -> bool { 49 | unsafe { 50 | return TERMINATE_ANALYSIS_FLAG 51 | } 52 | } 53 | 54 | fn handle_ctrl_c() { 55 | unsafe { 56 | TERMINATE_ANALYSIS_FLAG = true; 57 | } 58 | } 59 | 60 | fn send_notif_msg(notifs: &mut NotifInfo, text: &str) { 61 | let js = json!({"id":"1", "method":"slim.request", "params":["", ["blissmixer", "analyser", "act:update", format!("msg:{}", text)]]}); 62 | log::info!("Sending notif to LMS: {}", text); 63 | let _ = ureq::post(¬ifs.address).send_string(&js.to_string()); 64 | } 65 | 66 | fn send_notif(notifs: &mut NotifInfo, text: &str) { 67 | if notifs.enabled { 68 | let now = SystemTime::now().duration_since(UNIX_EPOCH).expect("time should go forward").as_secs(); 69 | if now>=notifs.last_send+MIN_NOTIF_TIME { 70 | let dur = now - notifs.start_time; 71 | let msg = format!("[{:02}:{:02}:{:02}] {}", (dur/60)/60, (dur/60)%60, dur%60, text); 72 | send_notif_msg(notifs, &msg); 73 | notifs.last_send = now; 74 | } 75 | } 76 | } 77 | 78 | fn get_file_list(db: &mut db::Db, mpath: &Path, path: &Path, track_paths: &mut Vec, file_count:&mut usize, max_num_files: usize, 79 | dry_run: bool, notifs: &mut NotifInfo) { 80 | if !path.is_dir() { 81 | return; 82 | } 83 | 84 | send_notif(notifs, &format!("SCAN DIR {}", path.to_string_lossy())); 85 | let mut items: Vec<_> = path.read_dir().unwrap().map(|r| r.unwrap()).collect(); 86 | items.sort_by_key(|dir| dir.path()); 87 | 88 | for item in items { 89 | check_dir_entry(db, mpath, item, track_paths, file_count, max_num_files, dry_run, notifs); 90 | if max_num_files>0 && *file_count>=max_num_files { 91 | break; 92 | } 93 | } 94 | } 95 | 96 | fn check_dir_entry(db: &mut db::Db, mpath: &Path, entry: DirEntry, track_paths: &mut Vec, file_count:&mut usize, max_num_files: usize, 97 | dry_run: bool, notifs: &mut NotifInfo) { 98 | let pb = entry.path(); 99 | if pb.is_dir() { 100 | let check = pb.join(DONT_ANALYSE); 101 | if check.exists() { 102 | log::info!("Skipping '{}', found '{}'", pb.to_string_lossy(), DONT_ANALYSE); 103 | } else if max_num_files<=0 || *file_count, tag_error: &mut Vec) { 159 | if !failed.is_empty() { 160 | let total = failed.len(); 161 | failed.truncate(MAX_ERRORS_TO_SHOW); 162 | 163 | log::error!("Failed to analyse the following file(s):"); 164 | for err in failed { 165 | log::error!(" {}", err); 166 | } 167 | if total > MAX_ERRORS_TO_SHOW { 168 | log::error!(" + {} other(s)", total - MAX_ERRORS_TO_SHOW); 169 | } 170 | } 171 | if !tag_error.is_empty() { 172 | let total = tag_error.len(); 173 | tag_error.truncate(MAX_TAG_ERRORS_TO_SHOW); 174 | 175 | log::error!("Failed to read tags of the following file(s):"); 176 | for err in tag_error { 177 | log::error!(" {}", err); 178 | } 179 | if total > MAX_TAG_ERRORS_TO_SHOW { 180 | log::error!(" + {} other(s)", total - MAX_TAG_ERRORS_TO_SHOW); 181 | } 182 | } 183 | } 184 | 185 | #[derive(Clone, Default, PartialEq)] 186 | pub struct Meta { 187 | pub file: String, 188 | pub meta: db::Metadata 189 | } 190 | 191 | fn read_tags(tracks: Vec, max_threads: usize) -> Receiver { 192 | #[allow(clippy::type_complexity)] 193 | let (tx, rx): ( 194 | Sender, 195 | Receiver, 196 | ) = mpsc::channel(); 197 | if tracks.is_empty() { 198 | return rx; 199 | } 200 | 201 | let mut handles = Vec::new(); 202 | let mut chunk_length = tracks.len() / max_threads; 203 | if chunk_length == 0 { 204 | chunk_length = tracks.len(); 205 | } else if chunk_length == 1 && tracks.len() > max_threads { 206 | chunk_length = 2; 207 | } 208 | 209 | for chunk in tracks.chunks(chunk_length) { 210 | let tx_thread = tx.clone(); 211 | let owned_chunk = chunk.to_owned(); 212 | let child = thread::spawn(move || { 213 | for track in owned_chunk { 214 | let _ = tx_thread.send(Meta { 215 | file:track.clone(), 216 | meta: tags::read(&track, true), 217 | }); 218 | } 219 | }); 220 | handles.push(child); 221 | } 222 | 223 | rx 224 | } 225 | 226 | fn check_for_tags(db: &db::Db, mpath: &PathBuf, track_paths: Vec, max_threads: usize, notifs: &mut NotifInfo) -> Vec { 227 | let mut untagged_paths:Vec = Vec::new(); 228 | let total = track_paths.len(); 229 | let results = read_tags(track_paths, max_threads); 230 | let progress = ProgressBar::new(total.try_into().unwrap()).with_style( 231 | ProgressStyle::default_bar() 232 | .template("[{elapsed_precise}] [{bar:25}] {percent:>3}% {pos:>6}/{len:6} {wide_msg}") 233 | .progress_chars("=> "), 234 | ); 235 | 236 | log::info!("Reading any existing analysis tags"); 237 | send_notif(notifs, "Reading any existing analysis tags"); 238 | for res in results { 239 | let path = PathBuf::from(&res.file); 240 | let stripped = path.strip_prefix(mpath).unwrap(); 241 | let spbuff = stripped.to_path_buf(); 242 | let sname = String::from(spbuff.to_string_lossy()); 243 | progress.set_message(format!("{}", sname)); 244 | if !res.meta.is_empty() && !res.meta.analysis.is_none() { 245 | db.add_track(&sname, &res.meta.clone(), &res.meta.analysis.unwrap()); 246 | } else { 247 | untagged_paths.push(res.file); 248 | } 249 | if terminate_analysis() { 250 | break 251 | } 252 | progress.inc(1); 253 | if notifs.enabled { 254 | let pc = (progress.position() as f64 * 100.0)/total as f64; 255 | send_notif(notifs, &format!("READ TAGS {:8.2}% {}", pc, sname)); 256 | } 257 | } 258 | if terminate_analysis() { 259 | progress.abandon_with_message("Terminated!"); 260 | } else { 261 | progress.finish_with_message("Finished!"); 262 | } 263 | untagged_paths 264 | } 265 | 266 | fn analyse_new_files(db: &db::Db, mpath: &PathBuf, track_paths: Vec, max_threads: usize, write_tags: bool, 267 | preserve_mod_times: bool, notifs: &mut NotifInfo) -> Result<()> { 268 | let total = track_paths.len(); 269 | let progress = ProgressBar::new(total.try_into().unwrap()).with_style( 270 | ProgressStyle::default_bar() 271 | .template("[{elapsed_precise}] [{bar:25}] {percent:>3}% {pos:>6}/{len:6} {wide_msg}") 272 | .progress_chars("=> "), 273 | ); 274 | let mut analysed = 0; 275 | let mut failed: Vec = Vec::new(); 276 | let mut tag_error: Vec = Vec::new(); 277 | let mut reported_cue:HashSet = HashSet::new(); 278 | let mut options:AnalysisOptions = AnalysisOptions::default(); 279 | options.number_cores = NonZero::new(max_threads).unwrap(); 280 | 281 | send_notif(notifs, "Analysing new files"); 282 | log::info!("Analysing new files"); 283 | 284 | for (path, result) in SongDecoder::analyze_paths_with_options(track_paths, options) { 285 | let stripped = path.strip_prefix(mpath).unwrap(); 286 | let spbuff = stripped.to_path_buf(); 287 | let sname = String::from(spbuff.to_string_lossy()); 288 | progress.set_message(format!("{}", sname)); 289 | let mut inc_progress = true; // Only want to increment progress once for cue tracks 290 | match result { 291 | Ok(track) => { 292 | let cpath = String::from(path.to_string_lossy()); 293 | match track.cue_info { 294 | Some(cue) => { 295 | match track.track_number { 296 | Some(track_num) => { 297 | if reported_cue.contains(&cpath) { 298 | inc_progress = false; 299 | } else { 300 | analysed += 1; 301 | reported_cue.insert(cpath); 302 | } 303 | let meta = db::Metadata { 304 | title: track.title.unwrap_or_default().to_string(), 305 | artist: track.artist.unwrap_or_default().to_string(), 306 | album: track.album.unwrap_or_default().to_string(), 307 | album_artist: track.album_artist.unwrap_or_default().to_string(), 308 | genre: track.genre.unwrap_or_default().to_string(), 309 | duration: track.duration.as_secs() as u32, 310 | analysis: None 311 | }; 312 | 313 | // Remove prefix from audio_file_path 314 | let pbuff = PathBuf::from(&cue.audio_file_path); 315 | let stripped = pbuff.strip_prefix(mpath).unwrap(); 316 | let spbuff = stripped.to_path_buf(); 317 | let sname = String::from(spbuff.to_string_lossy()); 318 | 319 | let db_path = format!("{}{}{}", sname, db::CUE_MARKER, track_num); 320 | db.add_track(&db_path, &meta, &track.analysis); 321 | } 322 | None => { failed.push(format!("{} - No track number?", sname)); } 323 | } 324 | } 325 | None => { 326 | // Use lofty to read tags here, and not bliss's, so that if update 327 | // tags is ever used they are from the same source. 328 | let mut meta = tags::read(&cpath, false); 329 | if meta.is_empty() { 330 | // Lofty failed? Try from bliss... 331 | meta.title = track.title.unwrap_or_default().to_string(); 332 | meta.artist = track.artist.unwrap_or_default().to_string(); 333 | meta.album = track.album.unwrap_or_default().to_string(); 334 | meta.album_artist = track.album_artist.unwrap_or_default().to_string(); 335 | meta.genre = track.genre.unwrap_or_default().to_string(); 336 | meta.duration = track.duration.as_secs() as u32; 337 | } 338 | if meta.is_empty() { 339 | tag_error.push(sname.clone()); 340 | } 341 | if write_tags { 342 | tags::write_analysis(&cpath, &track.analysis, preserve_mod_times); 343 | } 344 | db.add_track(&sname, &meta, &track.analysis); 345 | } 346 | } 347 | analysed += 1; 348 | } 349 | Err(e) => { 350 | failed.push(format!("{} - {}", sname, e)); 351 | let metadata = fs::metadata(path).unwrap(); 352 | let mtime = FileTime::from_last_modification_time(&metadata); 353 | db.add_to_failures(&sname, mtime.unix_seconds(), &format!("{}", e)); 354 | } 355 | }; 356 | 357 | if inc_progress { 358 | progress.inc(1); 359 | if notifs.enabled { 360 | let pc = (progress.position() as f64 * 100.0)/total as f64; 361 | send_notif(notifs, &format!("ANALYSE {:8.2}% {}", pc, sname)); 362 | } 363 | } 364 | if terminate_analysis() { 365 | break 366 | } 367 | } 368 | 369 | if terminate_analysis() { 370 | progress.abandon_with_message("Terminated!"); 371 | } else { 372 | progress.finish_with_message("Finished!"); 373 | } 374 | log::info!("{} Analysed. {} Failed.", analysed, failed.len()); 375 | show_errors(&mut failed, &mut tag_error); 376 | Ok(()) 377 | } 378 | 379 | pub fn analyse_files(db_path: &str, mpaths: &Vec, dry_run: bool, keep_old: bool, max_num_files: usize, 380 | max_threads: usize, ignore_path: &PathBuf, read_tags: bool, write_tags: bool, preserve_mod_times: bool, 381 | lms_host: &String, json_port: u16, send_notifs: bool) -> bool { 382 | let mut db = db::Db::new(&String::from(db_path)); 383 | let mut notifs = NotifInfo { 384 | enabled: send_notifs, 385 | address: format!("http://{}:{}/jsonrpc.js", lms_host, json_port), 386 | last_send: 0, 387 | start_time: SystemTime::now().duration_since(UNIX_EPOCH).expect("time should go forward").as_secs(), 388 | }; 389 | 390 | ctrlc::set_handler(move || { 391 | handle_ctrl_c(); 392 | }).expect("Error setting Ctrl-C handler"); 393 | 394 | db.init(); 395 | 396 | if !keep_old { 397 | send_notif(&mut notifs, "Removing old files from DB"); 398 | db.remove_old(mpaths, dry_run); 399 | } 400 | 401 | let mut changes_made = false; 402 | for path in mpaths { 403 | let mpath = path.clone(); 404 | let cur = path.clone(); 405 | let mut track_paths: Vec = Vec::new(); 406 | let mut file_count:usize = 0; 407 | 408 | log::info!("Looking for new files in {}", mpath.to_string_lossy()); 409 | send_notif(&mut notifs, &format!("Looking for new files in {}", mpath.to_string_lossy())); 410 | 411 | get_file_list(&mut db, &mpath, &cur, &mut track_paths, &mut file_count, max_num_files, dry_run, &mut notifs); 412 | track_paths.sort(); 413 | log::info!("New files: {}", track_paths.len()); 414 | 415 | if !terminate_analysis() { 416 | if dry_run { 417 | if !track_paths.is_empty() { 418 | log::info!("The following need to be analysed (or tags read):"); 419 | for track in track_paths { 420 | log::info!(" {}", track); 421 | } 422 | } 423 | } else { 424 | if !track_paths.is_empty() { 425 | let untagged_paths = if read_tags { check_for_tags(&db, &mpath, track_paths, max_threads, &mut notifs) } else { track_paths }; 426 | 427 | if !untagged_paths.is_empty() { 428 | log::info!("New untagged files: {}", untagged_paths.len()); 429 | match analyse_new_files(&db, &mpath, untagged_paths, max_threads, write_tags, preserve_mod_times, &mut notifs) { 430 | Ok(_) => { changes_made = true; } 431 | Err(e) => { log::error!("Analysis returned error: {}", e); } 432 | } 433 | } else { 434 | log::info!("No new untagged files to analyse"); 435 | send_notif(&mut notifs, "No new files to analyse"); 436 | } 437 | } 438 | } 439 | } 440 | } 441 | 442 | db.close(); 443 | if changes_made && ignore_path.exists() && ignore_path.is_file() { 444 | log::info!("Updating 'ignore' flags"); 445 | send_notif(&mut notifs, "Updating ignore"); 446 | db::update_ignore(&db_path, &ignore_path); 447 | } 448 | if send_notifs { 449 | send_notif_msg(&mut notifs, "FINISHED"); 450 | } 451 | changes_made 452 | } 453 | -------------------------------------------------------------------------------- /src/db.rs: -------------------------------------------------------------------------------- 1 | /** 2 | * Analyse music with Bliss 3 | * 4 | * Copyright (c) 2022-2025 Craig Drummond 5 | * GPLv3 license. 6 | * 7 | **/ 8 | 9 | use crate::tags; 10 | use bliss_audio::{Analysis, AnalysisIndex, FeaturesVersion}; 11 | use indicatif::{ProgressBar, ProgressStyle}; 12 | use rusqlite::{params, Connection}; 13 | use std::convert::TryInto; 14 | use std::fs::File; 15 | use std::io::{BufRead, BufReader}; 16 | use std::path::PathBuf; 17 | use std::process; 18 | use std::thread; 19 | use std::thread::JoinHandle; 20 | 21 | pub const CUE_MARKER: &str = ".CUE_TRACK."; 22 | 23 | pub struct FileMetadata { 24 | pub rowid: usize, 25 | pub file: String, 26 | pub title: Option, 27 | pub artist: Option, 28 | pub album_artist: Option, 29 | pub album: Option, 30 | pub genre: Option, 31 | pub duration: u32, 32 | } 33 | 34 | #[derive(Clone)] 35 | struct AnalysisResults { 36 | pub file: String, 37 | pub analysis: Analysis, 38 | } 39 | 40 | #[derive(Clone, Default, PartialEq)] 41 | pub struct Metadata { 42 | pub title: String, 43 | pub artist: String, 44 | pub album_artist: String, 45 | pub album: String, 46 | pub genre: String, 47 | pub duration: u32, 48 | pub analysis: Option, 49 | } 50 | 51 | impl Metadata { 52 | pub fn is_empty(&self) -> bool { 53 | self.title.is_empty() 54 | && self.artist.is_empty() 55 | && self.album_artist.is_empty() 56 | && self.album.is_empty() 57 | && self.genre.is_empty() 58 | } 59 | } 60 | 61 | static mut TERMINATE_EXPORT_FLAG: bool = false; 62 | 63 | fn terminate_export() -> bool { 64 | unsafe { 65 | return TERMINATE_EXPORT_FLAG 66 | } 67 | } 68 | 69 | fn handle_ctrl_c() { 70 | unsafe { 71 | TERMINATE_EXPORT_FLAG = true; 72 | } 73 | } 74 | 75 | pub struct Db { 76 | pub conn: Connection, 77 | } 78 | 79 | impl Db { 80 | pub fn new(path: &String) -> Self { 81 | match Connection::open(path) { 82 | Ok(conn) => { 83 | Self { 84 | conn: conn, 85 | } 86 | } 87 | Err(e) => { 88 | log::error!("Failed top open/create database. {}", e); 89 | process::exit(-1); 90 | } 91 | } 92 | } 93 | 94 | pub fn init(&self) { 95 | let _ = self.conn.execute("DROP TABLE IF EXISTS Tracks;", [],); 96 | let _ = self.conn.execute("DROP INDEX IF EXISTS Tracks_idx", []); 97 | 98 | let _ = self.conn.execute("VACUUM", [],); 99 | 100 | let cmd = self.conn.execute( 101 | "CREATE TABLE IF NOT EXISTS TracksV2 ( 102 | File text primary key, 103 | Title text, 104 | Artist text, 105 | Album text, 106 | AlbumArtist text, 107 | Genre text, 108 | Duration integer, 109 | Ignore integer, 110 | Tempo real, 111 | Zcr real, 112 | MeanSpectralCentroid real, 113 | StdDevSpectralCentroid real, 114 | MeanSpectralRolloff real, 115 | StdDevSpectralRolloff real, 116 | MeanSpectralFlatness real, 117 | StdDevSpectralFlatness real, 118 | MeanLoudness real, 119 | StdDevLoudness real, 120 | Chroma1 real, 121 | Chroma2 real, 122 | Chroma3 real, 123 | Chroma4 real, 124 | Chroma5 real, 125 | Chroma6 real, 126 | Chroma7 real, 127 | Chroma8 real, 128 | Chroma9 real, 129 | Chroma10 real, 130 | Chroma11 real, 131 | Chroma12 real, 132 | Chroma13 real 133 | );", 134 | [], 135 | ); 136 | 137 | if cmd.is_err() { 138 | log::error!("Failed to create Files table"); 139 | process::exit(-1); 140 | } 141 | 142 | let cmd = self.conn.execute("CREATE UNIQUE INDEX IF NOT EXISTS TracksV2_idx ON TracksV2(File)", []); 143 | 144 | if cmd.is_err() { 145 | log::error!("Failed to create Files index"); 146 | process::exit(-1); 147 | } 148 | 149 | let cmd = self.conn.execute( 150 | "CREATE TABLE IF NOT EXISTS Failures ( 151 | File text primary key, 152 | Timestamp integer, 153 | Reason text 154 | );", 155 | [], 156 | ); 157 | 158 | if cmd.is_err() { 159 | log::error!("Failed to create Failures table"); 160 | process::exit(-1); 161 | } 162 | 163 | let cmd = self.conn.execute("CREATE UNIQUE INDEX IF NOT EXISTS Failures_idx ON Failures(File)", []); 164 | 165 | if cmd.is_err() { 166 | log::error!("Failed to create Failures index"); 167 | process::exit(-1); 168 | } 169 | } 170 | 171 | pub fn close(self) { 172 | let _ = self.conn.close(); 173 | } 174 | 175 | pub fn get_rowid(&self, path: &str) -> Result { 176 | let mut db_path = path.to_string(); 177 | if cfg!(windows) { 178 | db_path = db_path.replace("\\", "/"); 179 | } 180 | let mut stmt = self.conn.prepare("SELECT rowid FROM TracksV2 WHERE File=:path;")?; 181 | let track_iter = stmt.query_map(&[(":path", &db_path)], |row| Ok(row.get(0)?)).unwrap(); 182 | let mut rowid: usize = 0; 183 | for tr in track_iter { 184 | rowid = tr.unwrap(); 185 | break; 186 | } 187 | Ok(rowid) 188 | } 189 | 190 | pub fn add_track(&self, path: &String, meta: &Metadata, analysis: &Analysis) { 191 | let mut db_path = path.clone(); 192 | if cfg!(windows) { 193 | db_path = db_path.replace("\\", "/"); 194 | } 195 | match self.get_rowid(&path) { 196 | Ok(id) => { 197 | if id <= 0 { 198 | match self.conn.execute("INSERT INTO TracksV2 (File, Title, Artist, AlbumArtist, Album, Genre, Duration, Ignore, Tempo, Zcr, MeanSpectralCentroid, StdDevSpectralCentroid, MeanSpectralRolloff, StdDevSpectralRolloff, MeanSpectralFlatness, StdDevSpectralFlatness, MeanLoudness, StdDevLoudness, Chroma1, Chroma2, Chroma3, Chroma4, Chroma5, Chroma6, Chroma7, Chroma8, Chroma9, Chroma10, Chroma11, Chroma12, Chroma13) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", 199 | params![db_path, meta.title, meta.artist, meta.album_artist, meta.album, meta.genre, meta.duration, 0, 200 | analysis[AnalysisIndex::Tempo], analysis[AnalysisIndex::Zcr], analysis[AnalysisIndex::MeanSpectralCentroid], analysis[AnalysisIndex::StdDeviationSpectralCentroid], analysis[AnalysisIndex::MeanSpectralRolloff], 201 | analysis[AnalysisIndex::StdDeviationSpectralRolloff], analysis[AnalysisIndex::MeanSpectralFlatness], analysis[AnalysisIndex::StdDeviationSpectralFlatness], analysis[AnalysisIndex::MeanLoudness], analysis[AnalysisIndex::StdDeviationLoudness], 202 | analysis[AnalysisIndex::Chroma1], analysis[AnalysisIndex::Chroma2], analysis[AnalysisIndex::Chroma3], analysis[AnalysisIndex::Chroma4], analysis[AnalysisIndex::Chroma5], 203 | analysis[AnalysisIndex::Chroma6], analysis[AnalysisIndex::Chroma7], analysis[AnalysisIndex::Chroma8], analysis[AnalysisIndex::Chroma9], analysis[AnalysisIndex::Chroma10], 204 | analysis[AnalysisIndex::Chroma11], analysis[AnalysisIndex::Chroma12], analysis[AnalysisIndex::Chroma13]]) { 205 | Ok(_) => { self.remove_from_failures(path); } 206 | Err(e) => { log::error!("Failed to insert '{}' into database. {}", path, e); } 207 | } 208 | } else { 209 | match self.conn.execute("UPDATE TracksV2 SET Title=?, Artist=?, AlbumArtist=?, Album=?, Genre=?, Duration=?, Tempo=?, Zcr=?, MeanSpectralCentroid=?, StdDevSpectralCentroid=?, MeanSpectralRolloff=?, StdDevSpectralRolloff=?, MeanSpectralFlatness=?, StdDevSpectralFlatness=?, MeanLoudness=?, StdDevLoudness=?, Chroma1=?, Chroma2=?, Chroma3=?, Chroma4=?, Chroma5=?, Chroma6=?, Chroma7=?, Chroma8=?, Chroma9=?, Chroma10=?, Chroma11=?, Chroma12=?, Chroma13=? WHERE rowid=?;", 210 | params![meta.title, meta.artist, meta.album_artist, meta.album, meta.genre, meta.duration, 211 | analysis[AnalysisIndex::Tempo], analysis[AnalysisIndex::Zcr], analysis[AnalysisIndex::MeanSpectralCentroid], analysis[AnalysisIndex::StdDeviationSpectralCentroid], analysis[AnalysisIndex::MeanSpectralRolloff], 212 | analysis[AnalysisIndex::StdDeviationSpectralRolloff], analysis[AnalysisIndex::MeanSpectralFlatness], analysis[AnalysisIndex::StdDeviationSpectralFlatness], analysis[AnalysisIndex::MeanLoudness], analysis[AnalysisIndex::StdDeviationLoudness], 213 | analysis[AnalysisIndex::Chroma1], analysis[AnalysisIndex::Chroma2], analysis[AnalysisIndex::Chroma3], analysis[AnalysisIndex::Chroma4], analysis[AnalysisIndex::Chroma5], 214 | analysis[AnalysisIndex::Chroma6], analysis[AnalysisIndex::Chroma7], analysis[AnalysisIndex::Chroma8], analysis[AnalysisIndex::Chroma9], analysis[AnalysisIndex::Chroma10], id]) { 215 | Ok(_) => { self.remove_from_failures(path); } 216 | Err(e) => { log::error!("Failed to update '{}' in database. {}", path, e); } 217 | } 218 | } 219 | } 220 | Err(_) => { } 221 | } 222 | } 223 | 224 | pub fn add_to_failures(&self, path: &String, timestamp:i64, reason: &String) { 225 | self.remove_from_failures(path); 226 | let _ = self.conn.execute("INSERT INTO Failures (File, Timestamp, Reason) VALUES (?, ?, ?);", params![path, timestamp, reason]); 227 | } 228 | 229 | pub fn remove_from_failures(&self, path: &String) { 230 | let _ = self.conn.execute("DELETE FROM Failures WHERE File = ?;", params![path]); 231 | } 232 | 233 | pub fn remove_old(&self, mpaths: &Vec, dry_run: bool) { 234 | self.remove_old_from_table(mpaths, dry_run, "TracksV2"); 235 | self.remove_old_from_table(mpaths, dry_run, "Failures"); 236 | } 237 | 238 | fn clear_failures(&self) { 239 | let _ = self.conn.execute("DELETE FROM Failures;", []); 240 | } 241 | 242 | pub fn get_failure_timestamp(&self, path: &String) -> i64 { 243 | let mut ts:i64 = 0; 244 | let mut db_path = path.to_string(); 245 | if cfg!(windows) { 246 | db_path = db_path.replace("\\", "/"); 247 | } 248 | let mut stmt = self.conn.prepare("SELECT Timestamp FROM Failures WHERE File=:path;").unwrap(); 249 | let track_iter = stmt.query_map(&[(":path", &db_path)], |row| Ok(row.get(0)?)).unwrap(); 250 | for tr in track_iter { 251 | ts = tr.unwrap(); 252 | break; 253 | } 254 | ts 255 | } 256 | 257 | fn remove_old_from_table(&self, mpaths: &Vec, dry_run: bool, table: &str) { 258 | log::info!("Looking for non-existent tracks"); 259 | let mut stmt = self.conn.prepare(format!("SELECT File FROM {};", table).as_str()).unwrap(); 260 | let track_iter = stmt.query_map([], |row| Ok((row.get(0)?,))).unwrap(); 261 | let mut to_remove: Vec = Vec::new(); 262 | for tr in track_iter { 263 | let mut db_path: String = tr.unwrap().0; 264 | let orig_path = db_path.clone(); 265 | match orig_path.find(CUE_MARKER) { 266 | Some(s) => { 267 | db_path.truncate(s); 268 | } 269 | None => {} 270 | } 271 | if cfg!(windows) { 272 | db_path = db_path.replace("/", "\\"); 273 | } 274 | let mut exists = false; 275 | 276 | for mpath in mpaths { 277 | let path = mpath.join(PathBuf::from(db_path.clone())); 278 | //log::debug!("Check if '{}' exists.", path.to_string_lossy()); 279 | 280 | if path.exists() { 281 | exists = true; 282 | break; 283 | } 284 | } 285 | 286 | if !exists { 287 | to_remove.push(orig_path); 288 | } 289 | } 290 | 291 | let num_to_remove = to_remove.len(); 292 | log::info!("Num non-existent tracks: {}", num_to_remove); 293 | if num_to_remove > 0 { 294 | if dry_run { 295 | log::info!("The following need to be removed from database:"); 296 | for t in to_remove { 297 | log::info!(" {}", t); 298 | } 299 | } else { 300 | let count_before = self.get_track_count(); 301 | for t in to_remove { 302 | //log::debug!("Remove '{}'", t); 303 | let cmd = self.conn.execute(format!("DELETE FROM {} WHERE File = ?;", table).as_str(), params![t]); 304 | 305 | if let Err(e) = cmd { 306 | log::error!("Failed to remove '{}' - {}", t, e) 307 | } 308 | } 309 | let count_now = self.get_track_count(); 310 | if (count_now + num_to_remove) != count_before { 311 | log::error!("Failed to remove all tracks. Count before: {}, wanted to remove: {}, count now: {}", count_before, num_to_remove, count_now); 312 | } 313 | } 314 | } 315 | } 316 | 317 | pub fn get_track_count(&self) -> usize { 318 | let mut stmt = self.conn.prepare("SELECT COUNT(*) FROM TracksV2;").unwrap(); 319 | let track_iter = stmt.query_map([], |row| Ok(row.get(0)?)).unwrap(); 320 | let mut count: usize = 0; 321 | for tr in track_iter { 322 | count = tr.unwrap(); 323 | break; 324 | } 325 | count 326 | } 327 | 328 | pub fn update_tags(&self, mpaths: &Vec) { 329 | let total = self.get_track_count(); 330 | if total > 0 { 331 | let progress = ProgressBar::new(total.try_into().unwrap()).with_style( 332 | ProgressStyle::default_bar() 333 | .template( 334 | "[{elapsed_precise}] [{bar:25}] {percent:>3}% {pos:>6}/{len:6} {wide_msg}", 335 | ) 336 | .progress_chars("=> "), 337 | ); 338 | 339 | let mut stmt = self.conn.prepare("SELECT rowid, File, Title, Artist, AlbumArtist, Album, Genre, Duration FROM TracksV2 ORDER BY File ASC;").unwrap(); 340 | let track_iter = stmt 341 | .query_map([], |row| { 342 | Ok(FileMetadata { 343 | rowid: row.get(0)?, 344 | file: row.get(1)?, 345 | title: row.get(2)?, 346 | artist: row.get(3)?, 347 | album_artist: row.get(4)?, 348 | album: row.get(5)?, 349 | genre: row.get(6)?, 350 | duration: row.get(7)?, 351 | }) 352 | }) 353 | .unwrap(); 354 | 355 | let mut updated = 0; 356 | for tr in track_iter { 357 | let dbtags = tr.unwrap(); 358 | if !dbtags.file.contains(CUE_MARKER) { 359 | let dtags = Metadata { 360 | title: dbtags.title.unwrap_or_default(), 361 | artist: dbtags.artist.unwrap_or_default(), 362 | album_artist: dbtags.album_artist.unwrap_or_default(), 363 | album: dbtags.album.unwrap_or_default(), 364 | genre: dbtags.genre.unwrap_or_default(), 365 | duration: dbtags.duration, 366 | analysis: None, 367 | }; 368 | progress.set_message(format!("{}", dbtags.file)); 369 | 370 | for mpath in mpaths { 371 | let track_path = mpath.join(&dbtags.file); 372 | if track_path.exists() { 373 | let path = String::from(track_path.to_string_lossy()); 374 | let ftags = tags::read(&path, false); 375 | 376 | 377 | if ftags.is_empty() { 378 | log::error!("Failed to read tags of '{}'", dbtags.file); 379 | } else if ftags != dtags { 380 | match self.conn.execute("UPDATE TracksV2 SET Title=?, Artist=?, AlbumArtist=?, Album=?, Genre=?, Duration=? WHERE rowid=?;", 381 | params![ftags.title, ftags.artist, ftags.album_artist, ftags.album, ftags.genre, ftags.duration, dbtags.rowid]) { 382 | Ok(_) => { updated += 1; } 383 | Err(e) => { log::error!("Failed to update tags of '{}'. {}", dbtags.file, e); } 384 | } 385 | } 386 | break; 387 | } 388 | } 389 | } 390 | progress.inc(1); 391 | } 392 | progress.finish_with_message(format!("{} Updated.", updated)) 393 | } 394 | } 395 | 396 | pub fn clear_ignore(&self) { 397 | let cmd = self.conn.execute("UPDATE TracksV2 SET Ignore=0;", []); 398 | 399 | if let Err(e) = cmd { 400 | log::error!("Failed clear Ignore column. {}", e); 401 | } 402 | } 403 | 404 | pub fn set_ignore(&self, line: &str) { 405 | log::info!("Ignore: {}", line); 406 | if line.starts_with("SQL:") { 407 | let sql = &line[4..]; 408 | let cmd = self.conn.execute(&format!("UPDATE TracksV2 Set Ignore=1 WHERE {}", sql), []); 409 | 410 | if let Err(e) = cmd { 411 | log::error!("Failed set Ignore column for '{}'. {}", line, e); 412 | } 413 | } else { 414 | let cmd = self.conn.execute(&format!("UPDATE TracksV2 SET Ignore=1 WHERE File LIKE \"{}%\"", line), []); 415 | 416 | if let Err(e) = cmd { 417 | log::error!("Failed set Ignore column for '{}'. {}", line, e); 418 | } 419 | } 420 | } 421 | 422 | pub fn export(&self, mpaths: &Vec, max_threads: usize, preserve_mod_times: bool) { 423 | ctrlc::set_handler(move || { 424 | handle_ctrl_c(); 425 | }).expect("Error setting Ctrl-C handler"); 426 | 427 | log::info!("Querying database"); 428 | let mut tracks:Vec = Vec::new(); 429 | let mut stmt = self.conn.prepare("SELECT File, Tempo, Zcr, MeanSpectralCentroid, StdDevSpectralCentroid, MeanSpectralRolloff, StdDevSpectralRolloff, MeanSpectralFlatness, StdDevSpectralFlatness, MeanLoudness, StdDevLoudness, Chroma1, Chroma2, Chroma3, Chroma4, Chroma5, Chroma6, Chroma7, Chroma8, Chroma9, Chroma10, Chroma11, Chroma12, Chroma13 FROM TracksV2 ORDER BY File ASC;").unwrap(); 430 | let track_iter = stmt 431 | .query_map([], |row| { 432 | Ok(AnalysisResults { 433 | file: row.get(0)?, 434 | analysis: Analysis::new([row.get(1)?, row.get(2)?, row.get(3)?, row.get(4)?, row.get(5)?, row.get(6)?, row.get(7)?, row.get(8)?, row.get(9)?, row.get(10)?, row.get(11)?, row.get(12)?, row.get(13)?, row.get(14)?, row.get(15)?, row.get(16)?, row.get(17)?, row.get(18)?, row.get(19)?, row.get(20)?, row.get(21)?, row.get(22)?, row.get(23)?].to_vec(), FeaturesVersion::LATEST).expect("number of vals should be 23"), 435 | }) 436 | }) 437 | .unwrap(); 438 | 439 | for tr in track_iter { 440 | let dbtags = tr.unwrap(); 441 | if !dbtags.file.contains(CUE_MARKER) { 442 | for mpath in mpaths { 443 | let track_path = mpath.join(dbtags.file.clone()); 444 | if track_path.exists() { 445 | tracks.push(AnalysisResults{file:String::from(track_path.to_string_lossy()), analysis:dbtags.analysis.clone()}); 446 | } 447 | } 448 | } 449 | } 450 | 451 | let total = tracks.len(); 452 | if total <= 0 { 453 | log::info!("Nothing to export"); 454 | return; 455 | } 456 | log::info!("Starting export"); 457 | let chunk_size = total/max_threads; 458 | let mut threads: Vec> = vec![]; 459 | 460 | let (sender, receiver) = std::sync::mpsc::channel(); 461 | let reporting_thread = std::thread::spawn(move || { 462 | let mut processed = 0; 463 | let mut had_tags = 0; 464 | let mut failed_to_write = 0; 465 | let mut exported = 0; 466 | let progress = ProgressBar::new(total.try_into().unwrap()).with_style( 467 | ProgressStyle::default_bar() 468 | .template( 469 | "[{elapsed_precise}] [{bar:25}] {percent:>3}% {pos:>6}/{len:6} {wide_msg}", 470 | ) 471 | .progress_chars("=> "), 472 | ); 473 | for resp in receiver { 474 | progress.inc(1); 475 | processed+=1; 476 | if resp==0 { 477 | had_tags+=1; 478 | } else if resp==1 { 479 | failed_to_write+=1; 480 | } else { 481 | exported+=1; 482 | } 483 | if processed == total { 484 | break; 485 | } 486 | if terminate_export() { 487 | break 488 | } 489 | } 490 | if terminate_export() { 491 | progress.abandon_with_message("Terminated!"); 492 | } else { 493 | progress.finish_with_message(format!("Finished!")); 494 | } 495 | log::info!("{} Exported. {} Existing. {} Failed.", exported, had_tags, failed_to_write); 496 | }); 497 | threads.push(reporting_thread); 498 | for thread in 0..max_threads { 499 | let tid:usize = thread; 500 | let start = tid * chunk_size; 501 | let end = if tid+1 == max_threads { total } else { start + chunk_size }; 502 | let sndr = sender.clone(); 503 | let trks = Vec::from_iter(tracks[start..end].iter().cloned()); 504 | threads.push(thread::spawn(move || { 505 | for track in trks { 506 | let mut updated = 0; 507 | let meta = tags::read(&track.file, true); 508 | if meta.is_empty() || meta.analysis.is_none() || meta.analysis.unwrap()!=track.analysis { 509 | updated = 1; 510 | if tags::write_analysis(&track.file, &track.analysis, preserve_mod_times) { 511 | updated = 2; 512 | } 513 | } 514 | sndr.send(updated).unwrap(); 515 | if terminate_export() { 516 | break 517 | } 518 | } 519 | })); 520 | } 521 | for thread in threads { 522 | let _ = thread.join(); 523 | } 524 | } 525 | } 526 | 527 | pub fn read_tags(db_path: &str, mpaths: &Vec) { 528 | let db = Db::new(&String::from(db_path)); 529 | db.init(); 530 | db.update_tags(&mpaths); 531 | db.close(); 532 | } 533 | 534 | pub fn export(db_path: &str, mpaths: &Vec, max_threads: usize, preserve_mod_times: bool) { 535 | let db = Db::new(&String::from(db_path)); 536 | db.init(); 537 | db.export(&mpaths, max_threads, preserve_mod_times); 538 | db.close(); 539 | } 540 | 541 | pub fn clear_failures(db_path: &str) { 542 | let db = Db::new(&String::from(db_path)); 543 | db.init(); 544 | db.clear_failures(); 545 | db.close(); 546 | } 547 | 548 | pub fn update_ignore(db_path: &str, ignore_path: &PathBuf) { 549 | let file = File::open(ignore_path).unwrap(); 550 | let reader = BufReader::new(file); 551 | let db = Db::new(&String::from(db_path)); 552 | db.init(); 553 | 554 | db.clear_ignore(); 555 | let mut lines = reader.lines(); 556 | while let Some(Ok(line)) = lines.next() { 557 | if !line.is_empty() && !line.starts_with("#") { 558 | db.set_ignore(&line); 559 | } 560 | } 561 | 562 | db.close(); 563 | } 564 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "adler2" 7 | version = "2.0.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 10 | 11 | [[package]] 12 | name = "adler32" 13 | version = "1.2.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" 16 | 17 | [[package]] 18 | name = "aho-corasick" 19 | version = "0.7.18" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 22 | dependencies = [ 23 | "memchr", 24 | ] 25 | 26 | [[package]] 27 | name = "android-tzdata" 28 | version = "0.1.1" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 31 | 32 | [[package]] 33 | name = "android_system_properties" 34 | version = "0.1.5" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 37 | dependencies = [ 38 | "libc", 39 | ] 40 | 41 | [[package]] 42 | name = "anstream" 43 | version = "0.6.20" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" 46 | dependencies = [ 47 | "anstyle", 48 | "anstyle-parse", 49 | "anstyle-query", 50 | "anstyle-wincon", 51 | "colorchoice", 52 | "is_terminal_polyfill", 53 | "utf8parse", 54 | ] 55 | 56 | [[package]] 57 | name = "anstyle" 58 | version = "1.0.11" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" 61 | 62 | [[package]] 63 | name = "anstyle-parse" 64 | version = "0.2.7" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" 67 | dependencies = [ 68 | "utf8parse", 69 | ] 70 | 71 | [[package]] 72 | name = "anstyle-query" 73 | version = "1.1.4" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" 76 | dependencies = [ 77 | "windows-sys 0.60.2", 78 | ] 79 | 80 | [[package]] 81 | name = "anstyle-wincon" 82 | version = "3.0.10" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" 85 | dependencies = [ 86 | "anstyle", 87 | "once_cell_polyfill", 88 | "windows-sys 0.60.2", 89 | ] 90 | 91 | [[package]] 92 | name = "anyhow" 93 | version = "1.0.97" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" 96 | 97 | [[package]] 98 | name = "argparse" 99 | version = "0.2.2" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "3f8ebf5827e4ac4fd5946560e6a99776ea73b596d80898f357007317a7141e47" 102 | 103 | [[package]] 104 | name = "arrayref" 105 | version = "0.3.6" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 108 | 109 | [[package]] 110 | name = "arrayvec" 111 | version = "0.5.2" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 114 | 115 | [[package]] 116 | name = "arrayvec" 117 | version = "0.7.6" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 120 | 121 | [[package]] 122 | name = "autocfg" 123 | version = "1.1.0" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 126 | 127 | [[package]] 128 | name = "base-x" 129 | version = "0.2.11" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" 132 | 133 | [[package]] 134 | name = "base64" 135 | version = "0.13.0" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 138 | 139 | [[package]] 140 | name = "bindgen" 141 | version = "0.64.0" 142 | source = "registry+https://github.com/rust-lang/crates.io-index" 143 | checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" 144 | dependencies = [ 145 | "bitflags 1.3.2", 146 | "cexpr", 147 | "clang-sys", 148 | "lazy_static", 149 | "lazycell", 150 | "log", 151 | "peeking_take_while", 152 | "proc-macro2", 153 | "quote", 154 | "regex", 155 | "rustc-hash", 156 | "shlex", 157 | "syn 1.0.99", 158 | "which 4.4.2", 159 | ] 160 | 161 | [[package]] 162 | name = "bindgen" 163 | version = "0.70.1" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" 166 | dependencies = [ 167 | "bitflags 2.9.0", 168 | "cexpr", 169 | "clang-sys", 170 | "itertools", 171 | "proc-macro2", 172 | "quote", 173 | "regex", 174 | "rustc-hash", 175 | "shlex", 176 | "syn 2.0.99", 177 | ] 178 | 179 | [[package]] 180 | name = "bitflags" 181 | version = "1.3.2" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 184 | 185 | [[package]] 186 | name = "bitflags" 187 | version = "2.9.0" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 190 | 191 | [[package]] 192 | name = "blake2b_simd" 193 | version = "0.5.11" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" 196 | dependencies = [ 197 | "arrayref", 198 | "arrayvec 0.5.2", 199 | "constant_time_eq", 200 | ] 201 | 202 | [[package]] 203 | name = "bliss-analyser" 204 | version = "0.5.2" 205 | dependencies = [ 206 | "anyhow", 207 | "argparse", 208 | "bliss-audio", 209 | "chrono", 210 | "configparser", 211 | "ctrlc", 212 | "dirs", 213 | "env_logger", 214 | "filetime", 215 | "hhmmss", 216 | "if_chain", 217 | "indicatif", 218 | "lofty", 219 | "log", 220 | "num_cpus", 221 | "rcue", 222 | "regex", 223 | "rusqlite", 224 | "serde_json", 225 | "substring", 226 | "ureq", 227 | "which 7.0.2", 228 | ] 229 | 230 | [[package]] 231 | name = "bliss-audio" 232 | version = "0.11.1" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "9efa224c03fc286d1b66b88946855b1418ea486fb1d8f772dc38c8e799d12e27" 235 | dependencies = [ 236 | "adler32", 237 | "bliss-audio-aubio-rs", 238 | "extended-isolation-forest", 239 | "ffmpeg-next", 240 | "ffmpeg-sys-next", 241 | "log", 242 | "ndarray", 243 | "ndarray-stats", 244 | "noisy_float", 245 | "rcue", 246 | "rubato", 247 | "rustfft", 248 | "strum", 249 | "strum_macros", 250 | "symphonia", 251 | "thiserror", 252 | ] 253 | 254 | [[package]] 255 | name = "bliss-audio-aubio-rs" 256 | version = "0.2.4" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "4a1eb88c6ac3439669d67bd728acf23b770c11e4587fe90d0d25be216d988172" 259 | dependencies = [ 260 | "bliss-audio-aubio-sys", 261 | ] 262 | 263 | [[package]] 264 | name = "bliss-audio-aubio-sys" 265 | version = "0.2.2" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | checksum = "3a5b978c743f6450be98229b052d996ed1cc0507274e9c68a7effeb51e8a13ec" 268 | dependencies = [ 269 | "bindgen 0.64.0", 270 | "cc", 271 | ] 272 | 273 | [[package]] 274 | name = "bumpalo" 275 | version = "3.9.1" 276 | source = "registry+https://github.com/rust-lang/crates.io-index" 277 | checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" 278 | 279 | [[package]] 280 | name = "bytemuck" 281 | version = "1.22.0" 282 | source = "registry+https://github.com/rust-lang/crates.io-index" 283 | checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" 284 | 285 | [[package]] 286 | name = "byteorder" 287 | version = "1.5.0" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 290 | 291 | [[package]] 292 | name = "cc" 293 | version = "1.1.10" 294 | source = "registry+https://github.com/rust-lang/crates.io-index" 295 | checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" 296 | dependencies = [ 297 | "jobserver", 298 | "libc", 299 | ] 300 | 301 | [[package]] 302 | name = "cexpr" 303 | version = "0.6.0" 304 | source = "registry+https://github.com/rust-lang/crates.io-index" 305 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 306 | dependencies = [ 307 | "nom", 308 | ] 309 | 310 | [[package]] 311 | name = "cfg-if" 312 | version = "1.0.0" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 315 | 316 | [[package]] 317 | name = "cfg_aliases" 318 | version = "0.2.1" 319 | source = "registry+https://github.com/rust-lang/crates.io-index" 320 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 321 | 322 | [[package]] 323 | name = "chrono" 324 | version = "0.4.40" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" 327 | dependencies = [ 328 | "android-tzdata", 329 | "iana-time-zone", 330 | "js-sys", 331 | "num-traits", 332 | "wasm-bindgen", 333 | "windows-link", 334 | ] 335 | 336 | [[package]] 337 | name = "chunked_transfer" 338 | version = "1.4.0" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" 341 | 342 | [[package]] 343 | name = "clang-sys" 344 | version = "1.8.1" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 347 | dependencies = [ 348 | "glob", 349 | "libc", 350 | "libloading", 351 | ] 352 | 353 | [[package]] 354 | name = "colorchoice" 355 | version = "1.0.4" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" 358 | 359 | [[package]] 360 | name = "configparser" 361 | version = "3.0.0" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "06821ea598337a8412cf47c5b71c3bc694a7f0aed188ac28b836fab164a2c202" 364 | 365 | [[package]] 366 | name = "console" 367 | version = "0.15.0" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" 370 | dependencies = [ 371 | "encode_unicode", 372 | "libc", 373 | "once_cell", 374 | "terminal_size", 375 | "winapi", 376 | ] 377 | 378 | [[package]] 379 | name = "const_fn" 380 | version = "0.4.11" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "2f8a2ca5ac02d09563609681103aada9e1777d54fc57a5acd7a41404f9c93b6e" 383 | 384 | [[package]] 385 | name = "constant_time_eq" 386 | version = "0.1.5" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 389 | 390 | [[package]] 391 | name = "core-foundation-sys" 392 | version = "0.8.7" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 395 | 396 | [[package]] 397 | name = "crc32fast" 398 | version = "1.3.2" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 401 | dependencies = [ 402 | "cfg-if", 403 | ] 404 | 405 | [[package]] 406 | name = "crossbeam-deque" 407 | version = "0.8.1" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" 410 | dependencies = [ 411 | "cfg-if", 412 | "crossbeam-epoch", 413 | "crossbeam-utils", 414 | ] 415 | 416 | [[package]] 417 | name = "crossbeam-epoch" 418 | version = "0.9.7" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9" 421 | dependencies = [ 422 | "cfg-if", 423 | "crossbeam-utils", 424 | "lazy_static", 425 | "memoffset", 426 | "scopeguard", 427 | ] 428 | 429 | [[package]] 430 | name = "crossbeam-utils" 431 | version = "0.8.7" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" 434 | dependencies = [ 435 | "cfg-if", 436 | "lazy_static", 437 | ] 438 | 439 | [[package]] 440 | name = "ctrlc" 441 | version = "3.4.7" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "46f93780a459b7d656ef7f071fe699c4d3d2cb201c4b24d085b6ddc505276e73" 444 | dependencies = [ 445 | "nix", 446 | "windows-sys 0.59.0", 447 | ] 448 | 449 | [[package]] 450 | name = "data-encoding" 451 | version = "2.8.0" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" 454 | 455 | [[package]] 456 | name = "dirs" 457 | version = "1.0.5" 458 | source = "registry+https://github.com/rust-lang/crates.io-index" 459 | checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" 460 | dependencies = [ 461 | "libc", 462 | "redox_users", 463 | "winapi", 464 | ] 465 | 466 | [[package]] 467 | name = "discard" 468 | version = "1.0.4" 469 | source = "registry+https://github.com/rust-lang/crates.io-index" 470 | checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" 471 | 472 | [[package]] 473 | name = "either" 474 | version = "1.14.0" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d" 477 | 478 | [[package]] 479 | name = "encode_unicode" 480 | version = "0.3.6" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" 483 | 484 | [[package]] 485 | name = "encoding_rs" 486 | version = "0.8.35" 487 | source = "registry+https://github.com/rust-lang/crates.io-index" 488 | checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 489 | dependencies = [ 490 | "cfg-if", 491 | ] 492 | 493 | [[package]] 494 | name = "env_filter" 495 | version = "0.1.3" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" 498 | dependencies = [ 499 | "log", 500 | "regex", 501 | ] 502 | 503 | [[package]] 504 | name = "env_home" 505 | version = "0.1.0" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" 508 | 509 | [[package]] 510 | name = "env_logger" 511 | version = "0.11.8" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" 514 | dependencies = [ 515 | "anstream", 516 | "anstyle", 517 | "env_filter", 518 | "jiff", 519 | "log", 520 | ] 521 | 522 | [[package]] 523 | name = "equivalent" 524 | version = "1.0.2" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 527 | 528 | [[package]] 529 | name = "errno" 530 | version = "0.3.10" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" 533 | dependencies = [ 534 | "libc", 535 | "windows-sys 0.59.0", 536 | ] 537 | 538 | [[package]] 539 | name = "extended" 540 | version = "0.1.0" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "af9673d8203fcb076b19dfd17e38b3d4ae9f44959416ea532ce72415a6020365" 543 | 544 | [[package]] 545 | name = "extended-isolation-forest" 546 | version = "0.2.3" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "db5193a74618ae2f7ea9c7feda2772192e0e3c04d9cbd2beb5ee9b0916d7eb3f" 549 | dependencies = [ 550 | "num-traits", 551 | "rand", 552 | "rand_distr", 553 | ] 554 | 555 | [[package]] 556 | name = "fallible-iterator" 557 | version = "0.3.0" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" 560 | 561 | [[package]] 562 | name = "fallible-streaming-iterator" 563 | version = "0.1.9" 564 | source = "registry+https://github.com/rust-lang/crates.io-index" 565 | checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" 566 | 567 | [[package]] 568 | name = "ffmpeg-next" 569 | version = "7.1.0" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "da02698288e0275e442a47fc12ca26d50daf0d48b15398ba5906f20ac2e2a9f9" 572 | dependencies = [ 573 | "bitflags 2.9.0", 574 | "ffmpeg-sys-next", 575 | "libc", 576 | ] 577 | 578 | [[package]] 579 | name = "ffmpeg-sys-next" 580 | version = "7.1.0" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "2bc3234d0a4b2f7d083699d0860c6c9dd83713908771b60f94a96f8704adfe45" 583 | dependencies = [ 584 | "bindgen 0.70.1", 585 | "cc", 586 | "libc", 587 | "num_cpus", 588 | "pkg-config", 589 | "vcpkg", 590 | ] 591 | 592 | [[package]] 593 | name = "filetime" 594 | version = "0.2.26" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" 597 | dependencies = [ 598 | "cfg-if", 599 | "libc", 600 | "libredox", 601 | "windows-sys 0.60.2", 602 | ] 603 | 604 | [[package]] 605 | name = "flate2" 606 | version = "1.0.34" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" 609 | dependencies = [ 610 | "crc32fast", 611 | "miniz_oxide", 612 | ] 613 | 614 | [[package]] 615 | name = "foldhash" 616 | version = "0.1.5" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" 619 | 620 | [[package]] 621 | name = "form_urlencoded" 622 | version = "1.0.1" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 625 | dependencies = [ 626 | "matches", 627 | "percent-encoding", 628 | ] 629 | 630 | [[package]] 631 | name = "getrandom" 632 | version = "0.1.16" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 635 | dependencies = [ 636 | "cfg-if", 637 | "libc", 638 | "wasi 0.9.0+wasi-snapshot-preview1", 639 | ] 640 | 641 | [[package]] 642 | name = "getrandom" 643 | version = "0.2.4" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" 646 | dependencies = [ 647 | "cfg-if", 648 | "libc", 649 | "wasi 0.10.0+wasi-snapshot-preview1", 650 | ] 651 | 652 | [[package]] 653 | name = "glob" 654 | version = "0.3.2" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 657 | 658 | [[package]] 659 | name = "hashbrown" 660 | version = "0.15.5" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" 663 | dependencies = [ 664 | "foldhash", 665 | ] 666 | 667 | [[package]] 668 | name = "hashlink" 669 | version = "0.10.0" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" 672 | dependencies = [ 673 | "hashbrown", 674 | ] 675 | 676 | [[package]] 677 | name = "heck" 678 | version = "0.5.0" 679 | source = "registry+https://github.com/rust-lang/crates.io-index" 680 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 681 | 682 | [[package]] 683 | name = "hermit-abi" 684 | version = "0.3.2" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" 687 | 688 | [[package]] 689 | name = "hhmmss" 690 | version = "0.1.0" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "11a3a7d0916cb01ef108a66108640419767991ea31d11a1c851bed37686a6062" 693 | dependencies = [ 694 | "chrono", 695 | "time", 696 | ] 697 | 698 | [[package]] 699 | name = "home" 700 | version = "0.5.11" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" 703 | dependencies = [ 704 | "windows-sys 0.59.0", 705 | ] 706 | 707 | [[package]] 708 | name = "iana-time-zone" 709 | version = "0.1.61" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" 712 | dependencies = [ 713 | "android_system_properties", 714 | "core-foundation-sys", 715 | "iana-time-zone-haiku", 716 | "js-sys", 717 | "wasm-bindgen", 718 | "windows-core", 719 | ] 720 | 721 | [[package]] 722 | name = "iana-time-zone-haiku" 723 | version = "0.1.2" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 726 | dependencies = [ 727 | "cc", 728 | ] 729 | 730 | [[package]] 731 | name = "idna" 732 | version = "0.2.3" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 735 | dependencies = [ 736 | "matches", 737 | "unicode-bidi", 738 | "unicode-normalization", 739 | ] 740 | 741 | [[package]] 742 | name = "if_chain" 743 | version = "1.0.2" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" 746 | 747 | [[package]] 748 | name = "indexmap" 749 | version = "2.11.1" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921" 752 | dependencies = [ 753 | "equivalent", 754 | "hashbrown", 755 | ] 756 | 757 | [[package]] 758 | name = "indicatif" 759 | version = "0.16.2" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" 762 | dependencies = [ 763 | "console", 764 | "lazy_static", 765 | "number_prefix", 766 | "regex", 767 | ] 768 | 769 | [[package]] 770 | name = "is_terminal_polyfill" 771 | version = "1.70.1" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 774 | 775 | [[package]] 776 | name = "itertools" 777 | version = "0.13.0" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 780 | dependencies = [ 781 | "either", 782 | ] 783 | 784 | [[package]] 785 | name = "itoa" 786 | version = "1.0.14" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" 789 | 790 | [[package]] 791 | name = "jiff" 792 | version = "0.2.15" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" 795 | dependencies = [ 796 | "jiff-static", 797 | "log", 798 | "portable-atomic", 799 | "portable-atomic-util", 800 | "serde", 801 | ] 802 | 803 | [[package]] 804 | name = "jiff-static" 805 | version = "0.2.15" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" 808 | dependencies = [ 809 | "proc-macro2", 810 | "quote", 811 | "syn 2.0.99", 812 | ] 813 | 814 | [[package]] 815 | name = "jobserver" 816 | version = "0.1.32" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" 819 | dependencies = [ 820 | "libc", 821 | ] 822 | 823 | [[package]] 824 | name = "js-sys" 825 | version = "0.3.77" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 828 | dependencies = [ 829 | "once_cell", 830 | "wasm-bindgen", 831 | ] 832 | 833 | [[package]] 834 | name = "lazy_static" 835 | version = "1.4.0" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 838 | 839 | [[package]] 840 | name = "lazycell" 841 | version = "1.3.0" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 844 | 845 | [[package]] 846 | name = "libc" 847 | version = "0.2.172" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 850 | 851 | [[package]] 852 | name = "libloading" 853 | version = "0.8.6" 854 | source = "registry+https://github.com/rust-lang/crates.io-index" 855 | checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" 856 | dependencies = [ 857 | "cfg-if", 858 | "windows-targets 0.52.6", 859 | ] 860 | 861 | [[package]] 862 | name = "libm" 863 | version = "0.2.11" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" 866 | 867 | [[package]] 868 | name = "libredox" 869 | version = "0.1.10" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" 872 | dependencies = [ 873 | "bitflags 2.9.0", 874 | "libc", 875 | "redox_syscall 0.5.17", 876 | ] 877 | 878 | [[package]] 879 | name = "libsqlite3-sys" 880 | version = "0.32.0" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "fbb8270bb4060bd76c6e96f20c52d80620f1d82a3470885694e41e0f81ef6fe7" 883 | dependencies = [ 884 | "cc", 885 | "pkg-config", 886 | "vcpkg", 887 | ] 888 | 889 | [[package]] 890 | name = "linux-raw-sys" 891 | version = "0.4.15" 892 | source = "registry+https://github.com/rust-lang/crates.io-index" 893 | checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" 894 | 895 | [[package]] 896 | name = "lofty" 897 | version = "0.22.2" 898 | source = "registry+https://github.com/rust-lang/crates.io-index" 899 | checksum = "781de624f162b1a8cbfbd577103ee9b8e5f62854b053ff48f4e31e68a0a7df6f" 900 | dependencies = [ 901 | "byteorder", 902 | "data-encoding", 903 | "flate2", 904 | "lofty_attr", 905 | "log", 906 | "ogg_pager", 907 | "paste", 908 | ] 909 | 910 | [[package]] 911 | name = "lofty_attr" 912 | version = "0.11.1" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | checksum = "ed9983e64b2358522f745c1251924e3ab7252d55637e80f6a0a3de642d6a9efc" 915 | dependencies = [ 916 | "proc-macro2", 917 | "quote", 918 | "syn 2.0.99", 919 | ] 920 | 921 | [[package]] 922 | name = "log" 923 | version = "0.4.22" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 926 | 927 | [[package]] 928 | name = "matches" 929 | version = "0.1.9" 930 | source = "registry+https://github.com/rust-lang/crates.io-index" 931 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" 932 | 933 | [[package]] 934 | name = "matrixmultiply" 935 | version = "0.3.2" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" 938 | dependencies = [ 939 | "rawpointer", 940 | ] 941 | 942 | [[package]] 943 | name = "memchr" 944 | version = "2.4.1" 945 | source = "registry+https://github.com/rust-lang/crates.io-index" 946 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 947 | 948 | [[package]] 949 | name = "memoffset" 950 | version = "0.6.5" 951 | source = "registry+https://github.com/rust-lang/crates.io-index" 952 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 953 | dependencies = [ 954 | "autocfg", 955 | ] 956 | 957 | [[package]] 958 | name = "minimal-lexical" 959 | version = "0.2.1" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 962 | 963 | [[package]] 964 | name = "miniz_oxide" 965 | version = "0.8.0" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" 968 | dependencies = [ 969 | "adler2", 970 | ] 971 | 972 | [[package]] 973 | name = "ndarray" 974 | version = "0.16.1" 975 | source = "registry+https://github.com/rust-lang/crates.io-index" 976 | checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841" 977 | dependencies = [ 978 | "matrixmultiply", 979 | "num-complex", 980 | "num-integer", 981 | "num-traits", 982 | "portable-atomic", 983 | "portable-atomic-util", 984 | "rawpointer", 985 | "rayon", 986 | ] 987 | 988 | [[package]] 989 | name = "ndarray-stats" 990 | version = "0.6.0" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "17ebbe97acce52d06aebed4cd4a87c0941f4b2519b59b82b4feb5bd0ce003dfd" 993 | dependencies = [ 994 | "indexmap", 995 | "itertools", 996 | "ndarray", 997 | "noisy_float", 998 | "num-integer", 999 | "num-traits", 1000 | "rand", 1001 | ] 1002 | 1003 | [[package]] 1004 | name = "nix" 1005 | version = "0.30.1" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" 1008 | dependencies = [ 1009 | "bitflags 2.9.0", 1010 | "cfg-if", 1011 | "cfg_aliases", 1012 | "libc", 1013 | ] 1014 | 1015 | [[package]] 1016 | name = "noisy_float" 1017 | version = "0.2.0" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "978fe6e6ebc0bf53de533cd456ca2d9de13de13856eda1518a285d7705a213af" 1020 | dependencies = [ 1021 | "num-traits", 1022 | ] 1023 | 1024 | [[package]] 1025 | name = "nom" 1026 | version = "7.1.3" 1027 | source = "registry+https://github.com/rust-lang/crates.io-index" 1028 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1029 | dependencies = [ 1030 | "memchr", 1031 | "minimal-lexical", 1032 | ] 1033 | 1034 | [[package]] 1035 | name = "num-complex" 1036 | version = "0.4.0" 1037 | source = "registry+https://github.com/rust-lang/crates.io-index" 1038 | checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" 1039 | dependencies = [ 1040 | "num-traits", 1041 | ] 1042 | 1043 | [[package]] 1044 | name = "num-integer" 1045 | version = "0.1.46" 1046 | source = "registry+https://github.com/rust-lang/crates.io-index" 1047 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1048 | dependencies = [ 1049 | "num-traits", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "num-traits" 1054 | version = "0.2.14" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 1057 | dependencies = [ 1058 | "autocfg", 1059 | "libm", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "num_cpus" 1064 | version = "1.16.0" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1067 | dependencies = [ 1068 | "hermit-abi", 1069 | "libc", 1070 | ] 1071 | 1072 | [[package]] 1073 | name = "number_prefix" 1074 | version = "0.4.0" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" 1077 | 1078 | [[package]] 1079 | name = "ogg_pager" 1080 | version = "0.7.0" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "e034c10fb5c1c012c1b327b85df89fb0ef98ae66ec28af30f0d1eed804a40c19" 1083 | dependencies = [ 1084 | "byteorder", 1085 | ] 1086 | 1087 | [[package]] 1088 | name = "once_cell" 1089 | version = "1.18.0" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 1092 | 1093 | [[package]] 1094 | name = "once_cell_polyfill" 1095 | version = "1.70.1" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" 1098 | 1099 | [[package]] 1100 | name = "paste" 1101 | version = "1.0.15" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1104 | 1105 | [[package]] 1106 | name = "peeking_take_while" 1107 | version = "0.1.2" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 1110 | 1111 | [[package]] 1112 | name = "percent-encoding" 1113 | version = "2.1.0" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1116 | 1117 | [[package]] 1118 | name = "pkg-config" 1119 | version = "0.3.24" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" 1122 | 1123 | [[package]] 1124 | name = "portable-atomic" 1125 | version = "1.11.1" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" 1128 | 1129 | [[package]] 1130 | name = "portable-atomic-util" 1131 | version = "0.2.4" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" 1134 | dependencies = [ 1135 | "portable-atomic", 1136 | ] 1137 | 1138 | [[package]] 1139 | name = "ppv-lite86" 1140 | version = "0.2.16" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 1143 | 1144 | [[package]] 1145 | name = "primal-check" 1146 | version = "0.3.3" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "9df7f93fd637f083201473dab4fee2db4c429d32e55e3299980ab3957ab916a0" 1149 | dependencies = [ 1150 | "num-integer", 1151 | ] 1152 | 1153 | [[package]] 1154 | name = "proc-macro-hack" 1155 | version = "0.5.20+deprecated" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" 1158 | 1159 | [[package]] 1160 | name = "proc-macro2" 1161 | version = "1.0.94" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" 1164 | dependencies = [ 1165 | "unicode-ident", 1166 | ] 1167 | 1168 | [[package]] 1169 | name = "quote" 1170 | version = "1.0.39" 1171 | source = "registry+https://github.com/rust-lang/crates.io-index" 1172 | checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" 1173 | dependencies = [ 1174 | "proc-macro2", 1175 | ] 1176 | 1177 | [[package]] 1178 | name = "rand" 1179 | version = "0.8.5" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1182 | dependencies = [ 1183 | "libc", 1184 | "rand_chacha", 1185 | "rand_core", 1186 | ] 1187 | 1188 | [[package]] 1189 | name = "rand_chacha" 1190 | version = "0.3.1" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1193 | dependencies = [ 1194 | "ppv-lite86", 1195 | "rand_core", 1196 | ] 1197 | 1198 | [[package]] 1199 | name = "rand_core" 1200 | version = "0.6.3" 1201 | source = "registry+https://github.com/rust-lang/crates.io-index" 1202 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 1203 | dependencies = [ 1204 | "getrandom 0.2.4", 1205 | ] 1206 | 1207 | [[package]] 1208 | name = "rand_distr" 1209 | version = "0.4.3" 1210 | source = "registry+https://github.com/rust-lang/crates.io-index" 1211 | checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" 1212 | dependencies = [ 1213 | "num-traits", 1214 | "rand", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "rawpointer" 1219 | version = "0.2.1" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" 1222 | 1223 | [[package]] 1224 | name = "rayon" 1225 | version = "1.11.0" 1226 | source = "registry+https://github.com/rust-lang/crates.io-index" 1227 | checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" 1228 | dependencies = [ 1229 | "either", 1230 | "rayon-core", 1231 | ] 1232 | 1233 | [[package]] 1234 | name = "rayon-core" 1235 | version = "1.13.0" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" 1238 | dependencies = [ 1239 | "crossbeam-deque", 1240 | "crossbeam-utils", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "rcue" 1245 | version = "0.1.3" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "fca1481d62f18158646de2ec552dd63f8bdc5be6448389b192ba95c939df997e" 1248 | 1249 | [[package]] 1250 | name = "realfft" 1251 | version = "3.3.0" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | checksum = "953d9f7e5cdd80963547b456251296efc2626ed4e3cbf36c869d9564e0220571" 1254 | dependencies = [ 1255 | "rustfft", 1256 | ] 1257 | 1258 | [[package]] 1259 | name = "redox_syscall" 1260 | version = "0.1.57" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" 1263 | 1264 | [[package]] 1265 | name = "redox_syscall" 1266 | version = "0.5.17" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" 1269 | dependencies = [ 1270 | "bitflags 2.9.0", 1271 | ] 1272 | 1273 | [[package]] 1274 | name = "redox_users" 1275 | version = "0.3.5" 1276 | source = "registry+https://github.com/rust-lang/crates.io-index" 1277 | checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" 1278 | dependencies = [ 1279 | "getrandom 0.1.16", 1280 | "redox_syscall 0.1.57", 1281 | "rust-argon2", 1282 | ] 1283 | 1284 | [[package]] 1285 | name = "regex" 1286 | version = "1.5.4" 1287 | source = "registry+https://github.com/rust-lang/crates.io-index" 1288 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 1289 | dependencies = [ 1290 | "aho-corasick", 1291 | "memchr", 1292 | "regex-syntax", 1293 | ] 1294 | 1295 | [[package]] 1296 | name = "regex-syntax" 1297 | version = "0.6.25" 1298 | source = "registry+https://github.com/rust-lang/crates.io-index" 1299 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 1300 | 1301 | [[package]] 1302 | name = "ring" 1303 | version = "0.16.20" 1304 | source = "registry+https://github.com/rust-lang/crates.io-index" 1305 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1306 | dependencies = [ 1307 | "cc", 1308 | "libc", 1309 | "once_cell", 1310 | "spin", 1311 | "untrusted", 1312 | "web-sys", 1313 | "winapi", 1314 | ] 1315 | 1316 | [[package]] 1317 | name = "rubato" 1318 | version = "0.16.1" 1319 | source = "registry+https://github.com/rust-lang/crates.io-index" 1320 | checksum = "cdd96992d7e24b3d7f35fdfe02af037a356ac90d41b466945cf3333525a86eea" 1321 | dependencies = [ 1322 | "num-complex", 1323 | "num-integer", 1324 | "num-traits", 1325 | "realfft", 1326 | ] 1327 | 1328 | [[package]] 1329 | name = "rusqlite" 1330 | version = "0.34.0" 1331 | source = "registry+https://github.com/rust-lang/crates.io-index" 1332 | checksum = "37e34486da88d8e051c7c0e23c3f15fd806ea8546260aa2fec247e97242ec143" 1333 | dependencies = [ 1334 | "bitflags 2.9.0", 1335 | "fallible-iterator", 1336 | "fallible-streaming-iterator", 1337 | "hashlink", 1338 | "libsqlite3-sys", 1339 | "smallvec", 1340 | ] 1341 | 1342 | [[package]] 1343 | name = "rust-argon2" 1344 | version = "0.8.3" 1345 | source = "registry+https://github.com/rust-lang/crates.io-index" 1346 | checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" 1347 | dependencies = [ 1348 | "base64", 1349 | "blake2b_simd", 1350 | "constant_time_eq", 1351 | "crossbeam-utils", 1352 | ] 1353 | 1354 | [[package]] 1355 | name = "rustc-hash" 1356 | version = "1.1.0" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1359 | 1360 | [[package]] 1361 | name = "rustc_version" 1362 | version = "0.2.3" 1363 | source = "registry+https://github.com/rust-lang/crates.io-index" 1364 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1365 | dependencies = [ 1366 | "semver", 1367 | ] 1368 | 1369 | [[package]] 1370 | name = "rustfft" 1371 | version = "6.1.0" 1372 | source = "registry+https://github.com/rust-lang/crates.io-index" 1373 | checksum = "e17d4f6cbdb180c9f4b2a26bbf01c4e647f1e1dea22fe8eb9db54198b32f9434" 1374 | dependencies = [ 1375 | "num-complex", 1376 | "num-integer", 1377 | "num-traits", 1378 | "primal-check", 1379 | "strength_reduce", 1380 | "transpose", 1381 | "version_check", 1382 | ] 1383 | 1384 | [[package]] 1385 | name = "rustix" 1386 | version = "0.38.44" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" 1389 | dependencies = [ 1390 | "bitflags 2.9.0", 1391 | "errno", 1392 | "libc", 1393 | "linux-raw-sys", 1394 | "windows-sys 0.59.0", 1395 | ] 1396 | 1397 | [[package]] 1398 | name = "rustls" 1399 | version = "0.20.4" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" 1402 | dependencies = [ 1403 | "log", 1404 | "ring", 1405 | "sct", 1406 | "webpki", 1407 | ] 1408 | 1409 | [[package]] 1410 | name = "rustversion" 1411 | version = "1.0.14" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" 1414 | 1415 | [[package]] 1416 | name = "ryu" 1417 | version = "1.0.19" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" 1420 | 1421 | [[package]] 1422 | name = "scopeguard" 1423 | version = "1.1.0" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1426 | 1427 | [[package]] 1428 | name = "sct" 1429 | version = "0.7.0" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1432 | dependencies = [ 1433 | "ring", 1434 | "untrusted", 1435 | ] 1436 | 1437 | [[package]] 1438 | name = "semver" 1439 | version = "0.9.0" 1440 | source = "registry+https://github.com/rust-lang/crates.io-index" 1441 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1442 | dependencies = [ 1443 | "semver-parser", 1444 | ] 1445 | 1446 | [[package]] 1447 | name = "semver-parser" 1448 | version = "0.7.0" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1451 | 1452 | [[package]] 1453 | name = "serde" 1454 | version = "1.0.225" 1455 | source = "registry+https://github.com/rust-lang/crates.io-index" 1456 | checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" 1457 | dependencies = [ 1458 | "serde_core", 1459 | ] 1460 | 1461 | [[package]] 1462 | name = "serde_core" 1463 | version = "1.0.225" 1464 | source = "registry+https://github.com/rust-lang/crates.io-index" 1465 | checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" 1466 | dependencies = [ 1467 | "serde_derive", 1468 | ] 1469 | 1470 | [[package]] 1471 | name = "serde_derive" 1472 | version = "1.0.225" 1473 | source = "registry+https://github.com/rust-lang/crates.io-index" 1474 | checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" 1475 | dependencies = [ 1476 | "proc-macro2", 1477 | "quote", 1478 | "syn 2.0.99", 1479 | ] 1480 | 1481 | [[package]] 1482 | name = "serde_json" 1483 | version = "1.0.145" 1484 | source = "registry+https://github.com/rust-lang/crates.io-index" 1485 | checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" 1486 | dependencies = [ 1487 | "itoa", 1488 | "memchr", 1489 | "ryu", 1490 | "serde", 1491 | "serde_core", 1492 | ] 1493 | 1494 | [[package]] 1495 | name = "sha1" 1496 | version = "0.6.1" 1497 | source = "registry+https://github.com/rust-lang/crates.io-index" 1498 | checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" 1499 | dependencies = [ 1500 | "sha1_smol", 1501 | ] 1502 | 1503 | [[package]] 1504 | name = "sha1_smol" 1505 | version = "1.0.1" 1506 | source = "registry+https://github.com/rust-lang/crates.io-index" 1507 | checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" 1508 | 1509 | [[package]] 1510 | name = "shlex" 1511 | version = "1.3.0" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1514 | 1515 | [[package]] 1516 | name = "smallvec" 1517 | version = "1.8.0" 1518 | source = "registry+https://github.com/rust-lang/crates.io-index" 1519 | checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" 1520 | 1521 | [[package]] 1522 | name = "spin" 1523 | version = "0.5.2" 1524 | source = "registry+https://github.com/rust-lang/crates.io-index" 1525 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1526 | 1527 | [[package]] 1528 | name = "standback" 1529 | version = "0.2.17" 1530 | source = "registry+https://github.com/rust-lang/crates.io-index" 1531 | checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" 1532 | dependencies = [ 1533 | "version_check", 1534 | ] 1535 | 1536 | [[package]] 1537 | name = "stdweb" 1538 | version = "0.4.20" 1539 | source = "registry+https://github.com/rust-lang/crates.io-index" 1540 | checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" 1541 | dependencies = [ 1542 | "discard", 1543 | "rustc_version", 1544 | "stdweb-derive", 1545 | "stdweb-internal-macros", 1546 | "stdweb-internal-runtime", 1547 | "wasm-bindgen", 1548 | ] 1549 | 1550 | [[package]] 1551 | name = "stdweb-derive" 1552 | version = "0.5.3" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" 1555 | dependencies = [ 1556 | "proc-macro2", 1557 | "quote", 1558 | "serde", 1559 | "serde_derive", 1560 | "syn 1.0.99", 1561 | ] 1562 | 1563 | [[package]] 1564 | name = "stdweb-internal-macros" 1565 | version = "0.2.9" 1566 | source = "registry+https://github.com/rust-lang/crates.io-index" 1567 | checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" 1568 | dependencies = [ 1569 | "base-x", 1570 | "proc-macro2", 1571 | "quote", 1572 | "serde", 1573 | "serde_derive", 1574 | "serde_json", 1575 | "sha1", 1576 | "syn 1.0.99", 1577 | ] 1578 | 1579 | [[package]] 1580 | name = "stdweb-internal-runtime" 1581 | version = "0.1.5" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" 1584 | 1585 | [[package]] 1586 | name = "strength_reduce" 1587 | version = "0.2.4" 1588 | source = "registry+https://github.com/rust-lang/crates.io-index" 1589 | checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" 1590 | 1591 | [[package]] 1592 | name = "strum" 1593 | version = "0.27.2" 1594 | source = "registry+https://github.com/rust-lang/crates.io-index" 1595 | checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" 1596 | 1597 | [[package]] 1598 | name = "strum_macros" 1599 | version = "0.27.2" 1600 | source = "registry+https://github.com/rust-lang/crates.io-index" 1601 | checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" 1602 | dependencies = [ 1603 | "heck", 1604 | "proc-macro2", 1605 | "quote", 1606 | "syn 2.0.99", 1607 | ] 1608 | 1609 | [[package]] 1610 | name = "substring" 1611 | version = "1.4.5" 1612 | source = "registry+https://github.com/rust-lang/crates.io-index" 1613 | checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" 1614 | dependencies = [ 1615 | "autocfg", 1616 | ] 1617 | 1618 | [[package]] 1619 | name = "symphonia" 1620 | version = "0.5.4" 1621 | source = "registry+https://github.com/rust-lang/crates.io-index" 1622 | checksum = "815c942ae7ee74737bb00f965fa5b5a2ac2ce7b6c01c0cc169bbeaf7abd5f5a9" 1623 | dependencies = [ 1624 | "lazy_static", 1625 | "symphonia-bundle-flac", 1626 | "symphonia-bundle-mp3", 1627 | "symphonia-codec-aac", 1628 | "symphonia-codec-adpcm", 1629 | "symphonia-codec-alac", 1630 | "symphonia-codec-pcm", 1631 | "symphonia-codec-vorbis", 1632 | "symphonia-core", 1633 | "symphonia-format-isomp4", 1634 | "symphonia-format-ogg", 1635 | "symphonia-format-riff", 1636 | "symphonia-metadata", 1637 | ] 1638 | 1639 | [[package]] 1640 | name = "symphonia-bundle-flac" 1641 | version = "0.5.4" 1642 | source = "registry+https://github.com/rust-lang/crates.io-index" 1643 | checksum = "72e34f34298a7308d4397a6c7fbf5b84c5d491231ce3dd379707ba673ab3bd97" 1644 | dependencies = [ 1645 | "log", 1646 | "symphonia-core", 1647 | "symphonia-metadata", 1648 | "symphonia-utils-xiph", 1649 | ] 1650 | 1651 | [[package]] 1652 | name = "symphonia-bundle-mp3" 1653 | version = "0.5.4" 1654 | source = "registry+https://github.com/rust-lang/crates.io-index" 1655 | checksum = "c01c2aae70f0f1fb096b6f0ff112a930b1fb3626178fba3ae68b09dce71706d4" 1656 | dependencies = [ 1657 | "lazy_static", 1658 | "log", 1659 | "symphonia-core", 1660 | "symphonia-metadata", 1661 | ] 1662 | 1663 | [[package]] 1664 | name = "symphonia-codec-aac" 1665 | version = "0.5.4" 1666 | source = "registry+https://github.com/rust-lang/crates.io-index" 1667 | checksum = "cdbf25b545ad0d3ee3e891ea643ad115aff4ca92f6aec472086b957a58522f70" 1668 | dependencies = [ 1669 | "lazy_static", 1670 | "log", 1671 | "symphonia-core", 1672 | ] 1673 | 1674 | [[package]] 1675 | name = "symphonia-codec-adpcm" 1676 | version = "0.5.4" 1677 | source = "registry+https://github.com/rust-lang/crates.io-index" 1678 | checksum = "c94e1feac3327cd616e973d5be69ad36b3945f16b06f19c6773fc3ac0b426a0f" 1679 | dependencies = [ 1680 | "log", 1681 | "symphonia-core", 1682 | ] 1683 | 1684 | [[package]] 1685 | name = "symphonia-codec-alac" 1686 | version = "0.5.4" 1687 | source = "registry+https://github.com/rust-lang/crates.io-index" 1688 | checksum = "2d8a6666649a08412906476a8b0efd9b9733e241180189e9f92b09c08d0e38f3" 1689 | dependencies = [ 1690 | "log", 1691 | "symphonia-core", 1692 | ] 1693 | 1694 | [[package]] 1695 | name = "symphonia-codec-pcm" 1696 | version = "0.5.4" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "f395a67057c2ebc5e84d7bb1be71cce1a7ba99f64e0f0f0e303a03f79116f89b" 1699 | dependencies = [ 1700 | "log", 1701 | "symphonia-core", 1702 | ] 1703 | 1704 | [[package]] 1705 | name = "symphonia-codec-vorbis" 1706 | version = "0.5.4" 1707 | source = "registry+https://github.com/rust-lang/crates.io-index" 1708 | checksum = "5a98765fb46a0a6732b007f7e2870c2129b6f78d87db7987e6533c8f164a9f30" 1709 | dependencies = [ 1710 | "log", 1711 | "symphonia-core", 1712 | "symphonia-utils-xiph", 1713 | ] 1714 | 1715 | [[package]] 1716 | name = "symphonia-core" 1717 | version = "0.5.4" 1718 | source = "registry+https://github.com/rust-lang/crates.io-index" 1719 | checksum = "798306779e3dc7d5231bd5691f5a813496dc79d3f56bf82e25789f2094e022c3" 1720 | dependencies = [ 1721 | "arrayvec 0.7.6", 1722 | "bitflags 1.3.2", 1723 | "bytemuck", 1724 | "lazy_static", 1725 | "log", 1726 | "rustfft", 1727 | ] 1728 | 1729 | [[package]] 1730 | name = "symphonia-format-isomp4" 1731 | version = "0.5.4" 1732 | source = "registry+https://github.com/rust-lang/crates.io-index" 1733 | checksum = "abfdf178d697e50ce1e5d9b982ba1b94c47218e03ec35022d9f0e071a16dc844" 1734 | dependencies = [ 1735 | "encoding_rs", 1736 | "log", 1737 | "symphonia-core", 1738 | "symphonia-metadata", 1739 | "symphonia-utils-xiph", 1740 | ] 1741 | 1742 | [[package]] 1743 | name = "symphonia-format-ogg" 1744 | version = "0.5.4" 1745 | source = "registry+https://github.com/rust-lang/crates.io-index" 1746 | checksum = "ada3505789516bcf00fc1157c67729eded428b455c27ca370e41f4d785bfa931" 1747 | dependencies = [ 1748 | "log", 1749 | "symphonia-core", 1750 | "symphonia-metadata", 1751 | "symphonia-utils-xiph", 1752 | ] 1753 | 1754 | [[package]] 1755 | name = "symphonia-format-riff" 1756 | version = "0.5.4" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | checksum = "05f7be232f962f937f4b7115cbe62c330929345434c834359425e043bfd15f50" 1759 | dependencies = [ 1760 | "extended", 1761 | "log", 1762 | "symphonia-core", 1763 | "symphonia-metadata", 1764 | ] 1765 | 1766 | [[package]] 1767 | name = "symphonia-metadata" 1768 | version = "0.5.4" 1769 | source = "registry+https://github.com/rust-lang/crates.io-index" 1770 | checksum = "bc622b9841a10089c5b18e99eb904f4341615d5aa55bbf4eedde1be721a4023c" 1771 | dependencies = [ 1772 | "encoding_rs", 1773 | "lazy_static", 1774 | "log", 1775 | "symphonia-core", 1776 | ] 1777 | 1778 | [[package]] 1779 | name = "symphonia-utils-xiph" 1780 | version = "0.5.4" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "484472580fa49991afda5f6550ece662237b00c6f562c7d9638d1b086ed010fe" 1783 | dependencies = [ 1784 | "symphonia-core", 1785 | "symphonia-metadata", 1786 | ] 1787 | 1788 | [[package]] 1789 | name = "syn" 1790 | version = "1.0.99" 1791 | source = "registry+https://github.com/rust-lang/crates.io-index" 1792 | checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" 1793 | dependencies = [ 1794 | "proc-macro2", 1795 | "quote", 1796 | "unicode-ident", 1797 | ] 1798 | 1799 | [[package]] 1800 | name = "syn" 1801 | version = "2.0.99" 1802 | source = "registry+https://github.com/rust-lang/crates.io-index" 1803 | checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" 1804 | dependencies = [ 1805 | "proc-macro2", 1806 | "quote", 1807 | "unicode-ident", 1808 | ] 1809 | 1810 | [[package]] 1811 | name = "terminal_size" 1812 | version = "0.1.17" 1813 | source = "registry+https://github.com/rust-lang/crates.io-index" 1814 | checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" 1815 | dependencies = [ 1816 | "libc", 1817 | "winapi", 1818 | ] 1819 | 1820 | [[package]] 1821 | name = "thiserror" 1822 | version = "2.0.16" 1823 | source = "registry+https://github.com/rust-lang/crates.io-index" 1824 | checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" 1825 | dependencies = [ 1826 | "thiserror-impl", 1827 | ] 1828 | 1829 | [[package]] 1830 | name = "thiserror-impl" 1831 | version = "2.0.16" 1832 | source = "registry+https://github.com/rust-lang/crates.io-index" 1833 | checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" 1834 | dependencies = [ 1835 | "proc-macro2", 1836 | "quote", 1837 | "syn 2.0.99", 1838 | ] 1839 | 1840 | [[package]] 1841 | name = "time" 1842 | version = "0.2.27" 1843 | source = "registry+https://github.com/rust-lang/crates.io-index" 1844 | checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" 1845 | dependencies = [ 1846 | "const_fn", 1847 | "libc", 1848 | "standback", 1849 | "stdweb", 1850 | "time-macros", 1851 | "version_check", 1852 | "winapi", 1853 | ] 1854 | 1855 | [[package]] 1856 | name = "time-macros" 1857 | version = "0.1.1" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" 1860 | dependencies = [ 1861 | "proc-macro-hack", 1862 | "time-macros-impl", 1863 | ] 1864 | 1865 | [[package]] 1866 | name = "time-macros-impl" 1867 | version = "0.1.2" 1868 | source = "registry+https://github.com/rust-lang/crates.io-index" 1869 | checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" 1870 | dependencies = [ 1871 | "proc-macro-hack", 1872 | "proc-macro2", 1873 | "quote", 1874 | "standback", 1875 | "syn 1.0.99", 1876 | ] 1877 | 1878 | [[package]] 1879 | name = "tinyvec" 1880 | version = "1.5.1" 1881 | source = "registry+https://github.com/rust-lang/crates.io-index" 1882 | checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" 1883 | dependencies = [ 1884 | "tinyvec_macros", 1885 | ] 1886 | 1887 | [[package]] 1888 | name = "tinyvec_macros" 1889 | version = "0.1.0" 1890 | source = "registry+https://github.com/rust-lang/crates.io-index" 1891 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1892 | 1893 | [[package]] 1894 | name = "transpose" 1895 | version = "0.2.1" 1896 | source = "registry+https://github.com/rust-lang/crates.io-index" 1897 | checksum = "95f9c900aa98b6ea43aee227fd680550cdec726526aab8ac801549eadb25e39f" 1898 | dependencies = [ 1899 | "num-integer", 1900 | "strength_reduce", 1901 | ] 1902 | 1903 | [[package]] 1904 | name = "unicode-bidi" 1905 | version = "0.3.7" 1906 | source = "registry+https://github.com/rust-lang/crates.io-index" 1907 | checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" 1908 | 1909 | [[package]] 1910 | name = "unicode-ident" 1911 | version = "1.0.18" 1912 | source = "registry+https://github.com/rust-lang/crates.io-index" 1913 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 1914 | 1915 | [[package]] 1916 | name = "unicode-normalization" 1917 | version = "0.1.19" 1918 | source = "registry+https://github.com/rust-lang/crates.io-index" 1919 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" 1920 | dependencies = [ 1921 | "tinyvec", 1922 | ] 1923 | 1924 | [[package]] 1925 | name = "untrusted" 1926 | version = "0.7.1" 1927 | source = "registry+https://github.com/rust-lang/crates.io-index" 1928 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1929 | 1930 | [[package]] 1931 | name = "ureq" 1932 | version = "2.4.0" 1933 | source = "registry+https://github.com/rust-lang/crates.io-index" 1934 | checksum = "9399fa2f927a3d327187cbd201480cee55bee6ac5d3c77dd27f0c6814cff16d5" 1935 | dependencies = [ 1936 | "base64", 1937 | "chunked_transfer", 1938 | "flate2", 1939 | "log", 1940 | "once_cell", 1941 | "rustls", 1942 | "url", 1943 | "webpki", 1944 | "webpki-roots", 1945 | ] 1946 | 1947 | [[package]] 1948 | name = "url" 1949 | version = "2.2.2" 1950 | source = "registry+https://github.com/rust-lang/crates.io-index" 1951 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" 1952 | dependencies = [ 1953 | "form_urlencoded", 1954 | "idna", 1955 | "matches", 1956 | "percent-encoding", 1957 | ] 1958 | 1959 | [[package]] 1960 | name = "utf8parse" 1961 | version = "0.2.2" 1962 | source = "registry+https://github.com/rust-lang/crates.io-index" 1963 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 1964 | 1965 | [[package]] 1966 | name = "vcpkg" 1967 | version = "0.2.15" 1968 | source = "registry+https://github.com/rust-lang/crates.io-index" 1969 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1970 | 1971 | [[package]] 1972 | name = "version_check" 1973 | version = "0.9.4" 1974 | source = "registry+https://github.com/rust-lang/crates.io-index" 1975 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1976 | 1977 | [[package]] 1978 | name = "wasi" 1979 | version = "0.9.0+wasi-snapshot-preview1" 1980 | source = "registry+https://github.com/rust-lang/crates.io-index" 1981 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1982 | 1983 | [[package]] 1984 | name = "wasi" 1985 | version = "0.10.0+wasi-snapshot-preview1" 1986 | source = "registry+https://github.com/rust-lang/crates.io-index" 1987 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1988 | 1989 | [[package]] 1990 | name = "wasm-bindgen" 1991 | version = "0.2.100" 1992 | source = "registry+https://github.com/rust-lang/crates.io-index" 1993 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 1994 | dependencies = [ 1995 | "cfg-if", 1996 | "once_cell", 1997 | "rustversion", 1998 | "wasm-bindgen-macro", 1999 | ] 2000 | 2001 | [[package]] 2002 | name = "wasm-bindgen-backend" 2003 | version = "0.2.100" 2004 | source = "registry+https://github.com/rust-lang/crates.io-index" 2005 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 2006 | dependencies = [ 2007 | "bumpalo", 2008 | "log", 2009 | "proc-macro2", 2010 | "quote", 2011 | "syn 2.0.99", 2012 | "wasm-bindgen-shared", 2013 | ] 2014 | 2015 | [[package]] 2016 | name = "wasm-bindgen-macro" 2017 | version = "0.2.100" 2018 | source = "registry+https://github.com/rust-lang/crates.io-index" 2019 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 2020 | dependencies = [ 2021 | "quote", 2022 | "wasm-bindgen-macro-support", 2023 | ] 2024 | 2025 | [[package]] 2026 | name = "wasm-bindgen-macro-support" 2027 | version = "0.2.100" 2028 | source = "registry+https://github.com/rust-lang/crates.io-index" 2029 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 2030 | dependencies = [ 2031 | "proc-macro2", 2032 | "quote", 2033 | "syn 2.0.99", 2034 | "wasm-bindgen-backend", 2035 | "wasm-bindgen-shared", 2036 | ] 2037 | 2038 | [[package]] 2039 | name = "wasm-bindgen-shared" 2040 | version = "0.2.100" 2041 | source = "registry+https://github.com/rust-lang/crates.io-index" 2042 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 2043 | dependencies = [ 2044 | "unicode-ident", 2045 | ] 2046 | 2047 | [[package]] 2048 | name = "web-sys" 2049 | version = "0.3.56" 2050 | source = "registry+https://github.com/rust-lang/crates.io-index" 2051 | checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" 2052 | dependencies = [ 2053 | "js-sys", 2054 | "wasm-bindgen", 2055 | ] 2056 | 2057 | [[package]] 2058 | name = "webpki" 2059 | version = "0.22.0" 2060 | source = "registry+https://github.com/rust-lang/crates.io-index" 2061 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 2062 | dependencies = [ 2063 | "ring", 2064 | "untrusted", 2065 | ] 2066 | 2067 | [[package]] 2068 | name = "webpki-roots" 2069 | version = "0.22.2" 2070 | source = "registry+https://github.com/rust-lang/crates.io-index" 2071 | checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" 2072 | dependencies = [ 2073 | "webpki", 2074 | ] 2075 | 2076 | [[package]] 2077 | name = "which" 2078 | version = "4.4.2" 2079 | source = "registry+https://github.com/rust-lang/crates.io-index" 2080 | checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" 2081 | dependencies = [ 2082 | "either", 2083 | "home", 2084 | "once_cell", 2085 | "rustix", 2086 | ] 2087 | 2088 | [[package]] 2089 | name = "which" 2090 | version = "7.0.2" 2091 | source = "registry+https://github.com/rust-lang/crates.io-index" 2092 | checksum = "2774c861e1f072b3aadc02f8ba886c26ad6321567ecc294c935434cad06f1283" 2093 | dependencies = [ 2094 | "either", 2095 | "env_home", 2096 | "rustix", 2097 | "winsafe", 2098 | ] 2099 | 2100 | [[package]] 2101 | name = "winapi" 2102 | version = "0.3.9" 2103 | source = "registry+https://github.com/rust-lang/crates.io-index" 2104 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2105 | dependencies = [ 2106 | "winapi-i686-pc-windows-gnu", 2107 | "winapi-x86_64-pc-windows-gnu", 2108 | ] 2109 | 2110 | [[package]] 2111 | name = "winapi-i686-pc-windows-gnu" 2112 | version = "0.4.0" 2113 | source = "registry+https://github.com/rust-lang/crates.io-index" 2114 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2115 | 2116 | [[package]] 2117 | name = "winapi-x86_64-pc-windows-gnu" 2118 | version = "0.4.0" 2119 | source = "registry+https://github.com/rust-lang/crates.io-index" 2120 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2121 | 2122 | [[package]] 2123 | name = "windows-core" 2124 | version = "0.52.0" 2125 | source = "registry+https://github.com/rust-lang/crates.io-index" 2126 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 2127 | dependencies = [ 2128 | "windows-targets 0.52.6", 2129 | ] 2130 | 2131 | [[package]] 2132 | name = "windows-link" 2133 | version = "0.1.0" 2134 | source = "registry+https://github.com/rust-lang/crates.io-index" 2135 | checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" 2136 | 2137 | [[package]] 2138 | name = "windows-sys" 2139 | version = "0.59.0" 2140 | source = "registry+https://github.com/rust-lang/crates.io-index" 2141 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2142 | dependencies = [ 2143 | "windows-targets 0.52.6", 2144 | ] 2145 | 2146 | [[package]] 2147 | name = "windows-sys" 2148 | version = "0.60.2" 2149 | source = "registry+https://github.com/rust-lang/crates.io-index" 2150 | checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" 2151 | dependencies = [ 2152 | "windows-targets 0.53.2", 2153 | ] 2154 | 2155 | [[package]] 2156 | name = "windows-targets" 2157 | version = "0.52.6" 2158 | source = "registry+https://github.com/rust-lang/crates.io-index" 2159 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2160 | dependencies = [ 2161 | "windows_aarch64_gnullvm 0.52.6", 2162 | "windows_aarch64_msvc 0.52.6", 2163 | "windows_i686_gnu 0.52.6", 2164 | "windows_i686_gnullvm 0.52.6", 2165 | "windows_i686_msvc 0.52.6", 2166 | "windows_x86_64_gnu 0.52.6", 2167 | "windows_x86_64_gnullvm 0.52.6", 2168 | "windows_x86_64_msvc 0.52.6", 2169 | ] 2170 | 2171 | [[package]] 2172 | name = "windows-targets" 2173 | version = "0.53.2" 2174 | source = "registry+https://github.com/rust-lang/crates.io-index" 2175 | checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" 2176 | dependencies = [ 2177 | "windows_aarch64_gnullvm 0.53.0", 2178 | "windows_aarch64_msvc 0.53.0", 2179 | "windows_i686_gnu 0.53.0", 2180 | "windows_i686_gnullvm 0.53.0", 2181 | "windows_i686_msvc 0.53.0", 2182 | "windows_x86_64_gnu 0.53.0", 2183 | "windows_x86_64_gnullvm 0.53.0", 2184 | "windows_x86_64_msvc 0.53.0", 2185 | ] 2186 | 2187 | [[package]] 2188 | name = "windows_aarch64_gnullvm" 2189 | version = "0.52.6" 2190 | source = "registry+https://github.com/rust-lang/crates.io-index" 2191 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2192 | 2193 | [[package]] 2194 | name = "windows_aarch64_gnullvm" 2195 | version = "0.53.0" 2196 | source = "registry+https://github.com/rust-lang/crates.io-index" 2197 | checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" 2198 | 2199 | [[package]] 2200 | name = "windows_aarch64_msvc" 2201 | version = "0.52.6" 2202 | source = "registry+https://github.com/rust-lang/crates.io-index" 2203 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2204 | 2205 | [[package]] 2206 | name = "windows_aarch64_msvc" 2207 | version = "0.53.0" 2208 | source = "registry+https://github.com/rust-lang/crates.io-index" 2209 | checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" 2210 | 2211 | [[package]] 2212 | name = "windows_i686_gnu" 2213 | version = "0.52.6" 2214 | source = "registry+https://github.com/rust-lang/crates.io-index" 2215 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2216 | 2217 | [[package]] 2218 | name = "windows_i686_gnu" 2219 | version = "0.53.0" 2220 | source = "registry+https://github.com/rust-lang/crates.io-index" 2221 | checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" 2222 | 2223 | [[package]] 2224 | name = "windows_i686_gnullvm" 2225 | version = "0.52.6" 2226 | source = "registry+https://github.com/rust-lang/crates.io-index" 2227 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2228 | 2229 | [[package]] 2230 | name = "windows_i686_gnullvm" 2231 | version = "0.53.0" 2232 | source = "registry+https://github.com/rust-lang/crates.io-index" 2233 | checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" 2234 | 2235 | [[package]] 2236 | name = "windows_i686_msvc" 2237 | version = "0.52.6" 2238 | source = "registry+https://github.com/rust-lang/crates.io-index" 2239 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2240 | 2241 | [[package]] 2242 | name = "windows_i686_msvc" 2243 | version = "0.53.0" 2244 | source = "registry+https://github.com/rust-lang/crates.io-index" 2245 | checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" 2246 | 2247 | [[package]] 2248 | name = "windows_x86_64_gnu" 2249 | version = "0.52.6" 2250 | source = "registry+https://github.com/rust-lang/crates.io-index" 2251 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2252 | 2253 | [[package]] 2254 | name = "windows_x86_64_gnu" 2255 | version = "0.53.0" 2256 | source = "registry+https://github.com/rust-lang/crates.io-index" 2257 | checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" 2258 | 2259 | [[package]] 2260 | name = "windows_x86_64_gnullvm" 2261 | version = "0.52.6" 2262 | source = "registry+https://github.com/rust-lang/crates.io-index" 2263 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2264 | 2265 | [[package]] 2266 | name = "windows_x86_64_gnullvm" 2267 | version = "0.53.0" 2268 | source = "registry+https://github.com/rust-lang/crates.io-index" 2269 | checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" 2270 | 2271 | [[package]] 2272 | name = "windows_x86_64_msvc" 2273 | version = "0.52.6" 2274 | source = "registry+https://github.com/rust-lang/crates.io-index" 2275 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2276 | 2277 | [[package]] 2278 | name = "windows_x86_64_msvc" 2279 | version = "0.53.0" 2280 | source = "registry+https://github.com/rust-lang/crates.io-index" 2281 | checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" 2282 | 2283 | [[package]] 2284 | name = "winsafe" 2285 | version = "0.0.19" 2286 | source = "registry+https://github.com/rust-lang/crates.io-index" 2287 | checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" 2288 | --------------------------------------------------------------------------------