Merge branch 'worktree-agent-a93010566d356e58c' into improvements

This commit is contained in:
2026-09-26 13:18:03 +10:00
17 changed files with 759 additions and 170 deletions
+7 -1
View File
@@ -172,6 +172,11 @@ func createXEPGMapping() {
if len(Data.XMLTV.Files) > 0 {
// Files that could not be read are collected here and removed after
// the loop; mutating Data.XMLTV.Files while iterating over it used
// to duplicate entries instead of removing them.
var failedFiles = make(map[string]bool)
for i := len(Data.XMLTV.Files) - 1; i >= 0; i-- {
var file = Data.XMLTV.Files[i]
@@ -185,7 +190,7 @@ func createXEPGMapping() {
err = getLocalXMLTV(file, &xmltv)
if err != nil {
Data.XMLTV.Files = append(Data.XMLTV.Files, Data.XMLTV.Files[i+1:]...)
failedFiles[file] = true
var errMsg = err.Error()
err = errors.New(getProviderParameter(fileID, "xmltv", "name") + ": " + errMsg)
ShowError(err, 000)
@@ -215,6 +220,7 @@ func createXEPGMapping() {
}
Data.XMLTV.Files = removeStrings(Data.XMLTV.Files, failedFiles)
Data.XMLTV.Mapping = tmpMap
} else {