v2.1.0.0105: Settings for URI scheme
This commit is contained in:
@@ -18,7 +18,7 @@ menuItems.push(new MainMenuItem("log", "{{.mainMenu.item.log}}", "log.png", "{{.
|
|||||||
menuItems.push(new MainMenuItem("logout", "{{.mainMenu.item.logout}}", "logout.png", "{{.mainMenu.headline.logout}}"));
|
menuItems.push(new MainMenuItem("logout", "{{.mainMenu.item.logout}}", "logout.png", "{{.mainMenu.headline.logout}}"));
|
||||||
// Kategorien für die Einstellungen
|
// Kategorien für die Einstellungen
|
||||||
var settingsCategory = new Array();
|
var settingsCategory = new Array();
|
||||||
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.general}}", "xteveAutoUpdate,tuner,epgSource,api"));
|
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.general}}", "xteveAutoUpdate,tuner,epgSource,api,scheme.m3u,scheme.xml"));
|
||||||
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.files}}", "update,files.update,temp.path,cache.images,xepg.replace.missing.images"));
|
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.files}}", "update,files.update,temp.path,cache.images,xepg.replace.missing.images"));
|
||||||
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.streaming}}", "buffer,buffer.size.kb,buffer.timeout,user.agent,ffmpeg.path,ffmpeg.options,vlc.path,vlc.options"));
|
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.streaming}}", "buffer,buffer.size.kb,buffer.timeout,user.agent,ffmpeg.path,ffmpeg.options,vlc.path,vlc.options"));
|
||||||
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.backup}}", "backup.path,backup.keep"));
|
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.backup}}", "backup.path,backup.keep"));
|
||||||
|
|||||||
@@ -305,6 +305,30 @@ var SettingsCategory = /** @class */ (function () {
|
|||||||
setting.appendChild(tdLeft);
|
setting.appendChild(tdLeft);
|
||||||
setting.appendChild(tdRight);
|
setting.appendChild(tdRight);
|
||||||
break;
|
break;
|
||||||
|
case "scheme.m3u":
|
||||||
|
var tdLeft = document.createElement("TD");
|
||||||
|
tdLeft.innerHTML = "{{.settings.schemeM3U.title}}" + ":";
|
||||||
|
var tdRight = document.createElement("TD");
|
||||||
|
var text = ["HTTP", "HTTPS"];
|
||||||
|
var values = ["HTTP", "HTTPS"];
|
||||||
|
var select = content.createSelect(text, values, data, settingsKey);
|
||||||
|
select.setAttribute("onchange", "javascript: this.className = 'changed'");
|
||||||
|
tdRight.appendChild(select);
|
||||||
|
setting.appendChild(tdLeft);
|
||||||
|
setting.appendChild(tdRight);
|
||||||
|
break;
|
||||||
|
case "scheme.xml":
|
||||||
|
var tdLeft = document.createElement("TD");
|
||||||
|
tdLeft.innerHTML = "{{.settings.schemeXML.title}}" + ":";
|
||||||
|
var tdRight = document.createElement("TD");
|
||||||
|
var text = ["HTTP", "HTTPS"];
|
||||||
|
var values = ["HTTP", "HTTPS"];
|
||||||
|
var select = content.createSelect(text, values, data, settingsKey);
|
||||||
|
select.setAttribute("onchange", "javascript: this.className = 'changed'");
|
||||||
|
tdRight.appendChild(select);
|
||||||
|
setting.appendChild(tdLeft);
|
||||||
|
setting.appendChild(tdRight);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return setting;
|
return setting;
|
||||||
};
|
};
|
||||||
@@ -386,6 +410,12 @@ var SettingsCategory = /** @class */ (function () {
|
|||||||
case "xepg.replace.missing.images":
|
case "xepg.replace.missing.images":
|
||||||
text = "{{.settings.replaceEmptyImages.description}}";
|
text = "{{.settings.replaceEmptyImages.description}}";
|
||||||
break;
|
break;
|
||||||
|
case "scheme.m3u":
|
||||||
|
text = "{{.settings.schemeM3U.description}}";
|
||||||
|
break;
|
||||||
|
case "scheme.xml":
|
||||||
|
text = "{{.settings.schemeXML.description}}";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
text = "";
|
text = "";
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -302,6 +302,14 @@
|
|||||||
"title": "Number of Tuners",
|
"title": "Number of Tuners",
|
||||||
"description": "Number of parallel connections that can be established to the provider.<br>Available for: Plex, Emby (HDHR), M3U (with active buffer).<br>After a change, xTeVe must be delete in the Plex / Emby DVR settings and set up again."
|
"description": "Number of parallel connections that can be established to the provider.<br>Available for: Plex, Emby (HDHR), M3U (with active buffer).<br>After a change, xTeVe must be delete in the Plex / Emby DVR settings and set up again."
|
||||||
},
|
},
|
||||||
|
"schemeM3U":{
|
||||||
|
"title": "URL protocol for xteve.m3u",
|
||||||
|
"description": "Determines which URL protocol is used for the xTeVe streaming URLs. If you using a reverse proxy over HTTPS, set this to HTTPS."
|
||||||
|
},
|
||||||
|
"schemeXML":{
|
||||||
|
"title": "URL protocol for xteve.xml",
|
||||||
|
"description": "Determines which URL protocol is used for the xTeVe image URLs. If you using a reverse proxy over HTTPS, set this to HTTPS."
|
||||||
|
},
|
||||||
"filesUpdate": {
|
"filesUpdate": {
|
||||||
"title": "Updates all files at startup",
|
"title": "Updates all files at startup",
|
||||||
"description": "Updates all playlists, tuner and XMLTV files at startup."
|
"description": "Updates all playlists, tuner and XMLTV files at startup."
|
||||||
|
|||||||
@@ -223,6 +223,8 @@ func StartSystem(updateProviderFiles bool) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setURLScheme()
|
||||||
|
|
||||||
// Systeminformationen in der Konsole ausgeben
|
// Systeminformationen in der Konsole ausgeben
|
||||||
showInfo(fmt.Sprintf("UUID:%s", Settings.UUID))
|
showInfo(fmt.Sprintf("UUID:%s", Settings.UUID))
|
||||||
showInfo(fmt.Sprintf("Tuner (Plex / Emby):%d", Settings.Tuner))
|
showInfo(fmt.Sprintf("Tuner (Plex / Emby):%d", Settings.Tuner))
|
||||||
|
|||||||
11
src/data.go
11
src/data.go
@@ -107,6 +107,9 @@ func updateServerSettings(request RequestStruct) (settings SettingsStrcut, err e
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "scheme.m3u", "scheme.xml":
|
||||||
|
createXEPGFiles = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oldSettings[key] = value
|
oldSettings[key] = value
|
||||||
@@ -141,6 +144,8 @@ func updateServerSettings(request RequestStruct) (settings SettingsStrcut, err e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setURLScheme()
|
||||||
|
|
||||||
if Settings.AuthenticationWEB == false {
|
if Settings.AuthenticationWEB == false {
|
||||||
|
|
||||||
Settings.AuthenticationAPI = false
|
Settings.AuthenticationAPI = false
|
||||||
@@ -505,11 +510,10 @@ func saveXEpgMapping(request RequestStruct) (err error) {
|
|||||||
|
|
||||||
System.ScanInProgress = 1
|
System.ScanInProgress = 1
|
||||||
cleanupXEPG()
|
cleanupXEPG()
|
||||||
//buildXEPG(true)
|
buildXEPG(true)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
|
||||||
mapping()
|
|
||||||
createXMLTVFile()
|
createXMLTVFile()
|
||||||
createM3UFile()
|
createM3UFile()
|
||||||
showInfo("XEPG:" + fmt.Sprintf("Ready to use"))
|
showInfo("XEPG:" + fmt.Sprintf("Ready to use"))
|
||||||
@@ -541,8 +545,7 @@ func saveXEpgMapping(request RequestStruct) (err error) {
|
|||||||
System.ScanInProgress = 1
|
System.ScanInProgress = 1
|
||||||
|
|
||||||
cleanupXEPG()
|
cleanupXEPG()
|
||||||
//buildXEPG(false)
|
buildXEPG(false)
|
||||||
mapping()
|
|
||||||
createXMLTVFile()
|
createXMLTVFile()
|
||||||
createM3UFile()
|
createM3UFile()
|
||||||
showInfo("XEPG:" + fmt.Sprintf("Ready to use"))
|
showInfo("XEPG:" + fmt.Sprintf("Ready to use"))
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ func getCacheImageURL(imageURL string) (cacheImageURL string) {
|
|||||||
|
|
||||||
if indexOfString(urlMD5+fileExtension, Data.Cache.ImagesCache) != -1 {
|
if indexOfString(urlMD5+fileExtension, Data.Cache.ImagesCache) != -1 {
|
||||||
|
|
||||||
cacheImageURL = fmt.Sprintf("%s://%s/images/%s%s", System.ServerProtocol.WEB, System.Domain, urlMD5, fileExtension)
|
cacheImageURL = fmt.Sprintf("%s://%s/images/%s%s", System.ServerProtocol.XML, System.Domain, urlMD5, fileExtension)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ func uploadLogo(input, filename string) (logoURL string, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
logoURL = fmt.Sprintf("%s://%s/data_images/%s", System.ServerProtocol.WEB, System.Domain, filename)
|
logoURL = fmt.Sprintf("%s://%s/data_images/%s", System.ServerProtocol.XML, System.Domain, filename)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -279,6 +279,8 @@ type SettingsStrcut struct {
|
|||||||
MappingFirstChannel float64 `json:"mapping.first.channel"`
|
MappingFirstChannel float64 `json:"mapping.first.channel"`
|
||||||
Port string `json:"port"`
|
Port string `json:"port"`
|
||||||
SSDP bool `json:"ssdp"`
|
SSDP bool `json:"ssdp"`
|
||||||
|
SchemeM3U string `json:"scheme.m3u"`
|
||||||
|
SchemeXML string `json:"scheme.xml"`
|
||||||
TempPath string `json:"temp.path"`
|
TempPath string `json:"temp.path"`
|
||||||
Tuner int `json:"tuner"`
|
Tuner int `json:"tuner"`
|
||||||
Update []string `json:"update"`
|
Update []string `json:"update"`
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ type RequestStruct struct {
|
|||||||
UserAgent *string `json:"user.agent,omitempty"`
|
UserAgent *string `json:"user.agent,omitempty"`
|
||||||
XepgReplaceMissingImages *bool `json:"xepg.replace.missing.images,omitempty"`
|
XepgReplaceMissingImages *bool `json:"xepg.replace.missing.images,omitempty"`
|
||||||
XteveAutoUpdate *bool `json:"xteveAutoUpdate,omitempty"`
|
XteveAutoUpdate *bool `json:"xteveAutoUpdate,omitempty"`
|
||||||
|
SchemeM3U *string `json:"scheme.m3u,omitempty"`
|
||||||
|
SchemeXML *string `json:"scheme.xml,omitempty"`
|
||||||
} `json:"settings,omitempty"`
|
} `json:"settings,omitempty"`
|
||||||
|
|
||||||
// Upload Logo
|
// Upload Logo
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ type Program struct {
|
|||||||
PreviouslyShown *PreviouslyShown `xml:"previously-shown"`
|
PreviouslyShown *PreviouslyShown `xml:"previously-shown"`
|
||||||
New *New `xml:"new"`
|
New *New `xml:"new"`
|
||||||
Live *Live `xml:"live"`
|
Live *Live `xml:"live"`
|
||||||
|
Premiere *Live `xml:"premiere"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Title : Programmtitel
|
// Title : Programmtitel
|
||||||
|
|||||||
@@ -138,6 +138,8 @@ func loadSettings() (settings SettingsStrcut, err error) {
|
|||||||
defaults["version"] = System.DBVersion
|
defaults["version"] = System.DBVersion
|
||||||
defaults["xteveAutoUpdate"] = true
|
defaults["xteveAutoUpdate"] = true
|
||||||
defaults["temp.path"] = System.Folder.Temp
|
defaults["temp.path"] = System.Folder.Temp
|
||||||
|
defaults["scheme.M3U"] = "HTTP"
|
||||||
|
defaults["scheme.XML"] = "HTTP"
|
||||||
|
|
||||||
// Default Werte setzen
|
// Default Werte setzen
|
||||||
for key, value := range defaults {
|
for key, value := range defaults {
|
||||||
@@ -252,6 +254,14 @@ func setGlobalDomain(domain string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setURLScheme() {
|
||||||
|
|
||||||
|
System.ServerProtocol.M3U = strings.ToLower(Settings.SchemeM3U)
|
||||||
|
System.ServerProtocol.XML = strings.ToLower(Settings.SchemeXML)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// UUID generieren
|
// UUID generieren
|
||||||
func createUUID() (uuid string) {
|
func createUUID() (uuid string) {
|
||||||
uuid = time.Now().Format("2006-01") + "-" + randomString(4) + "-" + randomString(6)
|
uuid = time.Now().Format("2006-01") + "-" + randomString(4) + "-" + randomString(6)
|
||||||
|
|||||||
79
src/webUI.go
79
src/webUI.go
File diff suppressed because one or more lines are too long
@@ -717,6 +717,9 @@ func getProgramData(xepgChannel XEPGChannelStruct) (xepgXML XMLTV, err error) {
|
|||||||
// Live
|
// Live
|
||||||
program.Live = xmltvProgram.Live
|
program.Live = xmltvProgram.Live
|
||||||
|
|
||||||
|
// Premiere
|
||||||
|
program.Premiere = xmltvProgram.Premiere
|
||||||
|
|
||||||
xepgXML.Program = append(xepgXML.Program, program)
|
xepgXML.Program = append(xepgXML.Program, program)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ menuItems.push(new MainMenuItem("logout", "{{.mainMenu.item.logout}}", "logout.p
|
|||||||
|
|
||||||
// Kategorien für die Einstellungen
|
// Kategorien für die Einstellungen
|
||||||
var settingsCategory = new Array()
|
var settingsCategory = new Array()
|
||||||
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.general}}", "xteveAutoUpdate,tuner,epgSource,api"))
|
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.general}}", "xteveAutoUpdate,tuner,epgSource,api,scheme.m3u,scheme.xml"))
|
||||||
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.files}}", "update,files.update,temp.path,cache.images,xepg.replace.missing.images"))
|
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.files}}", "update,files.update,temp.path,cache.images,xepg.replace.missing.images"))
|
||||||
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.streaming}}", "buffer,buffer.size.kb,buffer.timeout,user.agent,ffmpeg.path,ffmpeg.options,vlc.path,vlc.options"))
|
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.streaming}}", "buffer,buffer.size.kb,buffer.timeout,user.agent,ffmpeg.path,ffmpeg.options,vlc.path,vlc.options"))
|
||||||
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.backup}}", "backup.path,backup.keep"))
|
settingsCategory.push(new SettingsCategoryItem("{{.settings.category.backup}}", "backup.path,backup.keep"))
|
||||||
|
|||||||
@@ -372,6 +372,38 @@ class SettingsCategory {
|
|||||||
setting.appendChild(tdRight)
|
setting.appendChild(tdRight)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
case "scheme.m3u":
|
||||||
|
var tdLeft = document.createElement("TD")
|
||||||
|
tdLeft.innerHTML = "{{.settings.schemeM3U.title}}" + ":"
|
||||||
|
|
||||||
|
var tdRight = document.createElement("TD")
|
||||||
|
var text:any[] = ["HTTP", "HTTPS"]
|
||||||
|
var values:any[] = ["HTTP", "HTTPS"]
|
||||||
|
|
||||||
|
var select = content.createSelect(text, values, data, settingsKey)
|
||||||
|
select.setAttribute("onchange", "javascript: this.className = 'changed'")
|
||||||
|
tdRight.appendChild(select)
|
||||||
|
|
||||||
|
setting.appendChild(tdLeft)
|
||||||
|
setting.appendChild(tdRight)
|
||||||
|
break
|
||||||
|
|
||||||
|
case "scheme.xml":
|
||||||
|
var tdLeft = document.createElement("TD")
|
||||||
|
tdLeft.innerHTML = "{{.settings.schemeXML.title}}" + ":"
|
||||||
|
|
||||||
|
var tdRight = document.createElement("TD")
|
||||||
|
var text:any[] = ["HTTP", "HTTPS"]
|
||||||
|
var values:any[] = ["HTTP", "HTTPS"]
|
||||||
|
|
||||||
|
var select = content.createSelect(text, values, data, settingsKey)
|
||||||
|
select.setAttribute("onchange", "javascript: this.className = 'changed'")
|
||||||
|
tdRight.appendChild(select)
|
||||||
|
|
||||||
|
setting.appendChild(tdLeft)
|
||||||
|
setting.appendChild(tdRight)
|
||||||
|
break
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return setting
|
return setting
|
||||||
@@ -483,6 +515,15 @@ class SettingsCategory {
|
|||||||
text = "{{.settings.replaceEmptyImages.description}}"
|
text = "{{.settings.replaceEmptyImages.description}}"
|
||||||
break
|
break
|
||||||
|
|
||||||
|
case "scheme.m3u":
|
||||||
|
text = "{{.settings.schemeM3U.description}}"
|
||||||
|
break
|
||||||
|
|
||||||
|
case "scheme.xml":
|
||||||
|
text = "{{.settings.schemeXML.description}}"
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
text = ""
|
text = ""
|
||||||
break
|
break
|
||||||
|
|||||||
2
xteve.go
2
xteve.go
@@ -39,7 +39,7 @@ var GitHub = GitHubStruct{Branch: "master", User: "xteve-project", Repo: "xTeVe-
|
|||||||
const Name = "xTeVe"
|
const Name = "xTeVe"
|
||||||
|
|
||||||
// Version : Version, die Build Nummer wird in der main func geparst.
|
// Version : Version, die Build Nummer wird in der main func geparst.
|
||||||
const Version = "2.1.0.0101"
|
const Version = "2.1.0.0105"
|
||||||
|
|
||||||
// DBVersion : Datanbank Version
|
// DBVersion : Datanbank Version
|
||||||
const DBVersion = "2.1.0"
|
const DBVersion = "2.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user