Merge branch 'master' into radio-browser-search/5239

This commit is contained in:
Markus Busche 2026-03-24 17:08:35 +01:00 committed by GitHub
commit ae864a0e6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 16 additions and 41 deletions

View File

@ -338,7 +338,7 @@ jobs:
hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Create manifest list and push to Docker Hub
uses: nick-fields/retry@v3
uses: nick-fields/retry@v4
with:
timeout_minutes: 5
max_attempts: 3

View File

@ -248,6 +248,7 @@ ExecStart={{.Path|cmdEscape}}{{range .Arguments}} {{.|cmd}}{{end}}
TimeoutStopSec=20
RestartSec=120
EnvironmentFile=-/etc/sysconfig/{{.Name}}
Environment="ND_SYSTEMD_PRIORITY_LOGGING=1"
DevicePolicy=closed
NoNewPrivileges=yes

View File

@ -341,9 +341,11 @@ func Load(noConfigDump bool) {
os.Exit(1)
}
log.SetOutput(out)
} else if os.Getenv("JOURNAL_STREAM") != "" {
} else if os.Getenv("ND_SYSTEMD_PRIORITY_LOGGING") != "" && os.Getenv("JOURNAL_STREAM") != "" {
// When running under systemd, prepend syslog priority prefixes so
// journald assigns the correct severity to each log line.
// Note that we have an additional environment variable, as JOURNAL_STREAM
// can be present in a systemd environment even if not running as a systemd service
log.EnableJournalFormat()
}

View File

@ -31,8 +31,8 @@ func (s *playlists) parseM3U(ctx context.Context, pls *model.Playlist, folder *m
filteredLines := make([]string, 0, len(lines))
for _, line := range lines {
line := strings.TrimSpace(line)
if strings.HasPrefix(line, "#PLAYLIST:") {
pls.Name = line[len("#PLAYLIST:"):]
if after, ok := strings.CutPrefix(line, "#PLAYLIST:"); ok {
pls.Name = after
continue
}
if after, ok := strings.CutPrefix(line, "#EXTALBUMARTURL:"); ok {

View File

@ -65,7 +65,7 @@ var _ = Describe("getPID", func() {
Context("calculated attributes", func() {
BeforeEach(func() {
DeferCleanup(configtest.SetupConfig())
conf.Server.PID.Album = "musicbrainz_albumid|albumartistid,album,version,releasedate"
conf.Server.PID.Album = "musicbrainz_albumid|albumartistid,album,albumversion,releasedate"
})
When("field is title", func() {
It("should return the pid", func() {
@ -88,13 +88,13 @@ var _ = Describe("getPID", func() {
It("should return the pid", func() {
spec := "albumid|title"
md.tags = map[model.TagName][]string{
"title": {"title"},
"album": {"album name"},
"version": {"version"},
"releasedate": {"2021-01-01"},
"title": {"title"},
"album": {"album name"},
"albumversion": {"deluxe edition"},
"releasedate": {"2021-01-01"},
}
mf.AlbumArtist = "Album Artist"
Expect(getPID(mf, md, spec, false)).To(Equal("(((album artist)\\album name\\version\\2021-01-01))"))
Expect(getPID(mf, md, spec, false)).To(Equal("(((album artist)\\album name\\deluxe edition\\2021-01-01))"))
})
})
When("field is albumartistid", func() {

View File

@ -544,7 +544,7 @@ var _ = Describe("LibraryService Integration", Ordered, func() {
// Note: This test is slightly flaky due to a potential race condition in wazero's
// WASI filesystem mounting. The test passes ~85% of the time. Using FlakeAttempts
// to automatically retry on failure.
It("should read file from mounted library directory", FlakeAttempts(3), func() {
It("should read file from mounted library directory", FlakeAttempts(5), func() {
ctx := GinkgoT().Context()
output, err := callTestLibrary(ctx, testLibraryInput{
@ -557,7 +557,7 @@ var _ = Describe("LibraryService Integration", Ordered, func() {
})
// Note: Uses FlakeAttempts for the same reason as the read_file test above
It("should list files in mounted library directory", FlakeAttempts(3), func() {
It("should list files in mounted library directory", FlakeAttempts(5), func() {
ctx := GinkgoT().Context()
output, err := callTestLibrary(ctx, testLibraryInput{

View File

@ -81,7 +81,7 @@ main:
albumsort:
aliases: [ tsoa, albumsort, soal, wm/albumsortorder ]
albumversion:
aliases: [albumversion, musicbrainz_albumcomment, musicbrainz album comment, version]
aliases: [albumversion, musicbrainz_albumcomment, musicbrainz album comment]
album: true
genre:
aliases: [ tcon, genre, ©gen, wm/genre, ignr ]

View File

@ -2,7 +2,6 @@ package scheduler
import (
"testing"
"time"
"github.com/navidrome/navidrome/log"
. "github.com/onsi/ginkgo/v2"
@ -48,31 +47,4 @@ var _ = Describe("Scheduler", func() {
Expect(id).ToNot(BeZero())
s.Remove(id)
})
It("removes a job", func() {
done := make(chan struct{})
counter := 0
id, err := s.Add("@every 50ms", func() {
counter++
if counter == 1 {
close(done)
}
})
Expect(err).ToNot(HaveOccurred())
Expect(id).ToNot(BeZero())
// Verify job executed
Eventually(done).Should(BeClosed())
Expect(counter).To(Equal(1))
// Remove the job
s.Remove(id)
// Wait some time to ensure job doesn't execute again
time.Sleep(200 * time.Millisecond)
// Verify counter didn't increase
Expect(counter).To(Equal(1))
})
})