• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 9
Beta PVR Plugin Player - Play Addon Streams in the PVR
#46
(2017-11-15, 22:53)dh4rry Wrote: @primaeval: a quick fix for the problem in kodi leai would be to redirect to a dummy Stream instead of returning a 200 responsecode.  I've testet following fix in service.py:
python:

class myHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        ##self.send_response(200)
        ##self.send_header('Content-type','video/mpeg')
        ##self.end_headers()        
        self.send_response(301)
        self.send_header('Location','http://techslides.com/demos/sample-videos/small.webm')
        self.end_headers()
        Last = int(ADDON.getSetting("LastPlay"))
        Now = int(time.time())
        if Now-Last>4:
            ADDON.setSetting("LastPlay","%d" % Now)
        else:
            return
            
    url = self.path[2:]
        listitem = ListItem(path=url)
        listitem.setInfo(type="Video", infoLabels={"mediatype": "movie", "title": "LiveTV"})
        xbmc.Player().play(url, listitem)
    return

A better solution would be simulate a black video stream directly in python.
Nice work. Thanks. Have you got time to do it as a pull request at Github?
Reply
#47
(2017-11-16, 10:28)primaeval Wrote: Nice work. Thanks. Have you got time to do it as a pull request at Github?

I've changed my Fix a bit. Instead of redirecting to an example video on the web, the http-server inside service.py serves now a small video with just black. With this Solution we don't see a fiew frames from an example video, just black screen. 
You can find my pull request at Github: https://github.com/primaeval/plugin.vide...yer/pull/3
Reply
#48
It's work well for youtube but no for dailymotion  Blush
Reply
#49
(2017-11-17, 00:57)dh4rry Wrote:
(2017-11-16, 10:28)primaeval Wrote: Nice work. Thanks. Have you got time to do it as a pull request at Github?

I've changed my Fix a bit. Instead of redirecting to an example video on the web, the http-server inside service.py serves now a small video with just black. With this Solution we don't see a fiew frames from an example video, just black screen. 
You can find my pull request at Github: https://github.com/primaeval/plugin.vide...yer/pull/3 
 version 0.0.12
- leia fix (thanks dh4rry)

Thanks for the fix. It's in the repo now.

Could you test if the Channels menu works again for you. I think I've fixed that too with that extra info you used.

The throwaway fix is for Jarvis I think. I still need it.
Reply
#50
(2017-11-17, 11:37)ednakuy Wrote: It's work well for youtube but no for dailymotion  Blush
 It worked for me just now. I added the Live section in and made a channel called Jornal that matched "Jornal da Manha" or something.
The streams are pretty choppy though.

If they change the page with the url on frequently it might not work.
Reply
#51
Hi,

When i install the PVR Plugin Player i get the following error:

20:00:41.874 T:140593464338176   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: attribute of type 'NoneType' is not callable
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/service.py", line 12, in <module>
                                                throwaway = datetime.datetime.strptime('20110101','%Y%m%d')
                                            TypeError: attribute of type 'NoneType' is not callable
                                            -->End of Python script error report<--

When i switch on "Folder" i get the following error:

20:05:43.435 T:140593175672576  NOTICE: [xbmcswift2] Request for "/" matches rule for function "index"
20:05:43.437 T:140593175672576 WARNING: [xbmcswift2] No converter provided, unicode should be used, but returning str value
20:05:47.588 T:140593175672576  NOTICE: [xbmcswift2] Request for "/subscribe" matches rule for function "subscribe"
20:05:47.619 T:140593175672576 WARNING: [xbmcswift2] No converter provided, unicode should be used, but returning str value
20:05:47.641 T:140593175672576   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: (u'\u2022',)
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 804, in <module>
                                                plugin.run()
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 332, in run
                                                items = self._dispatch(self.request.path)
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 306, in _dispatch
                                                listitems = view_func(**items)
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 358, in subscribe
                                                context_items.append(("[COLOR yellow]%s[/COLOR] " % 'Add Folder', 'XBMC.RunPlugin(%s)' % (plugin.url_for(add_folder, id=id, name=label, path=path))))
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 295, in url_for
                                                pathqs = rule.make_path_qs(items)
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/urls.py", line 160, in make_path_qs
                                                path = self._make_path(url_items)
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/urls.py", line 110, in _make_path
                                                items[key] = quote_plus(val)
                                              File "/usr/lib/python2.7/urllib.py", line 1306, in quote_plus
                                              File "/usr/lib/python2.7/urllib.py", line 1299, in quote
                                            KeyError: (u'\u2022',)
                                            -->End of Python script error report<--
