mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-14 03:07:24 +03:00
Option to ignore folder playlists
This commit is contained in:
parent
deb8b32211
commit
a4e9d9da14
@ -14,6 +14,7 @@ user=deluan
|
||||
password=wordpass
|
||||
dbPath=./devDb
|
||||
downsampleCommand=ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -
|
||||
ignorePlsFolders = true
|
||||
|
||||
[dev]
|
||||
disableValidation = true
|
||||
|
@ -55,7 +55,12 @@ func (s *ItunesScanner) ScanLibrary(lastModifiedSince time.Time, path string) (i
|
||||
}
|
||||
}
|
||||
|
||||
ignFolders, _ := beego.AppConfig.Bool("ignorePlsFolders")
|
||||
for _, p := range l.Playlists {
|
||||
if p.Master || p.Music || (ignFolders && p.Folder) {
|
||||
continue
|
||||
}
|
||||
|
||||
s.collectPlaylists(&p)
|
||||
}
|
||||
beego.Debug("Processed", len(l.Playlists), "playlists.")
|
||||
@ -77,9 +82,6 @@ func (s *ItunesScanner) Playlists() map[string]*domain.Playlist {
|
||||
}
|
||||
|
||||
func (s *ItunesScanner) collectPlaylists(p *itl.Playlist) {
|
||||
if p.Master || p.Music {
|
||||
return
|
||||
}
|
||||
pl := &domain.Playlist{}
|
||||
pl.Id = strconv.Itoa(p.PlaylistID)
|
||||
pl.Name = p.Name
|
||||
|
Loading…
x
Reference in New Issue
Block a user