mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-27 15:54:03 +08:00
feat: customize audio/video types (close #819)
This commit is contained in:
parent
0bc05a60b0
commit
a5b757b251
@ -73,6 +73,20 @@ func InitSettings() {
|
|||||||
Description: "text type extensions",
|
Description: "text type extensions",
|
||||||
Group: model.FRONT,
|
Group: model.FRONT,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Key: "audio types",
|
||||||
|
Value: strings.Join(conf.AudioTypes, ","),
|
||||||
|
Type: "string",
|
||||||
|
Description: "audio type extensions",
|
||||||
|
Group: model.FRONT,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Key: "video types",
|
||||||
|
Value: strings.Join(conf.VideoTypes, ","),
|
||||||
|
Type: "string",
|
||||||
|
Description: "video type extensions",
|
||||||
|
Group: model.FRONT,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Key: "d_proxy types",
|
Key: "d_proxy types",
|
||||||
Value: strings.Join(conf.DProxyTypes, ","),
|
Value: strings.Join(conf.DProxyTypes, ","),
|
||||||
|
@ -93,6 +93,14 @@ func LoadSettings() {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
conf.TextTypes = strings.Split(textTypes.Value, ",")
|
conf.TextTypes = strings.Split(textTypes.Value, ",")
|
||||||
}
|
}
|
||||||
|
audioTypes, err := GetSettingByKey("text types")
|
||||||
|
if err == nil {
|
||||||
|
conf.AudioTypes = strings.Split(audioTypes.Value, ",")
|
||||||
|
}
|
||||||
|
videoTypes, err := GetSettingByKey("text types")
|
||||||
|
if err == nil {
|
||||||
|
conf.VideoTypes = strings.Split(videoTypes.Value, ",")
|
||||||
|
}
|
||||||
dProxyTypes, err := GetSettingByKey("d_proxy types")
|
dProxyTypes, err := GetSettingByKey("d_proxy types")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
conf.DProxyTypes = strings.Split(dProxyTypes.Value, ",")
|
conf.DProxyTypes = strings.Split(dProxyTypes.Value, ",")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user