Problems with "Opening stream..." dialog with playback via media info screen
#1
Hello forum! (my first post)

I maintain the iPlayer plugin ( http://code.google.com/p/xbmc-iplayerv2/ ).

The plugin provides file lists of urls to iPlayer programmes to play. Playback works great if the default action when clicking on a listitem is to play (e.g. settings -> video -> file lists -> Playback action = play).

If the default action is "Show information", the media info dialog is brought up, which has a play option. If playback is started from here, the media starts fine in the background, but the XBMC "Opening Stream" dialog is always on top of it. If you cancel this dialog, then the "One or more items failed to play..." dialog is shown, and then xbmc stops playback.

Is there something I'm not doing right which causes this behaviour? I've trawled through the forums and inspected my debug log, but can't find any information. It seems to happen in Eden and Frodo.

I attach a debug log at pastebin: http://pastebin.com/Zwv6hZz7

The plugin call to initiate playback begins at line 422.
Reply
#2
*bump*
Reply
#3
I'm not sure if this is the reason for your problem, but with my add-on I had to set the listitem parameter.
At first source code was
Code:
xbmc.Player(xbmc.PLAYER_CORE_AUTO).play( url )
This worked for me and most other users but some complained about the XBMC "Opening Stream" dialog.
After changing to
Code:
listitem = xbmcgui.ListItem(title, iconImage="DefaultFolder.png", thumbnailImage='HTTP://www.wdr.de/tv/rockpalast/codebase/img/audioplayerbild_512x288.jpg')
listitem.setInfo('video', {'Title': title})
xbmc.Player(xbmc.PLAYER_CORE_AUTO).play( url, listitem)
everything was okay.
No log no help.
Main page: https://github.com/Xycl
Repository: Xycl Repository Leia
Repository: Xycl Repository Matrix
Reply
#4
Unfortunately I get a problem even with a listitem provided.

I think I've found a minimal example which reproduces my problem:

Code:
# Minimal example
    plugin_url = urlparse(sys.argv[0])
    plugin_handle = int(sys.argv[1])
    query_params = parse_qs(plugin_url.query)

    if plugin_url.path == '/':
        test_listitem = xbmcgui.ListItem(label='Test', path='plugin://plugin.music.iplayer/play')
        test_listitem.setProperty('IsPlayable', 'true')
        xbmcplugin.addDirectoryItem(plugin_handle, 'plugin://plugin.music.iplayer/play', test_listitem)
        xbmcplugin.endOfDirectory(plugin_handle)

    elif plugin_url.path == '/play':
        url = '<long and nasty url>'

        xbmcplugin.setResolvedUrl(plugin_handle, True, xbmcgui.ListItem(label='Test', path=url))

        # Switching the above for the following causes a
        # 'One or more items could not be played...' error when playing through show information
        # xbmc.Player(xbmc.PLAYER_CORE_AUTO).play(url, xbmcgui.ListItem(label='Test', path=url))

There are two test cases:
* First, I try to play the given url with the video playlist settings set to 'Play'.
* Then I try to play with video playlist settings set to 'Show information' and then select play from the raised dialog.

In the first case, both the setResolvedUrl() and xbmc.Player.play() call result in successful playback.

In the second, using setResolvedUrl() results in successful playback but xbmc.Player.play() fails.

In the iPlayer plugin, I need to use a custom subclass of xbmc.Player to capture OnStart and OnStop events, so I can't use setResolvedUrl to get around this problem. Any suggestions?

Is this a known bug, should I report it?

Cheers,
M
Reply
#5
*bump*
Reply
#6
(2013-02-23, 21:26)mailman Wrote: In the iPlayer plugin, I need to use a custom subclass of xbmc.Player to capture OnStart and OnStop events, so I can't use setResolvedUrl to get around this problem. Any suggestions?

I do this, https://github.com/TsUPeR/xbmc-pneumatic...lt.py#L536 using both methods. The reason why I use both variants I cant remember Big Grin . Also, you can kill the streaming dialog with a xbmc.executebuiltin('Dialog.Close(all, true)') and a time.sleep(2) to allow xbmc to properly close the dialog.
Pneumatic | SABnzbd | XBMC that just works - openelec
Reply
#7
I had this problem when using the is_folder=True parameter without actually creating a new list. (I was instead creating a popup with a list of streams) switching it to False helped in my case, but I'm not sure how that will fix things for you
Reply
#8
Thanks for the responses.

@popeye:

changing the player.play line to:

player = xbmc.Player(xbmc.PLAYER_CORE_AUTO)
player.play(url, xbmcgui.ListItem(label='Test', path=url))
xbmc.sleep(4000)
xbmc.executebuiltin('Dialog.Close(all, true)')
time.sleep(2)
while player.isPlaying():
xbmc.sleep(1000)

Results in the playback starting, the opening stream dialog opening, then being closed. However, when the dialog is closed, XBMC freezes (race condition? video is frozen but audio continues) and has to be force closed. I've checked in my main plugin and the monitor threads keep on merrily going even while the video is frozen.

@Bstrdsmkr I tried added an explicit isFolder=False to the test case, but it had no effect.

Any further thoughts?
Reply
#9
(2013-03-12, 23:55)mailman Wrote: Thanks for the responses.

@popeye:

changing the player.play line to:

player = xbmc.Player(xbmc.PLAYER_CORE_AUTO)
player.play(url, xbmcgui.ListItem(label='Test', path=url))
xbmc.sleep(4000)
xbmc.executebuiltin('Dialog.Close(all, true)')
time.sleep(2)
while player.isPlaying():
xbmc.sleep(1000)

Results in the playback starting, the opening stream dialog opening, then being closed. However, when the dialog is closed, XBMC freezes (race condition? video is frozen but audio continues) and has to be force closed. I've checked in my main plugin and the monitor threads keep on merrily going even while the video is frozen.

@Bstrdsmkr I tried added an explicit isFolder=False to the test case, but it had no effect.

Any further thoughts?

This happens with Frodo? If yes please create a trac ticket and include a working version of your plugin to the ticket and add jfcarroll as Cc
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#10
Trac issue at http://trac.xbmc.org/ticket/14192
Reply
#11
Is there a easy fix for this problematic Opening Stream dia box. Novice user.
Reply
#12
Was a resolution to this problem ever found?

I'd be very happy for this to be fixed Smile
Reply
#13
*bump*

Same problem here. Any solution yet found?
Reply
#14
Another bump for this as I'm getting it too
Reply
#15
I'm having an issue with this message being up on the screen for at least 10seconds after selecting Trailer from movie information. I'm running openelec 3.2.4 not sure if this problem is tied into the same problem for this thread.
Reply

Logout Mark Read Team Forum Stats Members Help
Problems with "Opening stream..." dialog with playback via media info screen0