kagemomiji / airsonic-advanced

airsonic-advanced
GNU General Public License v3.0
161 stars 14 forks source link

[Bug]: Broken cue files #447

Closed Dikakus closed 4 months ago

Dikakus commented 5 months ago

What happened?

Suddenly all my collections with cue files have stopped working correctly: two files appear, one of them with zero duration that cannot be played and causes the player to stop.

Airsonic - Cue files

The configuration is set to process the cue files and hide those that are not applicable.

Airsonic - Cue configuration

Steps to reproduce

Browse on the website to any folder with a cue file and its corresponding complete music file.

Version

11.1.4-SNAPSHOT (Edge)

Version Detail

11.1.4-SNAPSHOT.20240430072412

Operating System

Linux, Debian Bookworm in a Raspberry Pi 4

Java Version

openjdk 17.0.10 2024-01-16

Database

Other

DB Detail

Build-in database

Configuration paramter

[Unit] Description=Airsonic Media Server After=local-fs.target remote-fs.target network.target var-airsonic.service Requires=var-airsonic.service Wants=var-airsonic.service

[Service] Type=simple ExecStartPre=/bin/sleep 30 Environment="JAVA_JAR=/srv/airsonic/airsonic.war"

Environment="JAVA_OPTS=-Xmx2048m -XX:MaxPermSize=1024m"

Environment="JAVA_OPTS=-Xmx2048m" Environment="AIRSONIC_HOME=/var/airsonic" Environment="PORT=8085" Environment="CONTEXT_PATH=/airsonic" Environment="DEBUG_LEVEL=WARN" Environment="JAVA_ARGS=" EnvironmentFile=-/etc/sysconfig/airsonic ExecStart=/usr/bin/java $JAVA_OPTS -Dairsonic.home=${AIRSONIC_HOME} -Dserver.forward-headers-strategy=native -Dserver.servlet.context-path=${CONTEXT_PATH} -Dserver.port=${PORT} -Dlogging.level.org.airsonic=${DEBUG_LEVEL} -jar ${JAVA_JAR} $JAVA_ARGS

User=airsonic Group=airsonic

DevicePolicy=closed DeviceAllow=char-alsa rw NoNewPrivileges=yes PrivateTmp=false PrivateUsers=yes ProtectControlGroups=yes ProtectKernelModules=yes ProtectKernelTunables=yes RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 RestrictNamespaces=yes RestrictRealtime=yes SystemCallFilter=@basic-io https://github.com/File-system @chown @network-io @sync @Timer @signal @process https://github.com/System-service ReadWritePaths=/var/airsonic

'#You can uncomment the following line if you're not using the jukebox '#This will prevent airsonic from accessing any real (physical) devices '#PrivateDevices=yes

'#You can change the following line to strict instead of full '#if you don't want airsonic to be able to '#write anything on your filesystem outside of AIRSONIC_HOME. ProtectSystem=full

'#You can uncomment the following line if you don't have any media '#in /home/…. This will prevent airsonic from ever reading/writing anything there. '#ProtectHome=true

'#You can uncomment the following line if you're not using the OpenJDK. '#This will prevent processes from having a memory zone that is both writeable 3 '#and executeable, making hacker's lifes a bit harder. '#MemoryDenyWriteExecute=yes

[Install] WantedBy=multi-user.target WantedBy=var-airsonic.mount

Proxy Server

No response

client detail

No response

language

Spanish

Relevant log output

No response

kagemomiji commented 5 months ago

@Dikakus Could you disable Hide virtual tracks?

Dikakus commented 4 months ago

Yes, I did it.

Disabling virtual tracks: Airsonic - Cue configuration

Then I did a full scan and a clean of BD. But the result is the same:

Airsonic - Cue files

kagemomiji commented 4 months ago

@Dikakus Is your FLAC file an embedded FLAC with CUE, or is it a FLAC file with a separate CUE file?

Dikakus commented 4 months ago

They are separate cue files. I have other folders with an ape file and its separte cue file with the same wrong behavior. This used to works before but, I couldn't pinpoint the release when it broke.

Dikakus commented 4 months ago

I apologize. I have been investigating, and indeed the FLAC files from the captures have the embedded cue. I tried renaming the external cue file, but now only the full FLAC file appears without the tracks being visible.

Then, I've removed the embedded cue info from the FLAC file and restored the external cue file with the same previous result: two files and one of them with 0 length.

kagemomiji commented 4 months ago

@Dikakus Please try using this new build.

If there is no improvement, could you upload just the CueSheet file? The music file is not needed. Also, could you check if there are any errors in logs?

Dikakus commented 4 months ago

Hello, @kagemomiji! I apologize for the delay. I’ve tested your war, and these are the results:

  1. With flac files containing embedded cues, it works perfectly: separated tracks and played well. 2- Files with a separate cue file display and play the individual tracks, but the cue file itself also appears with a length of 0.

If I select ‘Hide virtual tracks’ in the first case, only one FLAC file is displayed, while in the second case, two files are shown: the complete one and another with zero length." 😊

signal commented 4 months ago

?

kagemomiji commented 4 months ago

@Dikakus By default, CueSheet files (files with a .cue extension) should not be recognized as MediaFiles. Could you check if you have added 'cue' under Settings > General > Music files/Video files? Could you also attach the CueSheet file that is being incorrectly loaded, as a comment?

Dikakus commented 4 months ago

That was it! I had the .cue extension in the music file list. After removing it, it no longer appears as an extra track, and everything works fine. Thank you, @kagemomiji ! 😊