andrebrait / service.subtitles.legendastv

Other
9 stars 6 forks source link

Kodi 19.x support #6

Closed ribeiroct closed 3 years ago

ribeiroct commented 3 years ago

Hi,

So i got tired of sitting in my hands not being able to use the addon.

Passed it through the 2to3 program and fixed the rest by hand.

I did not test it extensively, but it is working for me. It may need some more trimming around the edges.

andrebrait commented 3 years ago

Ok, I'm gonna check this out. I see some changes that are mostly connected to formatting, but I'll try to have this reviewed by the end of the weekend

ribeiroct commented 3 years ago

Was the 2to3 tool, sorry about that.

andrebrait commented 3 years ago

I think uour PR actually gave me a nice base for using Kodi's built-in libraries for making it compatible with both Python 2 and 3 versions. They had that already but I never had the time to touch it. It basically consisted of utility methods for converting strings from the old format to the new and vice-versa for method calls and whatnot.

I saw the changes here and there's indeed nothing too earth-shattering and so I think I can choose one of two routes:

  1. To make it compatible with Python 3 only and branch out current master to a legacy branch (or a python2 branch, if you will)
  2. To make it compatible with both versions and carry on development as usual

The reason why I tend to think 2 is a better option is that some platforms will be stuck on Kodi 18 forever (think devices such as the Raspberry Pi running Debian Buster and lower, or consoles). Given even PC users might have other add-ons that are not yet compatible, I think it makes sense to maintain compatibility with both of them at the same time.

andrebrait commented 3 years ago

Hey there,

So, everything looks good, but are you able to revert the changes that only change formatting? That would be ideal. Not required, though. Just let me know.

andrebrait commented 3 years ago

I'll generate a version with the fix from #4 and I then shall resolve the conflicts and merge this

KillerJoeBR commented 3 years ago

Hi everyone. Just letting you know that I really miss this addon since I've been using the kodi matrix. V19.

I tried installing from here, it searches get results but fails to download any subtitles

andrebrait commented 3 years ago

I'll be taking a look at this PR tomorrow (yes, finally!).

andrebrait commented 3 years ago

Hey there,

Thanks for this PR. It sent me in the right direction when it came to porting it to Python 3/Kodi 19, but it had too many small things that I would not have liked if I had it merged. It wasn't working 100% too, so I had fixing to do anyway.

Anyway, I wanted to thank you for this. Closing the PR.