Compare commits

...

3 Commits

Author SHA1 Message Date
CraigD
e488903d7f
Merge pull request #32 from chincheta0815/docker_updates
change docker commands to get more images updates
2025-06-15 12:25:22 +00:00
CDrummond
2d2ddc7b17 Don't crash if file has no tags.
Closes #33
2025-06-15 13:21:49 +01:00
chincheta0815@nowhere.local
9e107c5fc2 change docker commands to get more images updates 2025-06-08 08:20:50 +02:00
5 changed files with 32 additions and 11 deletions

View File

@ -149,15 +149,26 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Build ARM ffmpeg on Debian - name: Build ARM ffmpeg on Bullseye
run: | run: |
docker build -t bliss-analyser-cross - < docker/Dockerfile_Bullseye_ffmpeg docker build --pull --no-cache -t bliss-analyser-cross - < docker/Dockerfile_Bullseye_ffmpeg
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bliss-analyser-debian-bullseye-arm-ffmpeg
path: releases/
- name: Build ARM ffmpeg on Bookworm
run: |
docker build --pull --no-cache -t bliss-analyser-cross - < docker/Dockerfile_Bookworm_ffmpeg
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: bliss-analyser-linux-arm-ffmpeg name: bliss-analyser-debian-bookworm-arm-ffmpeg
path: releases/ path: releases/
@ -170,7 +181,7 @@ jobs:
- name: Build ARM static-libav on Debian - name: Build ARM static-libav on Debian
run: | run: |
docker build -t bliss-analyser-cross - < docker/Dockerfile_Bullseye_static docker build --pull --no-cache -t bliss-analyser-cross - < docker/Dockerfile_Bullseye_static
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross
- name: Upload artifacts - name: Upload artifacts
@ -189,7 +200,7 @@ jobs:
- name: Build ARM libav on Bullseye - name: Build ARM libav on Bullseye
run: | run: |
docker build -t bliss-analyser-cross - < docker/Dockerfile_Bullseye_libav docker build --pull --no-cache -t bliss-analyser-cross - < docker/Dockerfile_Bullseye_libav
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross
- name: Upload artifacts - name: Upload artifacts
@ -200,7 +211,7 @@ jobs:
- name: Build ARM libav on Bookworm - name: Build ARM libav on Bookworm
run : | run : |
docker build -t bliss-analyser-cross - < docker/Dockerfile_Bookworm_libav docker build --pull --no-cache -t bliss-analyser-cross - < docker/Dockerfile_Bookworm_libav
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross
- name: Upload artifacts - name: Upload artifacts
@ -219,7 +230,7 @@ jobs:
- name: Build ARM symphonia on Debian - name: Build ARM symphonia on Debian
run: | run: |
docker build -t bliss-analyser-cross - < docker/Dockerfile_Bullseye_symphonia docker build --pull --no-cache -t bliss-analyser-cross - < docker/Dockerfile_Bullseye_symphonia
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross
- name: Upload artifacts - name: Upload artifacts
@ -482,4 +493,4 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: bliss-analyser-windows-symphonia name: bliss-analyser-windows-symphonia
path: releases/ path: releases/

2
Cargo.lock generated
View File

@ -180,7 +180,7 @@ dependencies = [
[[package]] [[package]]
name = "bliss-analyser" name = "bliss-analyser"
version = "0.4.0" version = "0.4.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"argparse", "argparse",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "bliss-analyser" name = "bliss-analyser"
version = "0.4.0" version = "0.4.1"
authors = ["Craig Drummond <craig.p.drummond@gmail.com>"] authors = ["Craig Drummond <craig.p.drummond@gmail.com>"]
edition = "2021" edition = "2021"
license = "GPL-3.0-only" license = "GPL-3.0-only"

View File

@ -1,3 +1,7 @@
0.4.1
-----
1. Don't crash if file has no tags.
0.4.0 0.4.0
----- -----
1. Add action to export results from DB to files. 1. Add action to export results from DB to files.

View File

@ -151,7 +151,13 @@ pub fn read(track: &String, read_analysis: bool) -> db::Metadata {
if let Ok(file) = lofty::read_from_path(Path::new(track)) { if let Ok(file) = lofty::read_from_path(Path::new(track)) {
let tag = match file.primary_tag() { let tag = match file.primary_tag() {
Some(primary_tag) => primary_tag, Some(primary_tag) => primary_tag,
None => file.first_tag().expect("Error: No tags found!"), None => {
if let Some(first_tag) = file.first_tag() {
first_tag
} else {
return meta;
}
}
}; };
meta.title = tag.title().unwrap_or_default().to_string(); meta.title = tag.title().unwrap_or_default().to_string();