20:05:47.789 T:140595952969856   ERROR: GetDirectory - Error getting plugin://plugin.video.pvr.plugin.player/subscribe
20:05:47.790 T:140595952969856   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.pvr.plugin.player/subscribe) failed
20:05:48.240 T:140593175672576  NOTICE: [xbmcswift2] Request for "/" matches rule for function "index"
20:05:48.242 T:140593175672576 WARNING: [xbmcswift2] No converter provided, unicode should be used, but returning str value
Reply
#52
(2018-02-24, 21:07)Nachtfalke45 Wrote: Hi,

When i install the PVR Plugin Player i get the following error:

20:00:41.874 T:140593464338176   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: attribute of type 'NoneType' is not callable
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/service.py", line 12, in <module>
                                                throwaway = datetime.datetime.strptime('20110101','%Y%m%d')
                                            TypeError: attribute of type 'NoneType' is not callable
                                            -->End of Python script error report<--

When i switch on "Folder" i get the following error:

20:05:43.435 T:140593175672576  NOTICE: [xbmcswift2] Request for "/" matches rule for function "index"
20:05:43.437 T:140593175672576 WARNING: [xbmcswift2] No converter provided, unicode should be used, but returning str value
20:05:47.588 T:140593175672576  NOTICE: [xbmcswift2] Request for "/subscribe" matches rule for function "subscribe"
20:05:47.619 T:140593175672576 WARNING: [xbmcswift2] No converter provided, unicode should be used, but returning str value
20:05:47.641 T:140593175672576   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: (u'\u2022',)
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 804, in <module>
                                                plugin.run()
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 332, in run
                                                items = self._dispatch(self.request.path)
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 306, in _dispatch
                                                listitems = view_func(**items)
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 358, in subscribe
                                                context_items.append(("[COLOR yellow]%s[/COLOR] " % 'Add Folder', 'XBMC.RunPlugin(%s)' % (plugin.url_for(add_folder, id=id, name=label, path=path))))
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 295, in url_for
                                                pathqs = rule.make_path_qs(items)
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/urls.py", line 160, in make_path_qs
                                                path = self._make_path(url_items)
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/urls.py", line 110, in _make_path
                                                items[key] = quote_plus(val)
                                              File "/usr/lib/python2.7/urllib.py", line 1306, in quote_plus
                                              File "/usr/lib/python2.7/urllib.py", line 1299, in quote
                                            KeyError: (u'\u2022',)
                                            -->End of Python script error report<--
20:05:47.789 T:140595952969856   ERROR: GetDirectory - Error getting plugin://plugin.video.pvr.plugin.player/subscribe
20:05:47.790 T:140595952969856   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.pvr.plugin.player/subscribe) failed
20:05:48.240 T:140593175672576  NOTICE: [xbmcswift2] Request for "/" matches rule for function "index"
20:05:48.242 T:140593175672576 WARNING: [xbmcswift2] No converter provided, unicode should be used, but returning str value
 See if it works if you comment out line 12 in /storage/.kodi/addons/plugin.video.pvr.plugin.player/service.py.
Put a # at the front of throwaway.
That was needed in Jarvis I think due to a python bug.
What Kodi version are you using? Paste the line at the top of the log that tells you the Kodi version.

