Files
lidarr-mb-gap/flake.nix
Danilo Reyes 03e8eb6f4e Enhance audio verification features and improve code structure
- Added `ffmpeg` as a dependency in `flake.nix` and `package-cleanup.nix` for audio file property analysis.
- Updated `main.py` to include new functions for retrieving audio file properties using `ffprobe` and verifying audio matches with detailed confidence scoring.
- Refactored fingerprint comparison logic to improve accuracy and added logging for better traceability.
- Enhanced the `find_duplicate_singles` function to support audio verification results and confidence scores, providing clearer output for users.
2025-11-13 23:21:12 -06:00

67 lines
1.7 KiB
Nix

{
description = "Lidarr to MusicBrainz Missing Albums Finder";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{ nixpkgs, self }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
inherit (pkgs) lib;
lidarr-mb-gap = import ./nix/package.nix {
inherit pkgs;
src = lib.cleanSource ./src;
};
lidarr-cleanup-singles = import ./nix/package-cleanup.nix {
inherit pkgs;
src = lib.cleanSource ./src-cleanup;
};
in
{
nixosModules.lidarr-mb-gap = import ./nixos/lidarr-mb-gap.nix;
packages.${system} = {
default = lidarr-mb-gap;
inherit lidarr-mb-gap lidarr-cleanup-singles;
};
apps.${system} = {
default = {
type = "app";
program = "${lidarr-mb-gap}/bin/lidarr-mb-gap";
};
lidarr-mb-gap = {
type = "app";
program = "${lidarr-mb-gap}/bin/lidarr-mb-gap";
};
lidarr-cleanup-singles = {
type = "app";
program = "${lidarr-cleanup-singles}/bin/lidarr-cleanup-singles";
};
};
devShells.${system} = {
default = pkgs.mkShell {
buildInputs = [
(pkgs.python3.withPackages (
ps: with ps; [
requests
python-dotenv
]
))
pkgs.black
pkgs.chromaprint
pkgs.ffmpeg
];
shellHook = ''
echo "Python environment ready!"
echo "Run: python src/main.py"
echo "Format code with: black src/"
echo "Audio verification tools: ffprobe (ffmpeg), fpcalc (chromaprint)"
'';
};
};
};
}