[RELEASE] Playnite Launcher
#1
Playnite Launcher
This is an add-on to launch the fullscreen or desktop Playnite executable, with the option to close or minimize Kodi. After Playnite is closed or minimized, Kodi will restart or maximize. This is a Windows only add-on since there are no builds of Playnite for other OSes (as far as I know). Running pre and/or post Playnite scripts can be configured via the add-on settings.

Built upon the work completed by teeedub (Steam Launcher) and hoksilato2 (Kodi-Launches-Playnite). Most code was borrowed and modified from those other projects, but the Autohotkey launcher was so heavily modified that it's new code using Windows listeners instead of polling.

Image

General Settings:
  • Quit Kodi: Options are Yes, No and Ask.
  • Minimize Kodi: Select whether or not to minimize Kodi instead of quitting Kodi.
  • Set the path for the Kodi executable.
  • Set the path for both Playnite executables.
  • Force kill Kodi after X seconds (0 to disable).
  • Launch Playnite in desktop mode. This will toggle whether to run the fullscreen or desktop executable.

Image

Advanced Settings:
  • Delete and update userdata scripts on next run: When enabled, deletes the add-on scripts from the profile://addon_data directory and copies them from the add-on install directory the next time the add-on is run. This is handy if you want to go back to the default scripts or if the bundled scripts have been updated. This setting is set to disabled by default, and resets to the default when run once.
  • Run Kodi in portable mode.
  • Suspend Kodi's audio before running Playnite. If the add-on is configured to not quit Kodi, audio will be resumed after Playnite has been closed or minimized.
  • Configurable timeout for the "Busy Dialog" after running the add-on. Set to 0 to disable.
  • Toggle script update notification.
  • Toggle program file location checks for Playnite and Kodi.
  • Custom path for scripts: Set a custom directory (instead of Kodi's userdata folder) for the add-on to store its scripts. The add-on will copy the scripts to this folder if they're not found.
  • Run commands pre/post Playnite. The add-on will wait for the commands to finish before continuing. Running the scripts in the background can be accomplished at the operating system level.

Image

Customization:
The scripts used by this add-on can be customized to suit your needs. They reside in the kodi/userdata/addon_data/script.playnite.launcher/scripts folder. They are copied into that directory from the add-on install directory on first run and can be set to not be overwritten with updates. In playnite-launcher.ahk, the line playnite.launcher.script.revision=001 is what the add-on reads to determine if the scripts are up to date. Set the revision number to 999 if you've modified the script and compiled a new exe, and don't want them overwritten.

Source:
This is an open source project with source available on Github: https://github.com/robbforce/script.playnite.launcher
A readme can be found there as well.

Download:
Get the latest release from here: https://github.com/robbforce/script.play...ses/latest
Reply
#2
Will this be updated to kodi 19?
Reply
#3
(2021-03-20, 15:17)Crash82 Wrote: Will this be updated to kodi 19?
The addon has been updated to conform to Kodi v19 changes and the script has been updated to work with python 3. The same download link will take you to the latest release. Let me know if you encounter any weirdness.

Some notes:
- I changed the name of the minimise kodi setting to minimize kodi, so any old settings file will cause a complaint in the log. After installing the new addon, open the settings, make a minor change and save. I don't think that will remove the old setting so you might have to delete the old line manually
- When the launcher is set to Quit Kodi, and Kodi is first opened and the Playnite launcher is run, it doesn't seem able to close Kodi, even with a timeout set to force Kodi to close. On subsequent runs, Kodi is closed and re-opened as expected. This is something I'll need to look into further.
- I don't know if this is due to some strange interaction, but after the launcher was working again, I started getting a "distribution" error with the VersionChecker script. Google didn't turn up anything, so I replaced the the VersionChecker script from a fresh download of Kodi and the error went away...
Reply
#4
Finally got around to creating a repo and hosting the script. See here for instructions:
https://github.com/robbforce/kodi.repo.robbforce
Reply
#5
(2023-11-05, 21:54)robb_force Wrote: Finally got around to creating a repo and hosting the script. See here for instructions:
https://github.com/robbforce/kodi.repo.robbforce 

Thanks a lot for the guide. it is very useful to me
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Playnite Launcher0