Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alex47exe committed Jan 14, 2019
0 parents commit 2eaded2
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 0 deletions.
80 changes: 80 additions & 0 deletions Kodi Launcher.au3
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#NoTrayIcon

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=Kodi.ico
#AutoIt3Wrapper_Outfile=Kodi Launcher.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UPX_Parameters=-9 --strip-relocs=0 --compress-exports=0 --compress-icons=0
#AutoIt3Wrapper_Res_Description=Kodi Launcher
#AutoIt3Wrapper_Res_Fileversion=1.0.0.47
#AutoIt3Wrapper_Res_ProductVersion=1.0.0.47
#AutoIt3Wrapper_Res_LegalCopyright=2016, SalFisher47
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#AutoIt3Wrapper_Res_SaveSource=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#Region ;**** Pragma Compile ****
#pragma compile(AutoItExecuteAllowed, true)
#pragma compile(Compression, 9)
#pragma compile(Compatibility, vista, win7, win8, win81, win10)
#pragma compile(InputBoxRes, true)
#pragma compile(CompanyName, 'SalFisher47')
#pragma compile(FileDescription, 'Kodi Launcher')
#pragma compile(FileVersion, 1.0.0.47)
#pragma compile(InternalName, 'Kodi Launcher')
#pragma compile(LegalCopyright, '2016, SalFisher47')
#pragma compile(OriginalFilename, Kodi Launcher.exe)
#pragma compile(ProductName, 'Kodi Launcher')
#pragma compile(ProductVersion, 1.0.0.47)
#EndRegion ;**** Pragma Compile ****

; === UniCrack Installer.au3 =======================================================================================================
; Title .........: Kodi Launcher
; Version .......: 1.0.0.47
; AutoIt Version : 3.3.14.5
; Language ......: English
; Description ...: Kodi Launcher
; Author(s) .....: SalFisher47
; Last Modified .: January 01, 2019
; ==================================================================================================================================

#include <Array.au3>
#include <File.au3>

$Ini = @ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & ".ini"

$kodi_exe_run = IniRead($Ini, "Settings", "kodi_exe", "")
$kodi_exe_path_full = @ScriptDir & "\" & $kodi_exe_run
$kodi_exe_only = StringTrimLeft($kodi_exe_path_full, StringInStr($kodi_exe_path_full, "\", 0, -1))
$kodi_exe_path_only = StringTrimRight($kodi_exe_path_full, StringLen($kodi_exe_only)+1)
$kodi_exe_cmd = IniRead($Ini, "Settings", "kodi_cmd", "")

$sources_xml = FileOpen(@ScriptDir & "\Kodi\portable_data\userdata\sources.xml", 0)
$sources_xml_line = FileReadToArray($sources_xml)
FileClose($sources_xml)

Local $sources_xml_line_new[1]

For $i = 0 to UBound($sources_xml_line) - 1
If StringInStr($sources_xml_line[$i], ":\", 0) Then
If StringMid($sources_xml_line[$i], StringInStr($sources_xml_line[$i], ":\", 0) - 1, 1) <> StringLeft(@ScriptDir, 1) Then
_ArrayAdd($sources_xml_line_new, StringReplace($sources_xml_line[$i], StringInStr($sources_xml_line[$i], ":\", 0) - 1, StringLeft(@ScriptDir, 1)))
Else
_ArrayAdd($sources_xml_line_new, $sources_xml_line[$i])
EndIf
Else
_ArrayAdd($sources_xml_line_new, $sources_xml_line[$i])
EndIf
Next

FileDelete(@ScriptDir & "\Kodi\portable_data\userdata\sources.xml")

For $j = 1 to UBound($sources_xml_line_new) - 1
$sources_xml = FileOpen(@ScriptDir & "\Kodi\portable_data\userdata\sources.xml", 1)
FileWriteLine($sources_xml, $sources_xml_line_new[$j])
FileClose($sources_xml)
Next

ShellExecute($kodi_exe_path_full, " " & $kodi_exe_cmd & " " & $CmdLineRaw, $kodi_exe_path_only)

Binary file added Kodi Launcher.exe
Binary file not shown.
10 changes: 10 additions & 0 deletions Kodi Launcher.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ___ Kodi Launcher © 2016, SalFisher47


[Settings]

kodi_exe = Kodi\Kodi.exe
kodi_cmd = -p



Binary file added Kodi.ico
Binary file not shown.
19 changes: 19 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Kodi Launcher

Small - but nevertheless useful - launcher to help *Kodi* (formerly *XBMC*) run as standalone on external drives. It automatically detects the drive letter and changes it accordingly in Kodi's configuration files, so that a previous created library will be accessed from the correct path when the drive will be using a different letter.

------

**Requirements:**

1. Kodi from [https://kodi.tv](https://kodi.tv)

------

**Instructions:**

1. Install a clean copy of *Kodi* on the external drive containing movies, tv-shows, music, etc
2. Run *Kodi Launcher* and create or browse the library

------

0 comments on commit 2eaded2

Please sign in to comment.