Skip to content

Commit

Permalink
Fix Dockerfile, Fix minor bugs in initializing phase
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelGoerentz committed Aug 26, 2024
1 parent d2ff15a commit d816140
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ VOLUME $THREADFIN_TEMP
EXPOSE $THREADFIN_PORT

# Run the Threadfin executable
ENTRYPOINT ${THREADFIN_BIN}/threadfin -port=${THREADFIN_PORT} -config=${THREADFIN_CONF} -debug=${THREADFIN_DEBUG} -branch=${BRANCH}
ENTRYPOINT ${THREADFIN_BIN}/threadfin -port=${THREADFIN_PORT} -config=${THREADFIN_CONF} -debug=${THREADFIN_DEBUG} -branch=${THREADFIN_BRANCH}
2 changes: 1 addition & 1 deletion html/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@
"threadfinDomain":
{
"title": "Threadfin Domain",
"description": "When not empty, this will rewrite the URLs in the new m3u to a FQDN.<br>It will also rewrite the shown DVR IP in the server info dialogue<br>Do NOT include http (ex: somedomain.com)</br>"
"description": "When not empty, this will rewrite the URLs in the new m3u to a FQDN.<br>It will also rewrite the shown DVR IP in the server info dialogue.<br>Do NOT include http (ex: somedomain.com)</br>"
},
"enableNonAscii":
{
Expand Down
9 changes: 5 additions & 4 deletions src/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ func Init() (err error) {
if err != nil {
ShowError(err, 1015)
}
err = checkFilePermission(System.Folder.Temp)
if err != nil {
ShowError(err, 1016)
}

// Separaten tmp Ordner für jede Instanz
//System.Folder.Temp = System.Folder.Temp + Settings.UUID + string(os.PathSeparator)
Expand All @@ -176,6 +172,11 @@ func Init() (err error) {
return
}

err = checkFilePermission(System.Folder.Temp)
if err != nil {
ShowError(err, 1016)
}

err = removeChildItems(getPlatformPath(System.Folder.Temp))
if err != nil {
return
Expand Down
8 changes: 3 additions & 5 deletions src/toolchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ import (
func checkFolder(path string) (err error) {

var debug string
_, err = os.Stat(filepath.Dir(path))

if os.IsNotExist(err) {
if _, err := os.Stat(filepath.Dir(path)); os.IsNotExist(err) {
// Ordner existiert nicht, wird jetzt erstellt

err = os.MkdirAll(getPlatformPath(path), 0755)
Expand All @@ -43,10 +41,10 @@ func checkFolder(path string) (err error) {
return err
}

return nil
} else {
return nil
}

return nil
}

// checkVFSFolder : Checks whether the Folder exists in provided virtual filesystem, if not, the Folder is created
Expand Down
60 changes: 30 additions & 30 deletions src/webUI.go

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/webserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ func StartWebserver() (err error) {
serverMux.HandleFunc("/data_images/", DataImages)
serverMux.HandleFunc("/ppv/enable", enablePPV)
serverMux.HandleFunc("/ppv/disable", disablePPV)

//serverMux.HandleFunc("/auto/", Auto)

showInfo("DVR IP:" + System.IPAddress + ":" + Settings.Port)


regexIpV4, _ := regexp.Compile(`(?:\d{1,3}\.){3}\d{1,3}`)
regexIpV6, _ := regexp.Compile(`(?:[A-Fa-f0-9]{0,4}:){3,7}[a-fA-F0-9]{1,4}`)
Expand Down
4 changes: 2 additions & 2 deletions threadfin.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ var GitHub = GitHubStruct{Branch: "Main", User: "marcelGoerentz", Repo: "Threadf
const Name = "Threadfin"

// Version : Version, die Build Nummer wird in der main func geparst.
const Version = "1.4.1-beta"
const Version = "1.4.0-beta"

// DBVersion : Datanbank Version
const DBVersion = "0.5.0"

// APIVersion : API Version
const APIVersion = "1.4.1-beta"
const APIVersion = "1.4.0-beta"

var homeDirectory = fmt.Sprintf("%s%s.%s%s", src.GetUserHomeDirectory(), string(os.PathSeparator), strings.ToLower(Name), string(os.PathSeparator))
var samplePath = fmt.Sprintf("%spath%sto%sthreadfin%s", string(os.PathSeparator), string(os.PathSeparator), string(os.PathSeparator), string(os.PathSeparator))
Expand Down

0 comments on commit d816140

Please sign in to comment.