You have also got a strange bullet character \u2022 in your channel names. Try removing that.
Python programs always have problems with unicode.
Reply
#53
Thank you for your prompt reply.

My Version is:

19:27:39.178 T:140595952969856  NOTICE: Starting Kodi (17.6 Git:a9a7a20). Platform: Linux x86 64-bit
19:27:39.178 T:140595952969856  NOTICE: Using Release Kodi x64 build
19:27:39.178 T:140595952969856  NOTICE: Kodi compiled Jan 14 2018 by GCC 6.2.0 for Linux x86 64-bit version 4.11.12 (264972)
19:27:39.178 T:140595952969856  NOTICE: Running on LibreELEC (official): 8.2.3, kernel: Linux x86 64-bit version 4.11.12
Reply
#54
I have put a # at the front of throwaway but i get the same error, when i switch on "Folder"
Reply
#55
(2018-02-24, 21:56)Nachtfalke45 Wrote: I have put a # at the front of throwaway but i get the same error, when i switch on "Folder"
 Try the latest version 0.0.13 in the repo.
I've put an exception around the throwaway and hopefully fixed the unicode problem.
Reply
#56
Thank you.

The "Folder" works now but i get another error when i want "Choose stream":

21:25:29.883 T:140458876749568   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: attribute of type 'NoneType' is not callable
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 804, in <module>
                                                plugin.run()
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 332, in run
                                                items = self._dispatch(self.request.path)
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 306, in _dispatch
                                                listitems = view_func(**items)
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 586, in choose_stream
                                                addons = folder_streams()
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 453, in folder_streams
                                                last_time = datetime.datetime.strptime(last_time, '%Y-%m-%dT%H:%M:%S.%f')
                                            TypeError: attribute of type 'NoneType' is not callable
                                            -->End of Python script error report<--
21:25:30.785 T:140459607299840  NOTICE: AddOnLog: PVR IPTV Simple Client: EPG file path is not configured. EPG not loaded.
Reply
#57
If I delete the "Folder" cache (Rest Cache) I can assign a stream (Chosse Stream) once but the stream can not be played.
Reply
#58
Please use PasteBin.com for logs - let's not bloat the forum database any more than we need.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#59
(2018-02-24, 22:28)Nachtfalke45 Wrote: Thank you.

The "Folder" works now but i get another error when i want "Choose stream":

21:25:29.883 T:140458876749568   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: attribute of type 'NoneType' is not callable
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 804, in <module>
                                                plugin.run()
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 332, in run
                                                items = self._dispatch(self.request.path)
                                              File "/storage/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 306, in _dispatch
                                                listitems = view_func(**items)
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 586, in choose_stream
                                                addons = folder_streams()
                                              File "/storage/.kodi/addons/plugin.video.pvr.plugin.player/main.py", line 453, in folder_streams
                                                last_time = datetime.datetime.strptime(last_time, '%Y-%m-%dT%H:%M:%S.%f')
                                            TypeError: attribute of type 'NoneType' is not callable
                                            -->End of Python script error report<--
21:25:30.785 T:140459607299840  NOTICE: AddOnLog: PVR IPTV Simple Client: EPG file path is not configured. EPG not loaded.
 Can you zip up the contents of your addon_data folder and post a link.
userdata\addon_data\plugin.video.pvr.plugin.player
Make sure there are no passwords in the stream urls.

That error might be something to do with the throwaway datetime bug but it is wrapped in an exception and shouldn't be causing a problem.

Try clearing out the addon_data folder and start again, just to see if something was corrupt in there.

I can't see where the problem is without some more data about the addon folder you're getting stuck trying to play.
Reply
#60
I have cleared out the addon_data folder but i get the same error.

https://drive.google.com/file/d/15GY1HVw...sp=sharing
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 9

Logout Mark Read Team Forum Stats Members Help
PVR Plugin Player - Play Addon Streams in the PVR2