Jump to content
LaunchBox Community Forums

Kodi addon for LaunchBox


Recommended Posts

This thread is now outdated, for the most recent versions of the plugin check @CoinTos's thread

Here is an addon for launching BigBox from within Kodi.

This started as copy/paste version of the Steam addon, and while it was a "quick and dirty" job it somewhat did the job.

@CoinTos then vastly contributed by doing a lot of cleanup and improvements in the script

 

Quote

1.4

Removed need to set Kodi location to allow support for Windows Store version of Kodi.
Option added to advance settings of plugin to change location of script EXE to fix issue with Windows Store Apps security restrictions.
Corrected ahk script revision comparison check for script upgrade notifications.
Timeout checks added to ahk exe script to prevent stalls and handle program crashes, etc.

1.3

Bugfix regarding splash screen detection along with some minor Kodi 17 related changes.

1.2

Removed 5 second sleep timer as it is not needed if splash is disabled and added check for the Big Box splash screen. Also optimized the script and prevent unnecessary delay.

1.1

Contribution from CoinTos : heavily modified the script. Everything that doesn't relate to BigBox has been removed and an update check has been added so you can use the bigbox updater without being kick back to Kodi when the installer launches. I also commented it but that is just out of habit.

1.0

First version

NOTE ON UPGRADING:  please make sure to go in the options and select "delete and update userdata scripts on next run"

script.launchbox.launcher-1.1.zip

script.launchbox.launcher-1.2.zip

script.launchbox.launcher-1.3.zip

script.launchbox.launcher-1.4.zip

Edited by ashramrak
  • Like 2
Link to comment
Share on other sites

@ashramrak Removed 5 second sleep timer as it is not needed if splash is disabled and added check for the Big Box splash screen. If found, it will wait till it to finishes before starting main monitoring loop to prevent WinNotExist detection bug between the time it takes the splash screen to close and big box main interface to start. This will also optimized the script and prevent unnecessary delay due to my last solution as I forgot you can disable the splash screen so that 5 second sleep could cause problems down the road to those that disabled it.

 

Edited by CoinTos
removed old download
  • Like 1
Link to comment
Share on other sites

On 10/18/2016 at 7:47 PM, CoinTos said:

@ashramrak Removed 5 second sleep timer as it is not needed if splash is disabled and added check for the Big Box splash screen. If found, it will wait till it to finishes before starting main monitoring loop to prevent WinNotExist detection bug between the time it takes the splash screen to close and big box main interface to start. This will also optimized the script and prevent unnecessary delay due to my last solution as I forgot you can disable the splash screen so that 5 second sleep could cause problems down the road to those that disabled it.

LaunchBoxLauncher-AHK.zip

Alright I'll update the plugin asap !

edit : updated OP with v1.2, thanks man !

Edited by ashramrak
Link to comment
Share on other sites

Sorry for yet another bug fix but I made a brain dead mistake that showed itself while I was adding a new system to my LaunchBox. Basically, with the splash screen enabled in Big Box the delay between the time when the splash screen closes and Big Box main window shows isn't fixed. This is very apparent when adding a new system because BigBox needs time to load/refresh all the new images before it shows itself causing an unknown delay and therefore a fixed sleep timer was bad idea on my part.

Changes:

  • Replaced Sleep delay with WinWaitActive in splash detection to fix it from leaving the check too soon due to varying delay between the splash screen closing and Big Box opening
  • Added link to this forum thread to script header

 

Edited by CoinTos
removed old download
Link to comment
Share on other sites

On 10/25/2016 at 5:21 PM, CoinTos said:

Sorry for yet another bug fix but I made a brain dead mistake that showed itself while I was adding a new system to my LaunchBox. Basically, with the splash screen enabled in Big Box the delay between the time when the splash screen closes and Big Box main window shows isn't fixed. This is very apparent when adding a new system because BigBox needs time to load/refresh all the new images before it shows itself causing an unknown delay and therefore a fixed sleep timer was bad idea on my part.

Changes:

  • Replaced Sleep delay with WinWaitActive in splash detection to fix it from leaving the check too soon due to varying delay between the splash screen closing and Big Box opening
  • Added link to this forum thread to script header

LaunchBoxLauncher-AHK.zip

I tried it and kodi opens right away as soon as the LB upgrade window is displayed (setup has detected that launchbox is currently open, blablabla close it then click ok to continue)

Link to comment
Share on other sites

17 minutes ago, ashramrak said:

I tried it and kodi opens right away as soon as the LB upgrade window is displayed (setup has detected that launchbox is currently open, blablabla close it then click ok to continue)

Alright, will look at the splash and upgrade check now.

Edit:  Actually sound like the delay on setup windows is too short.  Can you try changing on line 73 from 3 to 5 and recompile just to check?

Edit 2: As I run with solid state drives, the installer loads instantly so 3 second wait after bigbox exits is more than enough but might not be enough for other systems. I might to need edit the kodi script as well to make that an option configurable to set under advance settings.

Edited by CoinTos
Link to comment
Share on other sites

