Open soraxas opened 3 years ago
When addon.xml is updated to include the import python 3 line, Kodi versions below 19/Matrix aren't able to install the plugin anymore. And without that line Kodi 19 isn't able to install the plugin. I think this issue should be addressed before merging the python 3 version into the repo. This is also probably why ResolveURL commented out the python 3 import line
That's true, but seems the only way to support both platforms (kodi < 19.0 and kodi >= 19.0) is to maintain two branches (one with the python 3.0.0
line and one without). Other plugins (such as Netflix https://github.com/CastagnaIT/plugin.video.netflix/issues/975) chooses to continue development on the new platform and only apply patches to the older branch.
From my understanding, kodi would be able to install the correct version from the hosted repository depending on the existence of the <import addon="xbmc.python" version="3.0.0" />
line. Perhaps the repository can host both versions that works on kodi < 19.0 and kodi > 19.0? (Given that, all future patches will need to be applied on both branches.)
Yeah I agree on having two versions, and I believe the two versions will need different addon id's in addition to the different Python import statements in their addon.xml. From how the repo is setup, it's also probably best to have Python 2 and Python 3 versions side by side instead of different branches. I think it's up to @aznhusband on how to do this
Agree, this repository's layout should be suitable for hosting both versions side by side.
How does one update the addon.xml
in the .zip
which is uploaded to Kodi so that it picks up the correct branch and updated addon.xml
? I'm using SHIELD TV Pro.
You will need to zip the folder src/plugin.video.icdrama
(or run src/mkdist.sh
which creates zip files for you) from the PR (simply updating addon.xml
does not works as the src needs to be python3 compliant as well).
@soraxas I did this, I could install one of the zips, but not the other (icdrama zip). I simply ran the mkdist.sh
, took the zips, and uploaded to the SHIELD TV Pro, and installed via zip. Any help, much appreciated!
What does it says in the log when it fails to installs?
You will needs to:
<import addon="xbmc.python" version="3.0.0" />
line), then zip the entire folder for installation src/plugin.video.icdrama
for installationscript.module.resolveurl
is the dependency for icdrama, and I suspect your installation fails because you haven't done step 1 yet?
What does it says in the log when it fails to installs?
You will needs to:
- Clone https://github.com/jsergio123/script.module.resolveurl and modifies it as stated (i.e. Uncomment the
<import addon="xbmc.python" version="3.0.0" />
line), then zip the entire folder for installation- Clone this PR and zip
src/plugin.video.icdrama
for installation
script.module.resolveurl
is the dependency for icdrama, and I suspect your installation fails because you haven't done step 1 yet?
Hi Soraxas,
Just wanted to let you know your instructions worked, thank you for your quick PR and link to modify the resloveurl. Will use this quick fix till we figure out how to do the python 2/3 side by side thing. Muchly appreciated! The wife is happy again :) I"m also using Shield TV Pro and Kodi auto updated to 19.
Thanks for reporting @Ero-Sennin-Jiraiya and I'm glad that it works :)
Hi @soraxas , I managed to get this working but I made a Frankenstein to do so. Basically I took your suggestion with addon.xml and your PR here but for whatever reason I couldn't install on Kodi, it kept telling me "invalid structure".
In order to fix this, I took @boleanly 's changes and zipped them up and it worked. I'm genuinely confused what's the difference here.
Oh, I've encountered that invalid structure issue too. Not with this PR though but with my own stuff. For me, the Kodi log suggests that the zip can't be read. Re-zipping the folder or restarting Kodi seems to fix it. Not too sure though.
I've also done some testing with commenting out the Python import statement. With it commented out, the add-on can be sideloaded as a zip in both Kodi 18 & 19. Behavior in a repo still needs to be tested though. I also pushed a crude Py 2 backwards compatibility patch to my Kodi 19 branch
I have been running it as well, I had to uninstall the apps that weren't compatible with Kodi 19 to get it running and do some manual updates to get rid of the invalid structure issue. It's working well with no issues now on the newer Nvidia Shield TV. The zip file still had the old xbmc version (as listed in the comments above) so I had to play around a bit there <import addon="xbmc.python" version="3.0.0"/>
. Cheers Guys !! :)
What does it says in the log when it fails to installs?
You will needs to:
- Clone https://github.com/jsergio123/script.module.resolveurl and modifies it as stated (i.e. Uncomment the
<import addon="xbmc.python" version="3.0.0" />
line), then zip the entire folder for installation- Clone this PR and zip
src/plugin.video.icdrama
for installation
script.module.resolveurl
is the dependency for icdrama, and I suspect your installation fails because you haven't done step 1 yet?
@soraxas I did this but it still doesn't work. Error when trying to install the .zip
via Kodi. Does the .zip
have the zip the folder itself or just the files within it (I just zipped files). Maybe due to it not being zipped at the directory level?
Someone should create a PR with the zips on a branch 🤞🏼
@o6uoq You have to zip the folder itself. So the root of the zip should just be /plugin.video.icdrama
Yeah I agree on having two versions, and I believe the two versions will need different addon id's in addition to the different Python import statements in their addon.xml. From how the repo is setup, it's also probably best to have Python 2 and Python 3 versions side by side instead of different branches. I think it's up to @aznhusband on how to do this
I agree on this to maintain two versions. Is this PR already Matrix-compatible? Hopefully it is so we can quickly have two version. Last week I had to check how to downgrade to Kodi 18 on a chromecast to install this addon. I had to do it twice because Kodi was updating itself automatically to 19 again because I forgot to disable auto-update 😒 .
If we want to maintain two versions maybe we can bump the Matrix to version 2.2.0+matrix.1
and keep Leia version 2.2.0
as suggest in https://forum.kodi.tv/showthread.php?tid=351745&pid=2932787#pid2932787.
I believe it is possible to maintain two versions by having two addon.xml/md5 in the repository addon.xml using the <dir
> element (see https://forum.kodi.tv/showthread.php?tid=359041&pid=2994712#pid2994712).
To be able to install icdrama
to Kodi 19 Matrix we need a Matrix-compatible version of script.module.resolveurl
as well. As long as the maintainer of script.module.resolveurl
isn't providing it, it will be hard to complete it.
Option/workaround is to maintain a custom version of script.module.resolveurl
where we manually change the addon.xml.
For now I stick to Kodi 18 and will continue track this PR. Let me know if you need any help.
I spent my whole day trying to figure out if we can install icdrama
including resolveurl
. It seems possible without having a custom version of resolveurl
.
This is possible by including gujal's dir into the repository:
<dir>
<info compressed="false">https://raw.githubusercontent.com/Gujal00/smrzips/master/addons.xml</info>
<checksum>https://raw.githubusercontent.com/Gujal00/smrzips/master/addons.xml.md5</checksum>
<datadir zip="true">https://raw.githubusercontent.com/Gujal00/smrzips/master/zips/</datadir>
</dir>
We probably don't even need to maintain two version if we can make icdrama Py 2/3 compatible.
@boleanly @soraxas any idea if that is possible? Check for py3-only statements and try to rewrite it to something py2/3 compatible code?
This is how I've tested:
<addon id="plugin.video.icdrama" version="2.2.0+matrix.1" name="Icdrama" provider-name="aznhusband, dumbo0001, s_h, boleanly, mugol, General-Meow, cthlo">
<requires>
<import addon="script.module.html5lib" version="0.999.0"/>
<import addon="script.module.beautifulsoup4" version="4.3.2"/>
<import addon="script.module.requests" version="2.9.1"/>
<import addon="script.module.resolveurl" version="5.0.38"/>
</requires>
...
5.1.26
By uninstalling and installing Kodi 18 I was also able to install icdrama as well. Opening icdrama resulted in an error. Probably some code which only works with Python 3.
from urllib.parse import parse_qsl
ImportError: No module named parse
I believe we can use some helper libraries to make it py2/py3 compatible.
resolveurl
is using six
but future
can also be used.
@dumbo0001 My Kodi 19 branch of the fork is Py2/3 compatible. It uses a built-in library to find the Python version and if-else statements to divert to Py 2 or Py 3 code. It's kinda hacky but is simpler than using an external library. But in this case, future code may need more work to be Py 2/3 compatible
Sorry for the late reply. And yes, by sideload I meant directly installing as zip.
@boleanly I've used the script.module.future to make minor changes to this pull request to make it py2/py3 compatible. If it get merged to the branch of @soraxas this pull request will get updated and we can probably make it part of this repository. @aznhusband will need to do the final checking.
I've already did some tests with Leia and Matrix. Both seems to be working. Maybe you can also test.
I have merged @dumbo0001 's branch as I can confirm that it works in Matrix and seems to robustly uses python's future statement.
As some others had suggested, I'm not sure whether omitting <import addon="xbmc.python" version="3.0.0" />
would still function as expected in the future; but for now, I think this approach of making it py2/py3 compatible would be the most suitable one.
I have merged @dumbo0001 's branch as I can confirm that it works in Matrix and seems to robustly uses python's future statement.
As some others had suggested, I'm not sure whether omitting
<import addon="xbmc.python" version="3.0.0" />
would still function as expected in the future; but for now, I think this approach of making it py2/py3 compatible would be the most suitable one.
@soraxas if I use the same branch, will it now work? I didn't have luck with bundling the .zip
myself. I am on an NVidia Shield TV Pro.
The new update is only to make it compatible with Kodi v18, and it had aways worked for me in Kodi v19 so I'm not sure if the new update will make any differences. Having said that it doesn't hurt to try and test it out right.
Remember what @boleanly had said when you are zipping it
@o6uoq You have to zip the folder itself. So the root of the zip should just be /plugin.video.icdrama
And it's always better to install the plugin in a clean state (e.g. uninstalling previous versions and restarts kodi)
Is any new ZIP (patch) version released & will work on KODI Matrix 19? TKS!!!!!!!
@tofufi It has not been merged so it won't be released yet. If you need it at this moment you can create the zip yourself from the PR.
Hi @soraxas ,
A noob here.
Could you help me in creating the zip file from the pr.
Hi @soraxas ,
A noob here.
Could you help me in creating the zip file from the pr.
I needed it too. My Chromecast TV Kodi will update from 18 to 19. Even I downgrade to 18.0, the very next day it will be updated to 19.9 again. Every night I had to downgrade to 18. Killing me. PLS help!!!!!!!!!!!!!!!
Thanks @dumbo0001 & @soraxas & @boleanly !!! I downloaded the PR branch 6db5479 and zipped at with root containing src/plugin/video.icdrama. Manually installed the zip to Kodi Matrix (19). Only think I needed was update my ResolveURL in Kodi Matrix to 5.1.0 to works. I hope @aznhusband could just do a verify the PR and merge; unless he has other plans to make icdrama compatible with Kodi Matrix.
Has anyone heard from aznhusband about this update problem? It seems like he's done with this project.
Any update to this issue? It's been a few months since I've tried -- any new updates as to things to try/working solutions albeit the GitHub issue is still open?
I have no intention to take it over from @aznhusband as his recent commit is still relatively recent (7 months ago).
Sorry about the fuss of the recently pushes, but in the meantime, I've integrated a github action that automatically creates the correct zip file and create releases that are accessible at the PR branch at https://github.com/soraxas/aznhusband.github.io/releases. They are named in the format of drama-plugin-for-kodi_SHA-${...}.zip
where ${...}
is the corresponding short SHA of the commit.
If you are in need to just download the zip and install it in Kodi 19 you can just find the latest release at the release page and install it directly on kodi.
Soraxas, you're my hero! Thank you so much for this!
Hi Saraxas, thank you so much for all your awesome works. I had tried installing the zip files as follows,
It should just be the drama-plugin-for-kodi_SHA${xx}.zip
. What did the error says?
Hi Soraxas, thank you for the quick reply. The error is as follows, Failed to install Add-on from dependency on script.module.html5lib version 0.999.0 could not be satisfied.
That comes from failing to install the required dependencies
@dumbo0001 can you confirm that the changes made to src/plugin.video.icdrama/addon.xml
at 2006b0aa94f6f2ac61f995e799f529143b1996b1 is still python2/3 compatible?
Hi Soraxas, thank you for the quick reply. The error is as follows, Failed to install Add-on from dependency on script.module.html5lib version 0.999.0 could not be satisfied.
@bumperbee, I just installed this on Kodi 19.1 on a new firestick and it installed fine. Make sure you're using the drama-plugin-for-kodi_SHA${xx}.zip file. Let me know if you have any questions on this install. I might be able to assist as well.
Hi Cdkao, thank you for your reply. I just tried again by the followings,
Hi Cdkao, thank you for your reply. I just tried again by the followings,
- Set Kodi to Auto update in Setting (previously set to 'Do not auto update but notify if there is any update')
- Change update from 'Only from Kodi repository' to 'Any repository'
- Download zip file 'drama-plugin-for-kodi_SHA-2de26eb' again. Which is the same size, at 33Kb.
- Open Kodi v19.1.
- Select Add-ons on the left
- Select addon's logo at top-left corner
- Select 'Install from zip file'
- Find zip file in appropriate directory and select it to begin the installation
- The same error appears Best Regards
Sorry for the late reply. Your steps look correct. For me, I didn't have to do steps 1 and 2. What type of device are you using? I did this on two firesticks without any issue.
Hi Cdkao & Everyone, mine is A95X Max. All along the DNS setting in router is set to google DNS, will this affect? Thank you
Hi Cdkao & Everyone, mine is A95X Max. All along the DNS setting in router is set to google DNS, will this affect? Thank you
No that should be fine. I'm not sure what the problem is and your steps look correct. Maybe delete Kodi 19.1 and reinstall?
Thanks @cdkao, yes I agree that it shouldn't matter.
@bumperbee Either try @cdkao's suggestion or try to manually install all the necessary dependencies (i.e. in the example that you had given it begins with html5lib
https://mirrors.kodi.tv/addons/krypton/script.module.html5lib/). Manually download and install the zip.
I did download the ‘script.module.html5lib’ and installed it. Then installed the ‘IcDrama’ zip file and this time it shows a different error that the ‘script.module.resolveurl v5.1.0‘ is missing. I will try again to reinstall Kodi and see if there is any changes. Thank you
I did not reinstall Kodi but found the zip file ‘script.module.resolveurl v5.1.0‘ online. I am able to install it and also ‘IcDrama’. This time it says there is ‘an error & look at the log file’ which I search everywhere but to no avail. Thank you
That comes from failing to install the required dependencies
@dumbo0001 can you confirm that the changes made to
src/plugin.video.icdrama/addon.xml
at 2006b0a is still python2/3 compatible?
@soraxas I believe it should but I haven't tested anymore. On a daily basis I am still using Kodi 18 so can't confirm it. Did you encounter problems with the changes in your branch? I believe you already merged it.
Yeah it is working great for me without any installation issues whatsoever on Matrix Kodi 19.
@bumperbee are you still having issue with it? For a fresh install of kodi, it might be worth to install resolveurl
's reposityr https://github.com/Gujal00/smrzips before attempting to install IcDrama (such that you don't have to manually install resolveurl
), because resolveurl
is one of the necessary dependencies that does not exist in the official Kodi repository.
Yes, I did re-installed and still unsuccessful
Can you attach your log file? For example, you can have a look at this guide to see how to extract the log.
Pinned:
Latest zipped-release can be found here: https://github.com/soraxas/aznhusband.github.io/releases
This PR converted the repository base to be compatible with Python3 (since Kodi 19.0 dropped supports for python2), and fixes some of the breaking changes in kodi 19.
That includes the unicode issue and the depricated keyword argunment in
ListItem
(see https://forum.kodi.tv/showthread.php?tid=354761 for the issue and https://codedocs.xyz/xbmc/xbmc/group__python__xbmcgui__listitem.html#gad3f9b9befa5f3d2f4683f9957264dbbe for the API).*The following is not necessary after merging @dumbo0001's branch to this PR
Since the dependencies needs to be compatible with Kodi 19.0,addon.xml
had been updated to use the matrix version of upstream package (exceptscript.module.resolveurl
where the 5.1.25 is compatible with kodi 19, but it needs to uncomment a line from its master branch to allows kodi 19 install the package):addon.xml
fromscript.module.resolveurl
needs to be modified fromto
Perheps a PR is needed on
script.module.resolveurl
(maybe a separate branch for kodi19) to make installnation easier for end-user. The PR had been checked on PC and Android TV kodi 19 with icdrama.