Adds ability to configure sort order for DLNA videos (#3645)

This commit is contained in:
CJ
2023-05-02 20:33:32 -07:00
committed by GitHub
parent 55e0d5c82f
commit d6b4d16ff4
11 changed files with 83 additions and 5 deletions

View File

@@ -210,6 +210,9 @@ const (
DLNADefaultIPWhitelist = "dlna.default_whitelist"
DLNAInterfaces = "dlna.interfaces"
DLNAVideoSortOrder = "dlna.video_sort_order"
dlnaVideoSortOrderDefault = "title"
// Logging options
LogFile = "logFile"
LogOut = "logOut"
@@ -1370,6 +1373,17 @@ func (i *Instance) GetDLNAInterfaces() []string {
return i.getStringSlice(DLNAInterfaces)
}
// GetVideoSortOrder returns the sort order to display videos. If
// empty, videos will be sorted by titles.
func (i *Instance) GetVideoSortOrder() string {
ret := i.getString(DLNAVideoSortOrder)
if ret == "" {
ret = dlnaVideoSortOrderDefault
}
return ret
}
// GetLogFile returns the filename of the file to output logs to.
// An empty string means that file logging will be disabled.
func (i *Instance) GetLogFile() string {