Skip to content

Commit

Permalink
Merge pull request #129 from anthonylavado/fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonylavado authored Jun 2, 2024
2 parents 578c725 + 22e318f commit d852f3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Jellyfin.Windows.Tray/TrayApplicationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private void LoadJellyfinConfig()
XPathNavigator networkReader = networkXml.CreateNavigator();

_networkAddress = networkReader.SelectSingleNode("/NetworkConfiguration/LocalNetworkAddresses").Value;
_port = networkReader.SelectSingleNode("/NetworkConfiguration/HttpServerPortNumber")?.Value;
_port = networkReader.SelectSingleNode("/NetworkConfiguration/InternalHTTPPort")?.Value;
_baseUrl = networkReader.SelectSingleNode("/NetworkConfiguration/BaseUrl")?.Value;
}

Expand Down
19 changes: 9 additions & 10 deletions nsis/jellyfin.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -383,16 +383,6 @@ Function .onInit
StrCmp $R0 0 +3
!insertmacro ShowErrorFinal "The installer is already running."


; This stops the installer from starting if jellyfin.exe is open
StrCpy $1 "jellyfin.exe"
nsProcess::_FindProcess "$1"
Pop $R1
${If} $R1 = 0
!insertmacro ShowErrorFinal "Jellyfin is running. Please close it first."
Abort
${EndIf}

;Detect if Jellyfin is already installed.
; In case it is installed, let the user choose either
; 1. Exit installer
Expand Down Expand Up @@ -434,6 +424,15 @@ Function .onInit
SectionSetText ${CreateWinShortcuts} ""

NoService: ; existing install was present but no service was detected
; This stops the installer from starting if jellyfin.exe is open
StrCpy $1 "jellyfin.exe"
nsProcess::_FindProcess "$1"
Pop $R1
${If} $R1 = 0
!insertmacro ShowErrorFinal "Jellyfin is running. Please close it first."
Abort
${EndIf}

${If} $_SERVICEACCOUNTTYPE_ == "None"
StrCpy $_SETUPTYPE_ "Basic"
StrCpy $_INSTALLSERVICE_ "No"
Expand Down

0 comments on commit d852f3e

Please sign in to comment.