This commit is contained in:
@@ -105,6 +105,14 @@ func loadSettings() (settings SettingsStruct, err error) {
|
||||
dataMap["m3u"] = make(map[string]interface{})
|
||||
dataMap["hdhr"] = make(map[string]interface{})
|
||||
|
||||
defaultFFmpegPath := ""
|
||||
if len(os.Getenv("XTEVE_CONFIG")) > 0 {
|
||||
containerFFmpegPath := "/usr/local/bin/ffmpeg"
|
||||
if checkFile(containerFFmpegPath) == nil {
|
||||
defaultFFmpegPath = containerFFmpegPath
|
||||
}
|
||||
}
|
||||
|
||||
defaults["api"] = false
|
||||
defaults["use_plexAPI"] = false
|
||||
defaults["plex.url"] = ""
|
||||
@@ -121,6 +129,7 @@ func loadSettings() (settings SettingsStruct, err error) {
|
||||
defaults["buffer.timeout"] = 500
|
||||
defaults["cache.images"] = false
|
||||
defaults["epgSource"] = "PMS"
|
||||
defaults["ffmpeg.path"] = defaultFFmpegPath
|
||||
defaults["ffmpeg.options"] = System.FFmpeg.DefaultOptions
|
||||
defaults["vlc.options"] = System.VLC.DefaultOptions
|
||||
defaults["files"] = dataMap
|
||||
@@ -170,7 +179,12 @@ func loadSettings() (settings SettingsStruct, err error) {
|
||||
}
|
||||
|
||||
if len(settings.FFmpegPath) == 0 {
|
||||
settings.FFmpegPath = searchFileInOS("ffmpeg")
|
||||
containerFFmpegPath := "/usr/local/bin/ffmpeg"
|
||||
if len(os.Getenv("XTEVE_CONFIG")) > 0 && checkFile(containerFFmpegPath) == nil {
|
||||
settings.FFmpegPath = containerFFmpegPath
|
||||
} else {
|
||||
settings.FFmpegPath = searchFileInOS("ffmpeg")
|
||||
}
|
||||
}
|
||||
|
||||
if len(settings.VLCPath) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user