fix: use Debian chromaprint tools package
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
FROM python:3.12-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends chromaprint-tools && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libchromaprint-tools && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
COPY pyproject.toml README.md ./
|
||||
COPY am_deduper ./am_deduper
|
||||
|
||||
@@ -44,4 +44,7 @@ def connect(path: Path) -> sqlite3.Connection:
|
||||
conn.execute("PRAGMA foreign_keys=ON")
|
||||
conn.execute("PRAGMA busy_timeout=5000")
|
||||
conn.executescript(SCHEMA)
|
||||
cols={r[1] for r in conn.execute("PRAGMA table_info(audio_tracks)")}
|
||||
if "version_flags" not in cols:
|
||||
conn.execute("ALTER TABLE audio_tracks ADD COLUMN version_flags TEXT")
|
||||
return conn
|
||||
|
||||
@@ -24,7 +24,7 @@ def index_file(conn, path: Path) -> None:
|
||||
flags = ",".join(meta.get("version_flags", []))
|
||||
conn.execute("""
|
||||
INSERT INTO audio_tracks(file_path,file_size,fast_hash,duration,artist,title,album,format,bitrate,sample_rate,bit_depth,version_flags,inode,device,status)
|
||||
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'active')
|
||||
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,'active')
|
||||
ON CONFLICT(file_path) DO UPDATE SET file_size=excluded.file_size, fast_hash=excluded.fast_hash,
|
||||
duration=excluded.duration,artist=excluded.artist,title=excluded.title,album=excluded.album,format=excluded.format,
|
||||
bitrate=excluded.bitrate,sample_rate=excluded.sample_rate,bit_depth=excluded.bit_depth,version_flags=excluded.version_flags,
|
||||
|
||||
Reference in New Issue
Block a user