Kodi Community Forum

Full Version: Advanced Kodi Launcher - Game and Emulators frontend for Kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
(2022-12-08, 09:29)iqbd Wrote: [ -> ]Thanks for the info. I'll keep digging around. I'll let you know if I figure something out. I'll also monitor for the AKL changes, as a custom scraper + launcher for AKL is probably the right solution for me, since that's effectively what I'm doing.
Yes I definitly think that that is the easiest way. You can pick one of mine and extend on that, or read the wiki for more details about how to make your custom scanner.
Let me know if you need some help.
(2022-12-09, 12:12)chrisism Wrote: [ -> ]
(2022-12-07, 12:28)Juppstein Wrote: [ -> ]Here's the log. Sequence was as follows:
  • Open Kodi
  • go to game library
  • remove existing launcher
  • create new launcher with retroart addon
  • enter retroarch path /usr/games/
  • enter config directory /home/kodi/.config/retroarch/retroarch.cfg
  • enter core directory /home/kodi/.config/retroarch/cores/puae_libretro.so
  • leave arguments field empty
  • enter game library and start game 
https://paste.ubuntu.com/p/CkbqkCQxmN/
I have updated the RC in the beta repository again. Could you try to set the retroarch path to the actual executable, not the directory. Alternative solution is to set the retroarch path to a shell script that does the actual execution. A nice solution with shell script on for example Librelec can be found in this post by @Wintermute0110, it is for AEL but since the basic approach is the same it might be something.
Notice that AKL will execute the script with the following arguments from your example: '-L "/home/kodi/.config/retroarch/cores/puae_libretro.so"', '-c "/home/kodi/.config/retroarch/retroarch.cfg"', '"/<path-to-rom>"'. First try setting the path to the executable (retroarch) though, see if that works.
I'll have to set up a linux solution for kodi / retroarch myself to test it. Currently only have android and windows test environments working, so I dont have a quick solution.
So for now I just updated the addon and removed/recreated the launcher again. Still no go here it seems. I'll try to dig deeper during the weekend if time permits.  Anyway. Here is the log. after hitting go on a game: https://paste.ubuntu.com/p/ywytbJrzTw/   In the short term I might just continue using an application launcher and enter the full command sequence in there. Seems like the faster way instead of fiddling around with bash files Smile
(2022-12-09, 12:17)chrisism Wrote: [ -> ]
(2022-12-07, 21:11)Juppstein Wrote: [ -> ]By the way, is it normal that NeoGeo MVS games dont get their name changed after they've been scraped with somethine like Screenscraper? They retain the name of the zip file here.
No it should actually apply the scraped title. Did you check the 'Ignore scraped titles' parameter when scraping? That might be a cause.
Do notice that currently AKL will only overwrite existing scraped metadata if the 'Overwrite existing files' parameter is on. I am going to make a separate flag for overwriting metadata, but for now this parameter applies to both assets as well as metadata.
Ah, that might be it. I will test that and see if it works. thanks so far!
What might be something new is that when I scrape roms I know get "failed to computer checksum" in a new window I have to confirm or the scraping process will abort. Dont think I had that before. It happend when re-scraping metadata only for amiga roms via Screenscraper. 

