Botster / plugin.video.liveleak

Kodi Media Center addon
2 stars 1 forks source link

Featured group not working on android devices #6

Closed vecnar closed 3 years ago

vecnar commented 3 years ago

Hello,

Featured group not working on firetv stick 4k with kodi 18.4 and my xiaomi mobile phone. I can open other groups on android like "News & Politics", "Must see","Law Enforcement", haven't tested all. Please note that it works on windows 7 and kodi 18.4 and all use same version of liveleak plugin 1.4.2. Below are the log parts from firetv stick, let me know if you need any more information or would like me to test anything.

Thank you

Version part 2020-12-23 13:51:53.137 T:6587 NOTICE: Starting Kodi (18.4 Git:20190831-3ade758ceb). Platform: Android ARM 32-bit 2020-12-23 13:51:53.137 T:6587 NOTICE: Using Release Kodi x32 build 2020-12-23 13:51:53.137 T:6587 NOTICE: Kodi compiled 2019-09-01 by Clang 7.0.2 (https://android.googlesource.com/toolchain/clang 003100370607242ddd5815e4a043907ea9004281) (https://android.googlesource.com/toolchain/llvm 1d739ffb0366421d383e04ff80ec2ee591315116) for Android ARM 32-bit API level 21 (API level 21) 2020-12-23 13:51:53.137 T:6587 NOTICE: Running on Amazon AFTMM with Android 7.1.2 API level 25, kernel: Linux ARM 32-bit version 4.4.120+ 2020-12-23 13:51:53.141 T:6587 NOTICE: FFmpeg version/source: 4.0.4-Kodi 2020-12-23 13:51:53.142 T:6587 NOTICE: Host CPU: ARMv7 Processor rev 4 (v7l), 4 cores available

Error from liveleak `2020-12-23 19:25:34.173 T:25841 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

Botster commented 3 years ago

Thank you for reporting this.

The issue causing this is the same as it was in your previous report. It has been fixed in the current version here but is not yet available in the Kodi repository. Kodi has changed how they want plugin developers to effect Python 3 compatibility in the manner in which they submit their plugins to the repo. And, I have not yet had time to figure it all out and so have not yet submitted the changes.

I don't know if you can download the version in this repo to Firestick, but that would fix it for you. In the meantime, it is a transient issue based on the Liveleak user's name that posted the content and will come and go.

vecnar commented 3 years ago

Apologies for raising the issue with you again. I thought that plugin was updated with kodi repo and i have changed fire tv sticks recently so downloaded whatever was available on kodi repository. I will upload the fix to firetv stick and test tomorrow. Merry Christmas

Botster commented 3 years ago

No need to apologize. It was logical for you to assume it had been fixed. I appreciate you reporting the issue especially since it may not have been the same issue. No worries.

Botster commented 3 years ago

The plugin is now available for Kodi 19. This issue, though, has still not been fixed for versions 16-18. Are you still using Kodi 18 on your Firestick?

vecnar commented 3 years ago

Thank you for letting me know. I still use earlier version of kodi version 18.4 on 3 fire tv sticks, i have created a setup and have a backup copy with many addons and a few dockers running on nas with kodi headless and tvheadend. So i really do not want to upgrade and go through all the setup processes until I have to. But do let me know if you would like me to test something on kodi 19 and firetv stick.

vecnar commented 3 years ago

Sorry I didn't realize that old version wasn't working on 18.4 I thought only newer version wouldn't work and i was ok to keep the old one. I updated kodi on my windows 7 computer and as it was no big problems apart from a few add-ons i decided to try update (not a brand new install without any configs) on fire tv stick 4k but liveleak doesn't work. Please find attached extract of the logs and do let me know if you would like me to try anything, I have access to files so can replace some if needed. LiveleakLogs.txt

vecnar commented 3 years ago

Just noticed that i had debug logging enabled and it may not be necessary or hard to read. So pasted below version of kodi, plugin version and error part.

`2021-03-21 15:55:08.564 T:5027 INFO : Starting Kodi (19.0 (19.0.0) Git:20210218-f44fdfbf67). Platform: Android ARM 32-bit 2021-03-21 15:55:08.565 T:5027 INFO : Using Release Kodi x32 2021-03-21 15:55:08.565 T:5027 INFO : Kodi compiled 2021-02-18 by Clang 8.0.7 (https://android.googlesource.com/toolchain/clang b55f2d4ebfd35bf643d27dbca1bb228957008617) (https://android.googlesource.com/toolchain/llvm 3c393fe7a7e13b0fba4ac75a01aa683d7a5b11cd) for Android ARM 32-bit API level 21 (API level 21) 2021-03-21 15:55:08.566 T:5027 INFO : Running on Amazon AFTMM with Android 7.1.2 API level 25, kernel: Linux ARM 32-bit version 4.4.120+

2021-03-21 15:55:09.268 T:5027 INFO : CAddonMgr::FindAddons: plugin.video.liveleak v2.0.0 installed

2021-03-21 15:56:08.258 T:5211 INFO : CPythonInvoker(1, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.liveleak/default.py): script successfully run 2021-03-21 15:56:08.524 T:5211 INFO : Python interpreter stopped 2021-03-21 15:56:09.948 T:5214 INFO : initializing python engine. 2021-03-21 15:56:13.410 T:5214 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

2021-03-21 15:56:13.691 T:5214 INFO : Python interpreter stopped 2021-03-21 15:56:13.700 T:5213 ERROR : GetDirectory - Error getting plugin://plugin.video.liveleak/?mode=indx&url=browse%3fa%3dlist%26featured%3d1%26page%3d1 2021-03-21 15:56:13.718 T:5027 ERROR : CGUIMediaWindow::GetDirectory(plugin://plugin.video.liveleak/?mode=indx&url=browse%3fa%3dlist%26featured%3d1%26page%3d1) failed `

Botster commented 3 years ago

Just FYI, the version of the plugin I have on my repo is for Kodi 19. Instead of creating a separate branch, I just updated the plugin for v19. I need to learn how I can create separate branches.

Now, to this recent issue, it appears to be related to either Android or, more likely, the Kodi build for Android. Can you please post the entire debug log so I can reach out to the Kodi developers for support?

vecnar commented 3 years ago

I updated to 19 and there are many addons that are not updated to work with 19 so i think being able to have separate branches is good but more work in terms of maintaining them separately for you I think. I have renamed my config folder, uninstalled kodi 18 and installed kodi 19 arm 32 bit, closed kodi, deleted config files after a few tries, launched kodi, enabled debug logging, restarted kodi and launhced everything in below time intervals 23:10 start kodi 23:11 start install 23:11-12 launch liveleak and featured start

Hope this helps. KodiArm32_Debug.txt

Botster commented 3 years ago

I am unsure if you got notice that I referenced your comment in the bug report I just created, so I am just informing you that the issue has been reported.

Now, if you would like, I may be able to work around this issue to get the plugin working on your system. But, and this is a big BUT, it would make the plugin very slow due to Kodi 19 forcing container refreshes after every play of a media file or stream.

To do this I would need to be able to detect the Android operating system. And, for that, I would need to know how Python names it. Adding the line: log(sys.platform, 'info') placed just after the "Main Event" comment block, at about line 473 should do it. No need to be in debug mode.

Note well, this is entirely optional. If you want the plugin to work very slowly on Kodi 19 on your Firestick until the '_multiprocessing' issue is resolved, then I could use your help. If not, that's quite okay too.

Botster commented 3 years ago

I have applied a fix for the occasional unicode handling glitch when viewing Feature and other categories.

I'm still working out how to sync separate branches with my different development platforms so I can issue a Pull Request to the official repo for Kodi versions lower than 19.

In the meantime, you can get the fix by downloading the zip file from this repo. Make sure you get it from the master branch.

vecnar commented 3 years ago

I will try to get it working in kodi 19 as i have 2 fire tv sticks operating in kodi 19 and 1 in kodi 18.4. I tried adding below line at line 473 to default.py from matrix brunch but it didn't help, see attached debug log with error part. log(sys.platform, 'info') I also tried master branch but it wouldn't install on kodi 19 due to python version, i assume it is for version 18. Let me know if you need any help with testing, or if you want me to try master on kodi 18.4 as i was trying everything on kodi 19.

ModifiedDefaultPy_DebugLog.txt

vecnar commented 3 years ago

I think i rushed everything and didn't read your instructions properly, sorry. The reason to add the line was to make it work slowly in kodi19 on fire tv stick, to capture necessary information. I hope the debug log captured it, i didn't place all debug log, let me know if you need it. It would be nice to get it working but if you think within a week it will be fixed in a better way do not waste your time unless you would like to. I didn't receive notification about bug report and it is ok, as long as you are happy with it. Apologies for being all over the shop lately. Please advise what would you like me to do and i will sit down at night time and will do it properly.

Botster commented 3 years ago

I tried adding below line at line 473 to default.py from matrix brunch but it didn't help, see attached debug log with error part. log(sys.platform, 'info')

Adding that line is not to make it work immediately. It is so I know what name the system uses to identify the Android operating system. This will help me apply a workaround until the bug is fixed. The line produced output: 2021-03-22 16:19:37.238 T:23633 INFO : LiveLeak: linux But, I would need to know how the Android system is identified, so you'd have to do that on a Firestick. Or did you? If the Android system is identified as "linux", then I have no path to a workaround.

I also tried master branch but it wouldn't install on kodi 19 due to python version, i assume it is for version 18.

Yes, what is in the master branch (and now jarvis branch) are for Kodi version 16 through 18. What is in the matrix branch is for Kodi 19.

It would be nice to get it working but if you think within a week it will be fixed in a better way do not waste your time unless you would like to.

I doubt that bug issue will be resolved within a week.

No need to apologize. I sincerely appreciate your help.

vecnar commented 3 years ago

I had a look and it is returning linux so I looked on the internet for ways of identifying android from python and got below link. https://stackoverflow.com/questions/48019043/python-detect-android From it I added to the default.py at line 473 below code, i tried to use code quotes but it didn't work so used underscore


log(sys.platform, 'info') from os import environ if 'ANDROID_BOOTLOGO' in environ: log('ANDROID_BOOTLOGO', 'info') else: log('NOT ANDROID_BOOTLOGO', 'info')

if 'ANDROID_ARGUMENT' in environ: log('ANDROID_ARGUMENT', 'info') else: log('NOT ANDROID_ARGUMENT', 'info')


I ran kodi in debug mode and got attached log but the most important lines are 2021-03-23 02:03:59.638 T:8220 INFO <general>: LiveLeak: linux 2021-03-23 02:03:59.638 T:8220 INFO <general>: LiveLeak: ANDROID_BOOTLOGO 2021-03-23 02:03:59.638 T:8220 INFO <general>: LiveLeak: NOT ANDROID_ARGUMENT

So looks like ANDROID_ARGUMENT doesn't identify android but ANDROID_BOOTLOGO did in my case on fire tv stick. It doesn't return all the details as kodi does in the logs (below) but hopefully knowing it is android is sufficient for you. 2021-03-23 02:03:34.530 T:8156 INFO <general>: Running on Amazon AFTMM with Android 7.1.2 API level 25, kernel: Linux ARM 32-bit version 4.4.120+

I would like to try slower workaround if you would be willing to try. Thank you for your kind comments. Kodi19_debug_info.txt

vecnar commented 3 years ago

Just tried installing on my Xiaomi redmi 3s old phone and it failed to install matrix branch giving below The dependency on script.module.requests version 2.22.0 could not be satisfied. It is not important for me but thought to try on my phone to see if android reports anything differently. kodi.log

Botster commented 3 years ago

Thank you for doing that research and testing.

I have applied a workaround so that if ANDROID_BOOTLOGO is detected, the plugin is set to 'slow mode' and will not try to use the multiprocessing module that lacks some dependencies. Please try it and let me know if it works for you. Be sure to download from the matrix branch.

(As far as what is going on with your Xiaomi redmi 3s phone, I am unsure why the dependency could not be satisfied. Perhaps it has to do with how the Android built identifies a version number. But, since it is not an issue for you, I'd rather ignore it for now and hope the build quality improves going forward.)

vecnar commented 3 years ago

Thank you for giving it a try, at least it is usable if you want to watch one particular video as it gives a snapshot and description so you do not press to watch on every one of them. It takes around 17 seconds to load featured videos and after every video playback it takes around 15-17 seconds to load the list again. I think loading at the start 17 seconds is no problem or next page load taking that time but taking same time after playback of each video is a bit too long and unfortunately and not likely to be used too often.

(I do not use kodi on mobile phone too often, just testing, wanted to give it a go on another android platform to see what message it would show.)

One more time thank you for putting temporary working solution

Botster commented 3 years ago

I know, the performance is terrible. Due to the structure of the Liveleak site, the plugin has to load and process ten pages, in sequence due to the lack of multiprocessing, just to list one page of video items. Kodi 19 forces a container refresh after every play of a video, and this causes the entire process to be repeated.

I am glad it at least works for you. You are welcome. Thank you for helping me.

Can I mark this issue as closed?

vecnar commented 3 years ago

Thank you for all the help and you may close it. Please add a kodi bug link so that anybody could monitor progress who is looking at it if you can but if you can't just close. Have a good day

Botster commented 3 years ago

The bug link is above, but I'll add it to the closing comment. Thank you, vecnar.

Botster commented 3 years ago

This issue is awaiting resolution of the following reported bug: https://github.com/xbmc/xbmc/issues/19458

Since the time of resolution for that bug is indefinite, this issue is being closed but can be reopened if things change.