Kodi Community Forum

Full Version: [RELEASE] Reddit Viewer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
Hi mac1202,

I fixed the issue with v3.1.8
its main use is for displaying infographic images that are very tall.
some selfies trigger this feature and the zoom amount does not come out right.

I'll play around with the math some more to get a good balance.
Just tested it. Image is now displayed but not in the image viewer like other image. Instead it s show on top of post list and I have no control over the image like zoom in. Is it the intended behaviour ?
yes, that is its intended behavior.
It is for viewing a tall image like this:
https://i.redd.it/n987qu1ae8hy.png

vertical selfies that are a little too tall will also trigger that behavior.

I'm still working on getting the right balance on the zoom level.
i'll update a new version that triggers on narrower images.
fixed
It is possible to add 2 entry to the context menu ?
- One similar to "add /r/**** to shortcut" but to add it to list of blocked subreddit.
- And one to open the link if a configurable external program for example a webbrowser.
I will add a Hide posts from r/*** on the context menu

opening a webbrowser;
reddit_tv has this feature, I can only test this on my dev machine which is on windows.
afaik, there is no browser on the open/libreelec machines i use. so you'd have to let me know how it goes.
I'll see if i can put it back on.

about the configurable external program; do you know how other addons implement this feature?
basically there will be a setting where the user will enter something like:
"system.exec(..."
or
"StartAndroidActivity(..."

and it will be executed when the user picks the context menu that will trigger it.

I asked the kore remote forum to add a "configurable program setting" so that I can set which addon will receive links instead of the default youtube/vimeo.
basically the user can put "plugin://plugin.video.reddit_viewer/?mode=play&url=" and the kore remote will add the url and use that to send a command to kodi.
seems a little too advanced and nobody was interested in it.
Just tested the latest commit with open with browser feature. At first didn't work on my manjaro system I have to edit utils.py to make it work.
The lirc part is to control firefox with my remote without also affecting kodi in background.

Code:
diff --git a/utils.py b/.kodi/addons/plugin.video.reddit_viewer/resources/lib/utils.py
index faee1fc..fed4dbd 100644
--- a/utils.py
+++ b/.kodi/addons/plugin.video.reddit_viewer/resources/lib/utils.py
@@ -955,8 +955,10 @@ def open_web_browser(url,name,type):
         # ___ Open the url with the default web browser
         xbmc.executebuiltin("System.Exec(cmd.exe /c start "+url+")")
     elif osLinux and not osAndroid:
-        # ___ Need the xdk-utils package
-        xbmc.executebuiltin("System.Exec(xdg-open "+url+")")
+        # ___ Need the xdg-utils package
+        xbmc.executebuiltin('LIRC.stop')
+        os.system("xdg-open "+url+"")
+        xbmc.executebuiltin('LIRC.start')
     elif osAndroid:
         # ___ Open media with standard android web browser
         xbmc.executebuiltin("StartAndroidActivity(com.android.browser,android.intent.action.VIEW,,"+url+")")
I have also posted a new link that doesnt work on r/redditviewertesting

Code:
18:57:05.862 T:139944932669184  NOTICE: reddit_viewer:----------------v3.2.0 loopedPlayback: http://i.imgur.com/RXfvVPYh.mp4-----------------
18:57:05.882 T:139944932669184  NOTICE: URLResolver: Initializing URLResolver version: 3.0.28
18:57:05.899 T:139944932669184  NOTICE: reddit_viewer:loopedplayback http://i.imgur.com/RXfvVPYh.mp4
18:57:06.788 T:139947037837056  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms
18:57:07.163 T:139947063041472   ERROR: CCurlFile::Stat - Failed: Number of redirects hit maximum amount(47) for http://i.imgur.com/RXfvVPYh.mp4
18:57:07.173 T:139947063041472  NOTICE: VideoPlayer: Opening: http://i.imgur.com/RXfvVPYh.mp4
18:57:07.173 T:139947063041472 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
18:57:08.432 T:139947063041472   ERROR: CCurlFile::Stat - Failed: Number of redirects hit maximum amount(47) for http://i.imgur.com/RXfvVPYh.mp4
18:57:08.434 T:139943943984896  NOTICE: Creating InputStream
18:57:09.930 T:139943943984896   ERROR: CCurlFile::FillBuffer - Failed: Number of redirects hit maximum amount(47)
18:57:11.403 T:139943943984896   ERROR: Previous line repeats 1 times.
18:57:11.403 T:139943943984896  NOTICE: Creating Demuxer
18:57:11.453 T:139943943984896   ERROR: Open - Error, could not open file http://imgur.com/RXfvVPYh.mp4
18:57:11.453 T:139943943984896   ERROR: OpenDemuxStream - Error creating demuxer
18:57:11.453 T:139943943984896  NOTICE: CVideoPlayer::OnExit()
18:57:11.464 T:139947063041472   ERROR: Playlist Player: skipping unplayable item: 0, path [http://i.imgur.com/RXfvVPYh.mp4]
18:57:11.464 T:139947063041472  NOTICE: CVideoPlayer::CloseFile()
mac1202,
I put up a new version.
I added a new category (Advanced Options) in the settings screen that allows you to enter a custom command for launching a web browser.

Try to see if entering the code below will work for launching the browser
Code:
xbmc.executebuiltin('LIRC.stop');os.system("xdg-open {url}");xbmc.executebuiltin('LIRC.start')
Yeah this custom command work.
Hi, i've posted a new link on r/redditviewertesting that give me the Number of redirects hit maximum amount error.
Thanks, I've put up a new version that fixes this issue.
Hi just tested the lasted git version, nice addition to have access to saved post. If it's possible to add a context menu entry to save post it will be awesome.
Another little think if it's possible to make liveleak video open with the liveleak addon instead of youtubedl, because liveleak support in youtubedl is currently broken since several weeks.
Hi!

latest "3.3.1" from git wont install on Helix 14.2 (dependencies not met), last one i grabbed "3.2.8" works fine though!
The require xbmc.python version has changed from 2.14.0 to 2.24.0 if possible try to upgrade your kodi installation.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13