Code:
2022-12-10 16:16:51.257 T:12087    INFO <general>: [script.akl.screenscraper] akl.scrapers: Scraper cache dir set to: special://profile/addon_data/script.akl.screenscraper/cache/
2022-12-10 16:16:58.517 T:12087   ERROR <general>: [script.akl.screenscraper] resources.lib.scraper: zipfile.is_zipfile() returns False. Bad ZIP file.
2022-12-10 16:17:19.899 T:12087   ERROR <general>: [script.akl.screenscraper] resources.lib.scraper: zipfile.is_zipfile() returns False. Bad ZIP file.
2022-12-10 16:17:27.026 T:12098    INFO <general>: Skipped 1 duplicate messages..
2022-12-10 16:17:27.026 T:12098    INFO <general>: WEATHER: Downloading weather
2022-12-10 16:17:27.026 T:12099    INFO <general>: initializing python engine.
2022-12-10 16:17:27.641 T:12099    INFO <general>: CPythonInvoker(293, /home/kodi/.kodi/addons/weather.multi/default.py): script successfully run
2022-12-10 16:17:27.655 T:12099    INFO <general>: Python interpreter stopped
2022-12-10 16:17:45.900 T:12087   ERROR <general>: [script.akl.screenscraper] resources.lib.scraper: zipfile.is_zipfile() returns False. Bad ZIP file.
2022-12-10 16:18:59.068 T:12087    INFO <general>: Skipped 1 duplicate messages..
2022-12-10 16:18:59.068 T:12087   ERROR <general>: [script.akl.screenscraper] resources.lib.scraper: zipfile.is_zipfile() returns False. Bad ZIP file.
2022-12-10 16:19:10.894 T:12087   ERROR <general>: [script.akl.screenscraper] resources.lib.scraper: zipfile.is_zipfile() returns False. Bad ZIP file.
2022-12-10 16:19:30.135 T:2540  WARNING <general>: Unable to determine channel type. Defaulting to TV.
2022-12-10 16:19:58.942 T:12087    INFO <general>: Skipped 2 duplicate messages..
2022-12-10 16:19:58.942 T:12087   ERROR <general>: [script.akl.screenscraper] resources.lib.scraper: zipfile.is_zipfile() returns False. Bad ZIP file.
2022-12-10 16:21:08.670 T:12087   ERROR <general>: [script.akl.screenscraper] resources.lib.scraper: zipfile.is_zipfile() returns False. Bad ZIP file.

Though I can perfectly open the zip file in my OS and extract the files therein.

Edit: It seems this error appears when using the retroarch launcher akl addon. When using the application launcher way the errors do not appear.
Of course using the default launcher (app launcher) you can simply apply the commands yourself indeed. The retroarch launcher does basically the same but with predefined commands and some tricks to read out retroarch configurations to see which cores you have installed.
The screenscraper part does not depend in anyway on the retroarch launcher, so that cannot be the case. What happens here, looking at your logs for screenscraper, is that the python zipfile module does not recognize your zip file as such. You can enable the debug level logging on the screenscraper addon to get some more feedback about which zipfiles it is having issues with. This issue and your prior issues with the retroarch launcher makes it feel that it has to do with how kodi/python is trying to access your ROM files. Are they located on an external drive, network share or through a symbolic linked dir?
It might also simply be the case that the zip file isnt an actual zip file. Maybe a different archive format named .zip. Some stackoverflow post about that particular zip check command: https://stackoverflow.com/questions/1417...urns-false

When launching with retroarch it should store shell feedback in a text file in the addon data dir. If you go to the kodi userprofile directory, to /userdata/addon_data/script.akl.retroarchlauncher/reports/, you should find those txt files. Maybe they contain some more feedback from the shell when executing the retroarch command through Kodi.
Thanks, in that case I'll try around a bit to see where the error comes from. The files are definitively zip files and retroarch is able to play them perfectly. We'll see. 

By the way, I am not able to delete categories in AKL. Whenever I try it throws an error. This is from the log (using AKL from your repo, updated yesterday evening):
Quote:022-12-13 08:56:36.777 T:3828     INFO <general>: Skipped 2 duplicate messages..
2022-12-13 08:56:36.777 T:3828     INFO <general>: initializing python engine.
2022-12-13 08:56:37.322 T:3828     INFO <general>: CPythonInvoker(106, /home/kodi/.kodi/addons/plugin.program.akl/addon.py): script successfully run
2022-12-13 08:56:37.350 T:3828     INFO <general>: Python interpreter stopped
2022-12-13 08:56:37.422 T:2325     INFO <general>: [plugin.program.akl] resources.lib.services: {"category_id":"7087284b38a37fc6ecd5b013d0f21e5d"}
2022-12-13 08:56:39.962 T:2325    ERROR <general>: [plugin.program.akl] resources.lib.repositories: type: <class 'TypeError'> value: object of type 'int' has no len()
2022-12-13 08:56:39.962 T:2325    FATAL <general>: [plugin.program.akl] resources.lib.commands.mediator: Failure processing command "DELETE_CATEGORY"
                                                   Traceback (most recent call last):
                                                     File "/home/kodi/.kodi/addons/plugin.program.akl/resources/lib/commands/mediator.py", line 34, in sync_cmd
                                                       return a_command(args)
                                                     File "/home/kodi/.kodi/addons/plugin.program.akl/resources/lib/commands/category_commands.py", line 226, in cmd_category_delete
                                                       if category.has_items():
                                                     File "/home/kodi/.kodi/addons/plugin.program.akl/resources/lib/domain.py", line 867, in has_items
                                                       return len(self.num_romcollections()) > 0 or len(self.num_categories()) > 0
                                                   TypeError: object of type 'int' has no len()

