-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 2.x support - Kodi <19 #2
Comments
-- reply above this line --
DEAR OPENSUBTITLESDEV/SERVICE OPENSUBTITLES-COM,
────────────────────────────────────────────────
Hi,
Oh, you mean this current extension doesn't work prior to kodi 19 ?
this extension is just a fork of the very old original extension that's been around
forever, I don't even know for what python version it was made.
cheers
os_dev
Your OpenSubtitles.org Team,
──────────────────────────────────────────────────────────────────────────────────────────
We hope this response has sufficiently answered your questions. If not, please do not send
another email. Instead, reply to this email or [l̲o̲gi̲n̲ t̲o̲ yo̲u̲r̲ a̲c̲c̲o̲u̲n̲t̲][1] for a complete
archive of all your support requests and responses.
…---------------------------------------------
[1] http://support.opensubtitles.org/view.php?auth=o1x5rdaaaftrmaaaIU6GS30LDXN1vA%3D%3D
Ref-Mid: ***@***.***
|
@opensubtitlesdev @jujudellago Thanks for reply! Yes.. Currently, this addon is compatible with Kodi > 18, since its written in python3. Historically between all Kodi's prior to k19, there is python2 under hood, since k19 and after, python3. So there was quite a lot addons, which needs to be updated, and usually splitted into branches before and after k19, ie. python2 and python3 branches. I think a LOT of people use original OS addon, which using old API, and still being on Kodi version < 19. If I can guess, that this old API will be shutdowned, old addon will break. Kodi > 19 users just install this new one, opensubtitles.com from Kodi official repository, but until this new addon opensubtitles.com will be backported for python2, rest of users will be in dark. So I wondered, if there is thought about python2 version for older Kodi's, or they are considered as obsolete and deprecated. |
The extension was written in python 2, less than 10 lines of change to make
it python 3 compatible
Really not the time to deal with that now sorry, if somebody need i just
have to go back 2 git commits and make an archive
Le mar. 13 sept. 2022 à 14:45, JimmyS83 ***@***.***> a écrit :
… @opensubtitlesdev <https://github.com/opensubtitlesdev> @jujudellago
<https://github.com/jujudellago>
Thanks for reply!
Yes.. Currently, this addon is compatible with Kodi > 18, since its
written in python3.
Historically between all Kodi's prior to k19, there is python2 under hood,
since k19 and after, python3. So there was quite a lot addons, which needs
to be updated, and usually splitted into branches before and after k19, ie.
python2 and python3 branches.
I think a LOT of people use original OS addon, which using old API, and
still being on Kodi version < 19. If I can guess, that this old API will be
shutdowned, old addon will break.
Kodi > 19 users just install this new one, opensubtitles.com from Kodi
official repository, but until this new addon opensubtitles.com will be
backported for python2, rest of users will be in dark. So I wondered, if
there is thought about python2 version for older Kodi's, or they are
considered as obsolete and deprecated.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACIJBNFCW5JRJHG4QKWMDV6BZPVANCNFSM6AAAAAAQGXNIPE>
.
You are receiving this because you were mentioned.Message ID:
<opensubtitlesdev/service.subtitles.opensubtitles-com/issues/2/1240620296@
github.com>
|
im using retropie (kodi leia) and if i try to install this from the zip i will get an issue not being able to satisfy dependencies due to python3 im assuming. Just hit on thisbe cause opensubtitles.org API has just ended its support few days ago. |
Hi, I am also stuck with kodi leia (because that is the newest version that supports HD video decoding on a RaspberryPi3). According to @opensubtitlesdev @jujudellago, it should be easy to backport this addon... but that was with code of 2 years ago, and the py2 ancestor is not in this repo history 😢 Therefore I tried to just convert the py3 code to py2 with the help of 3to2 and then some additional manual changes.
UPDATE: I got it working (I can search and download in using Kodi Leia). Regarding distribution/installation: I am not familiar with the details of submission of kodi plugins to official repos, so for now anyone interested can get it from my fork and install it from zip. If there is interest from the official devs to distribute this for Kodi<19, I'd be happy to contribute if they let me know how. |
I was hoping to use your python 2 version but I can't find a way to login... Is there a workaround to get my credentials in your python 2 version? |
there was really just tiny syntax changes to switch from python 2.0 to 3.0 I'm a php and ruby developper, I learned just enough python to finish this plugin. I can help out but please learn the basics of python, try to figure out what is happening in the plugin, learn where is the log file, and how to put informations in it, then the usage of the api is very simple. |
Hi @opensubtitlesdev , as I mentioned in the "update" of my message, I already managed to solve the issues, and my version is working fine (as far as I can tell). Note that the code is py2 only so I'd say that it can't be merged with the original one. I submitted the backport to the leia branch of xbmc/repo-scripts repo but if you (@opensubtitlesdev) would prefer to do that yourself, or you prefer that I use a different addon ID, just let me know (my intention is to constructively contribute, not to highjack the code 😅 ). In the meanwhile, my releases can be downloaded from my github project |
if you refer to login to opensubtitles.com, then the procedure is the same as with the py3 version: you need to first get the credentials by visiting https://www.opensubtitles.com (click on "register") Once you have your credentials, you can enter them via the configuration menu for this addon in Kodi |
oh sorry I didn't see the reply saying you solved the problems.... I think it should be fine the way you named and submitted the addon. no issue for us if you manage that branch, more like thank you for taking care of it, it's nice to have a version for the older kodi. will keep in touch if there was important changes in future releases |
I think my Kodi setup is really too old to expect that these things can be fixed. I am still on Kyrpton, not Leia, but as they run the same python version I hoped it was compatible... Anyway, reverted back to my very old Kodi setup. I'm still rocking 17.6 as on my 6 year old philips android TV. I tried updating several times but I have issues playing h265 files with kodi >17.6... I tried updating once more a few days ago but reverted back again to 17.6... It's a shame 17.6 is working flawlessly and more up to date version of kodi are giving issues... I just added a few more subtitle providors to emby and switched to bsplayer subtitles + addicted in the case something isn't picked up by emby |
Ah sorry. As I mentioned, this was my first contact with kodi addon development, so I did not really investigate the API differences between kodi versions: my backport approach was just to fix the errors as I saw them on my Leia system. I am afraid I do not have any krypton system around...
I see. In Kodi 18, the OS.com credentials end up stored in:
where In my case it looks as follows (redacted): <settings version="2">
<setting id="APIKey" default="true">AN_API_KEY</setting>
<setting id="foreign_parts_only" default="true">include</setting>
<setting id="hearing_impaired" default="true">exclude</setting>
<setting id="machine_translated" default="true">exclude</setting>
<setting id="OSpass">MY_OS_COM_PASSWORD</setting>
<setting id="OSuser">MY_OS_COM_USER</setting>
</settings> I do not know if the file is the same or similar for kodi 17 but if so, you could try editing it and replacing the values of I hope that helps |
Thanks! I'm gonna try to install 17.6 on an emulator when I have a holiday next week and will look into this! It's hard debugging on an Android tv to be honest... I know I can attack an USB mouse but the emulator will make sure I don't always have to revert back on my working setup |
Just for closure: the PR to the official repo was rejected (they are not accepting new addons for old kodi versions), so I'll keep distributing it in https://github.com/cpascual/service.subtitles.opensubtitles-com/releases. |
Thanks for the update. As it's pretty common to have to trick a little to get things working with kodi, specially with older versions, it should be acceptable for users to install this from zip. I'm preparing a tutorial/faq dedicated to kodi, will link your version. |
Hi,
Are you interested to make a branch for Python2, used until Kodi19? There is quite a lot of devices on Kodi's <19
The text was updated successfully, but these errors were encountered: