Looking for your other tickets?
Sign In or register for an account for the best experience on our help desk.

[opensubtitlesdev/service.subtitles.opensubtitles-com] Python 2.x support - Kodi #776238

Basic Ticket Information
Ticket Status: Closed
Department: OpenSubtitles Support
Create Date: 7.9.2022 5:18 PM
User Information
Name: Opensubtitlesdev/Service Opensubtitles-Com
Email: reply+AWH7RPGDLIMOHMNM7AOGNN6BEXBWJEVBNHHFCVRS2Q@reply.github.com
Phone:

Avatar
opensubtitlesdev/service opensubtitles-com posted [opensubtitlesdev/service.subtitles.opensubtitles-com] Python 2.x support - Kodi

Hi,

Are you interested to make a branch for Python2, used until Kodi19? There is quite a lot of devices on Kodi's


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: .subtitles.opensubtitles-com/issues/2@github.com>

Created by Avataropensubtitlesdev/service opensubtitles-com
Avatar
CTO OpenSubtitles posted

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

Closed by AvatarCTO OpenSubtitles with status of Closed
Avatar
team-pct posted

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

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.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: .subtitles.opensubtitles-com/issues/2/1240620296@github.com>

SYSTEM added team-pct as collaborators
Avatar
team-pct posted
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 @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 > 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
> ,
> or unsubscribe
>
> .
> You are receiving this because you were mentioned.Message ID:
> > github.com>
>


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: .subtitles.opensubtitles-com/issues/2/1245372336@github.com>

Avatar
team-pct posted

im using retropie 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


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: .subtitles.opensubtitles-com/issues/2/1877886075@github.com>

Avatar
team-pct posted

Hi, I am also stuck with kodi leia (because that is that newest version that supports HD decoding on a RaspberryPi3).
Since this addon is only compatible with python3 and the OS.org addon is no longer workin , I've lost access to opensubtitles.

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.
The result is in this branch in my fork.

Unfortunately it is not working yet (it installs fine on Kodi Leia and can be configured with the OS.com user and password, but gives an error when searching for subtitles).

This is my first contact with kodi addons, so I don't even know how to properly debug it. If someone more experienced could have a look or point me in the right direction, we might solve this issue that proably affects many people now that OS.org addon stopped working.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: .subtitles.opensubtitles-com/issues/2/1913024219@github.com>

Avatar
team-pct posted

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?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: .subtitles.opensubtitles-com/issues/2/1915481486@github.com>

Avatar
team-pct posted

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


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: .subtitles.opensubtitles-com/issues/2/1918074888@github.com>

Avatar
team-pct posted

@TiVa85

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?

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


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: .subtitles.opensubtitles-com/issues/2/1918081828@github.com>

Avatar
team-pct posted

@TiVa85

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?

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

I think my Kodi setup is really too old to expect that these things can be fixed.
I was talking about the credentials inside the plugin. When I go into the plugin, and go to configuration menu, I couldn't, set the credentials.

Anyway, reverted back to my very old Kodi setup. I'm still rocking 17.6 as on my 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


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: .subtitles.opensubtitles-com/issues/2/1921042153@github.com>

Avatar
team-pct posted

@TiVa85

I am still on Kyrpton, not Leia,

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...

When I go into the plugin, and go to configuration menu, I couldn't, set the credentials.

I see. In Kodi 18, the OS.com credentials end up stored in:

/addon_data/service.subtitles.opensubtitles-com/settings.xml

where depends on your OS and can be found in this table.

In my case it looks as follows (redacted):

<settings version="2">
    <setting id="APIKey" default="true">AN_API_KEYsetting>
    <setting id="foreign_parts_only" default="true">includesetting>
    <setting id="hearing_impaired" default="true">excludesetting>
    <setting id="machine_translated" default="true">excludesetting>
    <setting id="OSpass">MY_OS_COM_PASSWORDsetting>
    <setting id="OSuser">MY_OS_COM_USERsetting>
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 MY_OS_COM_PASSWORD and MY_OS_COM_USER by yours.

I hope that helps


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: .subtitles.opensubtitles-com/issues/2/1923231093@github.com>

Avatar
team-pct posted

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


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: .subtitles.opensubtitles-com/issues/2/1925872025@github.com>

Avatar
team-pct posted

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.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: .subtitles.opensubtitles-com/issues/2/1930738435@github.com>

Post a Reply

To best assist you, we request that you be specific and detailed

Drop files here or choose them
Ticket will be reopened on message post

Please Wait!

Please wait... it will take a second!