feat(subsonic): rename AppendSubtitle conf to Subsonic.AppendSubtitle, for consistency
Some checks are pending
Pipeline: Test, Lint, Build / Get version info (push) Waiting to run
Pipeline: Test, Lint, Build / Lint Go code (push) Waiting to run
Pipeline: Test, Lint, Build / Test Go code (push) Waiting to run
Pipeline: Test, Lint, Build / Test JS code (push) Waiting to run
Pipeline: Test, Lint, Build / Lint i18n files (push) Waiting to run
Pipeline: Test, Lint, Build / Check Docker configuration (push) Waiting to run
Pipeline: Test, Lint, Build / Build (darwin/amd64) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (darwin/arm64) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (linux/386) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (linux/amd64) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (linux/arm/v5) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (linux/arm/v6) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (linux/arm/v7) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (linux/arm64) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (windows/386) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build (windows/amd64) (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Push Docker manifest (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Build Windows installers (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Package/Release (push) Blocked by required conditions
Pipeline: Test, Lint, Build / Upload Linux PKG (push) Blocked by required conditions

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan
2025-03-08 19:02:29 -05:00
parent 0d42b9a4a5
commit 57d3be8604
3 changed files with 4 additions and 4 deletions

View File

@@ -57,7 +57,6 @@ type configOptions struct {
SearchFullString bool
RecentlyAddedByModTime bool
PreferSortTags bool
AppendSubtitle bool
IgnoredArticles string
IndexGroups string
FFmpegPath string
@@ -133,6 +132,7 @@ type scannerOptions struct {
}
type subsonicOptions struct {
AppendSubtitle bool
ArtistParticipations bool
DefaultReportRealPath bool
LegacyClients string
@@ -447,7 +447,6 @@ func init() {
viper.SetDefault("searchfullstring", false)
viper.SetDefault("recentlyaddedbymodtime", false)
viper.SetDefault("prefersorttags", false)
viper.SetDefault("appendsubtitle", true)
viper.SetDefault("ignoredarticles", "The El La Los Las Le Les Os As O A")
viper.SetDefault("indexgroups", "A B C D E F G H I J K L M N O P Q R S T U V W X-Z(XYZ) [Unknown]([)")
viper.SetDefault("ffmpegpath", "")
@@ -494,6 +493,7 @@ func init() {
viper.SetDefault("scanner.watcherwait", consts.DefaultWatcherWait)
viper.SetDefault("scanner.scanonstartup", true)
viper.SetDefault("subsonic.appendsubtitle", true)
viper.SetDefault("subsonic.artistparticipations", false)
viper.SetDefault("subsonic.defaultreportrealpath", false)
viper.SetDefault("subsonic.legacyclients", "DSub")

View File

@@ -93,7 +93,7 @@ type MediaFile struct {
}
func (mf MediaFile) FullTitle() string {
if conf.Server.AppendSubtitle && mf.Tags[TagSubtitle] != nil {
if conf.Server.Subsonic.AppendSubtitle && mf.Tags[TagSubtitle] != nil {
return fmt.Sprintf("%s (%s)", mf.Title, mf.Tags[TagSubtitle][0])
}
return mf.Title

View File

@@ -55,7 +55,7 @@ func (c TagConf) SplitTagValue(values []string) []string {
type TagType string
const (
TagTypeInteger TagType = "integer"
TagTypeInteger TagType = "int"
TagTypeFloat TagType = "float"
TagTypeDate TagType = "date"
TagTypeUUID TagType = "uuid"