Plugin launched from strm file?
#1
Yesterday I posted this same issue in the general Support forum (Find it here) but it went down really quickly with only 39 reads and no responses.

I thought this might be a better placing. This is the thing:

I have a plugin that can extract video URLs from several web pages. Then is gives a list of videos and lets you watch one.

The plugin is also capable of detecting when the video is hosted in megavideo.com and then allows you to configure your premium user name and password and then allows premium features like better video quality and no time limit.

The thing is that I want to add some of the videos to my library (some tv episodes mainly). So I thought that I could create a strm file and instead of inserting a video url insert a plugin url in this form:

PHP Code:
plugin://video/myplugin/?action=watch&source=MegaVideo&title=My+Online+Vid eo&url=http%3A%2F%2Fwww.sourceweb.com%2Fvideos%2F4 4413%2F 

In this way I can place the stmr file with my other videos of that tv series and I can get library information for it.

And it almost works!

I can fill my library and I can select it to play. This launches the strm file that launches the plugin with specific parameters to scrapp the video url from sourceweb.com and then does what is necesary to prepare a premium cookie for megavideo and then plays the video in premium mode.

The only problem is that xbmc thinks that the strm content wasn't valid and a popup message screen appears:
PHP Code:
"Playback Failed

One or more items failed to play.
Check the log file for details." 

The funny thing is that I can watch the video in the background just until the moment I press OK in the popup window.

Here is a view of the error logged in xbmc.log:
PHP Code:
...
21:42:29 T:3924 M:2836717568  NOTICErunning threadCDVDPlayerAudio::Process()
21:42:29 T:3924 M:2838233088  NOTICECreating audio device with codec id86016channels2sample rate44100no pass-through
21
:42:29 T:4952 M:2833293312  NOTICE:  fps25.000000pwidth640pheight480dwidth840dheight480
21
:42:29 T:4952 M:2833293312  NOTICEDisplay resolution DESKTOP 1366x768 60.00 Full Screen (12)
21:42:30 T:2852 M:2835431424   ERRORPlaylist Playerskipping unplayable item0path [plugin://video/myplugin/?action=watch&source=MegaVideo&title=My+Online+Video&url=http%3A%2F%2Fwww.sourceweb.com%2Fvideos%2F44413%2F 


I hope there is a way for the plugin to tell xbmc that it actually played something and that there is no error.

Any ideas??

Thanks in advance,

Jur.
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply
#2
The way I got this to work is by is that after you resolve the url you have to do something like this:
Code:
resolved_url='resolved_url'
listitem = xbmcgui.ListItem('', iconImage="DefaultVideoBig.png", thumbnailImage='', path=resolved_url)
xbmcplugin.setResolvedUrl(int(sys.argv[ 1 ]),True,listitem)
Reply
#3
Thanks kreach. Your code was a lot of help.

I added the path param to my listitem and also set the resolvedurl...

I also had to add a check because when launching the plugin from strm file I don't have to call the xbmcplayer.play method.

So I placed something like this:
PHP Code:
if action="play"#If not strm file
           
xbmcPlayer.play(playlist)
elif action="strm_file":
        
xbmc.output("[jur.py] strm file. Avoid .play"

Thanks for your time.

Jur.
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply
#4
Hi,

Now that I got that strm files going I found a side problem that I didn't spect.

As you might remember I'm creating strm files to access internet stream videos via plugin call.

The goal is to get those files in a movies directory and be able to use info scrapers on them.

Well, all the tests I did during development where with TV Series episodes and the scrappers would work perfect on them (giving that the naming and folder structure was adequate).

But when I try to get info for a movie file and I press the Info button, the scrapper starts, as I can see the quering scrapper message and then I get a selection list for the matching movies. But when I select one I get an info message saying:
PHP Code:
No Info Found!
my movie.strm 

The weird thing. If I rename that file to my movie.avi the scrapper works fine...

I can't see any valuable information in the log file.

Any ideas? Thanks in advance,

Jur.
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply
#5
Please, can anyone give ideas on why xbmc doesn't scrap info for strm files?

I really would like this to work. Anyone from the dev. team can tell me if this "should" work and I must file it as an error or if xbmc is not supposed to work like I expect?


Thanks in advance,

Jur.

EDIT: I have done some more tests. The problem it's not scrapper dependent as I've tested with several and all show the same behavior.
I've also tried with many other file extensions, even new ones. I've created files with strv extension (and added it in advancedsettings.xml to make it a video extension for xbmc). This files can also be added to the video library. Of course I cannot play them as they are not correctly recognized by xbmc (if they where the problem will be solved).
The strm files show in the screen with an audio icon (as if they where audio files). Might this be related to the problem?
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply
#6
Adding information I gather.

I'm sorry to bother with this but I'm really clueless... Next step is going through XBMC source code. Sad

Some more tips I've discovered. The info message that shows up when trying to scrap info for strm files is string ID 195 (No info found! in English strings.xml)

Here is a recap of the process to get the error:

1. Place a file with strm extension in a folder with content type set to Movies and any scrapper selected.
2. Press "I" over the strm file.
3. The scrapper gets the possible matches and pops up a window to let you select one.
4. When you select one and press ok you get the info:
No info found!+the name of the movie and just an ok button.

If I change the extension from strm to any other video file (avi,mkv, etc) the scrapper works just fine.

Finally I attach a paste bin log of xbmc.log of the process... although I don't know if this will be of any help since there is no significant message (that I can identify).
http://pastebin.com/m757737ca

Please, please. Any help will be well come.

Best regards,

Jur.
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply
#7
This is exactly what I were looking for, I managed to watch the movie I put on the Strm file, but when I try to put the scrapper It says no info found, so I'm looking forward for more info about this
Reply
#8
NO ONE IS RESPONDING OR HELPING WITH THISHuh I have been looking for info on this for months!
will always be grateful for XBMC and XBMC.ORG
Reply

Logout Mark Read Team Forum Stats Members Help
Plugin launched from strm file?0