On 10/27/2016 at 10:13 PM, CoinTos said:

@ashramrak Here is a fix for you to try. It checks for the setup error message and attempts to correct the problem by trying to close BigBoxes process and sending enter to the dialog box.

 

 

LaunchBoxLauncher-AHK.zip

I tried it and it behaves exactly the same

Maybe we should keep it simple and just consider that it doesnt works with the upgrade process ? I mean it's not a deal breaker, and at the same time I don't have the feeling anybody really cares around here :ph34r:

Edited by ashramrak
Link to comment
Share on other sites

Thought of better solution last night for the upgrade monitoring by checking the launchbox updates folder for a freshly downloaded update instead of waiting for an installer to launch thus removing the delay for kodi starting back. So I will submit that for testing in a couple of days. I know why it didn't work for you as well, your systems is faster and I am guessing your library is larger then expected so I should have grouped the winwait check for both error pop up and normal installer window. But there is no point in submitting a fix for that as I am going to rewrite it anyways. If that doesn't work for you then, ah well, we can remove the update check but I am pretty confident that this will cover all of BigBox's behaviors.

Link to comment
Share on other sites

@ashramrak Ok, here is the rewritten scripted with the new updater check. This rewrite also removes the delay at the end of old one when no update was downloaded. Please try it out because I have tried it both on my laptop (i5 with hdd) and htpc (i3 with ssd) but can't get the error message you get to show so I need to know your results to see if my attempt to handle the error works.

Edit: File updated to correct the script to handle a situation where you are running a beta, get an upgrade yes/no window to an official but after reloading get another beta yes/no upgrade window. If you had selected yes it would fail to handle it properly as the script assumed 1 update per script launch. My bad, didn't really think about this till Jason released the 7.0 betas.

 

 

 

Edited by CoinTos
removed old download
Link to comment
Share on other sites

On 11/1/2016 at 8:08 PM, CoinTos said:

@ashramrak Ok, here is the rewritten scripted with the new updater check. This rewrite also removes the delay at the end of old one when no update was downloaded. Please try it out because I have tried it both on my laptop (i5 with hdd) and htpc (i3 with ssd) but can't get the error message you get to show so I need to know your results to see if my attempt to handle the error works.

Edit: File updated to correct the script to handle a situation where you are running a beta, get an upgrade yes/no window to an official but after reloading get another beta yes/no upgrade window. If you had selected yes it would fail to handle it properly as the script assumed 1 update per script launch. My bad, didn't really think about this till Jason released the 7.0 betas.

 

LaunchBoxLauncher-AHK.zip

Worked for me as well on both my laptop and htpc, so I just updated the OP with the new version of the addon xD

Link to comment
Share on other sites

2 hours ago, ashramrak said:

Worked for me as well on both my laptop and htpc, so I just updated the OP with the new version of the addon xD

Awesome, one problem I edited my last post late last night with a new revision (17) to fix how launchbox/bigbox handle upgrades. The one you included only assumes 1 upgrade per ahk script launch, but apparently if you are running a beta before the official and there is another beta after the official, it will make you download the official, then offer the beta which break the 1 upgrade assumption. Had to change 2 variables to fix the script to handle that so you just got swap rev 16 for 17 in 1.3 and all is well, no other changes were made.

Link to comment
Share on other sites

5 hours ago, Ruester said:

I know this may be another can of worms, But I am unable to get this to work with the Windows APP Version of Kodi...Any Ideas or are you able to get it to work and it's just me...

No, it's not you. This plugin and ahk script/exe wasn't written to support the Windows Store version of Kodi as that uses the UWA container and is a totally different beast then the regular Kodi windows installer. I do plan to try and support it but was waiting for a stable/RC version of Kodi 17 to make sure they were done playing with UWA container. It will likely require changes to both the plugin and ahk to support it (if it is possible) but I won't know that for sure till I get some time to look into how the container/app works. So at this time, I recommend the standalone windows installer of Kodi if you wish to use the current plugin.

Link to comment
Share on other sites

@Ruester If you are willing to test I have posted a 'beta' version with support for Windows Store App of Kodi. It works both with the original Kodi installer and the Windows store versions as the need to set your Kodi directory has been removed and a detect has been written into the autohotkey script instead.

 

NOTICE: THE BELOW ATTACHMENT IS A BETA VERSION FOR ANYONE THAT WISHES TO TEST AND REPORT. SEE FIRST POST FOR OFFICIAL.

 

Edited by CoinTos
Download removed, see new beta post further down
Link to comment
Share on other sites

23 hours ago, CoinTos said:

@Ruester If you are willing to test I have posted a 'beta' version with support for Windows Store App of Kodi. It works both with the original Kodi installer and the Windows store versions as the need to set your Kodi directory has been removed and a detect has been written into the autohotkey script instead.

 

NOTICE: THE BELOW ATTACHMENT IS A BETA VERSION FOR ANYONE THAT WISHES TO TEST AND REPORT. SEE FIRST POST FOR OFFICIAL.

script.launchbox.launcher-1.3.95.zip

I will try this tonight! Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...