(2022-02-03, 11:04)ardeley Wrote: (2021-10-12, 00:28)kevwag Wrote: I'm having the same problems trying to use UKTVPlay with this addon. Unbound Local Error: local variable 'data_account' referenced before assignment.
Is the addon still maintained or is it now defunct? I see that people have been reporting this issue for several months now and there has been no response from the developer.
I've also noticed there's a problem with the EPG integration - the EPG shows no information for any UK channel, although the standalone guide within the addon DOES contain programme info.
Last of all, the feature that offers to upload your logfile when an error occurs, itself fails, saying "Unable to retrieve the paste url".
Is it even worth providing any more information, or is this addon dead in the water?
Same problem 4 months later: in Settings>Accounts I have provided my UKTV username and password, but I receive error messages as above. Is there any cure? Is there going to be any cure?
There already IS a cure but I don't know if it's been merged into a downloadable release yet, It hasn't made it as far as the Kodi repo - I know that much!
I've been running the fixed version since December but I had to manually apply the fix which involves replacing a few lines of python code in one of the files and then replacing the file into the addon zip. You could just edit the file directly in the installed addon but any updates from the repo will just un-fix it until they've merged the fix into a release.
Here's what you need to do...
1. Install the addon from the Kodi repo and enter your UKTV Play login in the settings.
2. Go to the
developer's GitHub page then change the branch from the Master branch to the Dev branch in the drop-down menu.
3. Download the zip file for latest developer release of the addon (Click the green "Code" drop-down and select "Download zip file".
4. Extract this file from the zip: /resources/lib/channels/uk/uktvplay.py
5. Open the file in a text editor (Notepad++ is best as it shows the line numbers which will make things easier)
6. Select everything between lines 254 and 266 and paste these four lines in their place:
# Get data_account / data_player
resp = session_requests.get(URL_ROOT)
data_account = re.compile(r'//players\.brightcove\.net/([0-9]+)/[^_]+_default/').findall(resp.text)[0]
data_player = re.compile(r'//players\.brightcove\.net/[0-9]+/([^_]+)_default/').findall(resp.text)[0]
Important: These lines of code
must have the same number of spaces in front of them as the lines above (249/250) so that they line up vertically. This is not just for neatness - if they don't align, you'll get an error and it won't work.
7. Save the file and close Notepad++
8. Add the .py file back into the zip file (make sure it goes back to the same folder path and overwrites the original py file).
9. Open Kodi, Install the modified zip and enjoy!
Also fairly important: Although this method
does fix the UKTV Play bug, the addon will no longer update from any online repo, either automatically OR manually. On the plus side, this means that it will never get "un-fixed" by an un-patched update but it also means that you will eventually fall behind on other fixes and updates as they are released. I would suggest checking back on the dev's GitHub page once a month, downloading the latest release from the Master branch and trying it out to see if the fix has been merged. If it works then just install the Master branch repo zip to receive updates / notifications directly from the developer's repo. If it still doesn't work then just re-install your modded zip (you won't lose any of your settings) and try again next month!