I tried to create a bug report on github but saw that feature is not activated on the repo.
 
Hi,

I was able to get akl and the gamestream plugn installed, it was an issue with android 11 and nexus, so I swapped to android 9 and everything worked.

So how do I go about pairing to the gamestream PC. I am trying to use the python scripts. Where is the "Download the source code for AKL from github" What zip am I downloading? I am currently going to this page "https://github.com/chrisism/plugin.program.akl" clicking green code button and downloading zip. I am then going to the directory with cmd and trying to run "python -m venv .venv" but I get invalid syntax. I do have python installed and working.
(.venv) C:\Users\Mouse\Downloads\script.akl.nvgamestream-main\script.akl.nvgamestream-main>python ./resources/tools/create_certificates.py C:\Users\Mouse\Desktop
Traceback (most recent call last):
  File "C:\Users\Mouse\Downloads\script.akl.nvgamestream-main\script.akl.nvgamestream-main\resources\tools\create_certificates.py", line 19, in <module>
    from akl.utils import io
ModuleNotFoundError: No module named 'akl'

(.venv) C:\Users\Mouse\Downloads\script.akl.nvgamestream-main\script.akl.nvgamestream-main>pip install -r requirements.txt
ERROR: Could not find a version that satisfies the requirement kodi.tools==1.1.0 (from versions: none)
ERROR: No matching distribution found for kodi.tools==1.1.0


I tried in both the plugin github zip and the main AKL zip. both were extracted
(2022-12-13, 10:10)Juppstein Wrote: [ -> ]Thanks, in that case I'll try around a bit to see where the error comes from. The files are definitively zip files and retroarch is able to play them perfectly. We'll see. 

By the way, I am not able to delete categories in AKL. Whenever I try it throws an error. This is from the log (using AKL from your repo, updated yesterday evening):
Quote:022-12-13 08:56:36.777 T:3828     INFO <general>: Skipped 2 duplicate messages..
2022-12-13 08:56:36.777 T:3828     INFO <general>: initializing python engine.
2022-12-13 08:56:37.322 T:3828     INFO <general>: CPythonInvoker(106, /home/kodi/.kodi/addons/plugin.program.akl/addon.py): script successfully run
2022-12-13 08:56:37.350 T:3828     INFO <general>: Python interpreter stopped
2022-12-13 08:56:37.422 T:2325     INFO <general>: [plugin.program.akl] resources.lib.services: {"category_id":"7087284b38a37fc6ecd5b013d0f21e5d"}
2022-12-13 08:56:39.962 T:2325    ERROR <general>: [plugin.program.akl] resources.lib.repositories: type: <class 'TypeError'> value: object of type 'int' has no len()
2022-12-13 08:56:39.962 T:2325    FATAL <general>: [plugin.program.akl] resources.lib.commands.mediator: Failure processing command "DELETE_CATEGORY"
                                                   Traceback (most recent call last):
                                                     File "/home/kodi/.kodi/addons/plugin.program.akl/resources/lib/commands/mediator.py", line 34, in sync_cmd
                                                       return a_command(args)
                                                     File "/home/kodi/.kodi/addons/plugin.program.akl/resources/lib/commands/category_commands.py", line 226, in cmd_category_delete
                                                       if category.has_items():
                                                     File "/home/kodi/.kodi/addons/plugin.program.akl/resources/lib/domain.py", line 867, in has_items
                                                       return len(self.num_romcollections()) > 0 or len(self.num_categories()) > 0
                                                   TypeError: object of type 'int' has no len()

I tried to create a bug report on github but saw that feature is not activated on the repo.
Here is perfect and already looking into it. Already have a fix for this specific issue in the RC, but I stumble upon something new myself. But I will take it along in the RC releases.
(2022-12-17, 20:55)mousex110 Wrote: [ -> ](.venv) C:\Users\Mouse\Downloads\script.akl.nvgamestream-main\script.akl.nvgamestream-main>python ./resources/tools/create_certificates.py C:\Users\Mouse\Desktop
Traceback (most recent call last):
  File "C:\Users\Mouse\Downloads\script.akl.nvgamestream-main\script.akl.nvgamestream-main\resources\tools\create_certificates.py", line 19, in <module>
    from akl.utils import io
ModuleNotFoundError: No module named 'akl'

(.venv) C:\Users\Mouse\Downloads\script.akl.nvgamestream-main\script.akl.nvgamestream-main>pip install -r requirements.txt
ERROR: Could not find a version that satisfies the requirement kodi.tools==1.1.0 (from versions: none)
ERROR: No matching distribution found for kodi.tools==1.1.0


I tried in both the plugin github zip and the main AKL zip. both were extracted

Which python version do you have installed? For the import issue you will need to add a pip.ini file in your virtual env directory to be able to import my custom packages. For details on how you can check this url: https://dev.azure.com/jnpro/AKL/_artifac...onnect/pip
Do you have any experience with setting up virtual environment with python? This syntax should be okay, but maybe the alias or version is different. You can substitute python for python3 and see what that gives you. Try python --version or python3 --version. 
Some details about how to create a virtual env: https://docs.python.org/3/library/venv.html
Thanks for your help. Sorry no experiance in this.

Python version: Python 3.11.1

I have pip installed. So is pip.ini just a text doc with "[global] index-url=https://pkgs.dev.azure.com/jnpro/AKL/_packaging/akl_libs/pypi/simple/" renamed to pip.ini. Where is this placed? I have found the pip folder in %appdata%local.
So i think I have the pip.ini in the right folder, but now i get this

Looking in indexes: https://pkgs.dev.azure.com/jnpro/AKL/_pa...pi/simple/
Collecting kodi.tools==1.1.0
  Using cached https://pkgs.dev.azure.com/jnpro/5e7cdfe...ne-any.whl (12 kB)
ERROR: Could not find a version that satisfies the requirement Kodistubs==19.0.3 (from versions: none)
ERROR: No matching distribution found for Kodistubs==19.0.3

When I run pip install -r requirements.txt
Sorry to spam your thread, ignore 2 posts above. I got the pip.ini file sorted and working. "pip install -r requirements.txt" now fully completes. "python ./resources/tools/create_certificates.py c:\games\gamestream\" starts to run but stops at

(.venv) C:\Users\Mouse\Desktop\script.akl.nvgamestream-main\script.akl.nvgamestream-main>python ./resources/tools/create_certificates.py C:\Users\Mouse\Desktop\certs
Traceback (most recent call last):
  File "C:\Users\Mouse\Desktop\script.akl.nvgamestream-main\script.akl.nvgamestream-main\resources\tools\create_certificates.py", line 21, in <module>
    from resources.lib import crypto
ModuleNotFoundError: No module named 'resources.lib'
(2022-12-20, 00:52)mousex110 Wrote: [ -> ]Sorry to spam your thread, ignore 2 posts above. I got the pip.ini file sorted and working. "pip install -r requirements.txt" now fully completes. "python ./resources/tools/create_certificates.py c:\games\gamestream\" starts to run but stops at

(.venv) C:\Users\Mouse\Desktop\script.akl.nvgamestream-main\script.akl.nvgamestream-main>python ./resources/tools/create_certificates.py C:\Users\Mouse\Desktop\certs
Traceback (most recent call last):
  File "C:\Users\Mouse\Desktop\script.akl.nvgamestream-main\script.akl.nvgamestream-main\resources\tools\create_certificates.py", line 21, in <module>
    from resources.lib import crypto
ModuleNotFoundError: No module named 'resources.lib'
No problem. As said before, it helps others along the way too. Since I replied in a private message, here is for all the other users. 
You now have two certificate files and paired with the Nvidia Gamestream server. Both the files should be called or renamed to 'nvidia.crt' and 'nvidia.key'. They should be placed in a directory accessible by Kodi. 
You then startup AKL in Kodi, create a new ROM collection and assign the 'Nvidia Gamestream' plugin as the scanner. During the configuration wizard steps it will ask you for the location of the directory with the certificates. Same when assigning the Gamestream launcher.
When trying to use the MobyGames scraper with an API key entered in the settings of the scraper addon, the addon objects that no API was given. Here's the log:

https://paste.kodi.tv/alunucutur.kodi

Tried a re-scan for addons in AKL as well as a restart of Kodi after entering the API key.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16