FAQ  •  Register  •  Login

StarCraft 2 and websites offering embedded Youtube videos.

<<

sampath.mamilapo

Serviio lover

Posts: 71

Joined: Thu Mar 31, 2011 8:40 pm

Post Sun Sep 25, 2011 1:32 am

StarCraft 2 and websites offering embedded Youtube videos.

Hi,

there are websites like http://sc2casts.com which offer a feed (http://sc2casts.com/rss) that includes URLs to their website where Youtube videos are embedded.

Obviously I would like to have a plugin that extracts the URLs from http://sc2casts.com/rss and then allow Serviio to list the embedded Youtube videos.

Cheers,
Sampy
<<

AMoo-Miki

Serviio newbie

Posts: 10

Joined: Sat Sep 24, 2011 6:22 pm

Post Sun Sep 25, 2011 10:07 am

Re: StarCraft 2 and websites offering embedded Youtube video

Hi,

I have coded the plugin for you, but there is a minor problem. Java doesn't like the RSS feed sent over by SC2Casts. I am looking at a way to build an interface that will fix the feed, so that Java will play nice with it. Stay tuned :)
<<

AMoo-Miki

Serviio newbie

Posts: 10

Joined: Sat Sep 24, 2011 6:22 pm

Post Sun Sep 25, 2011 11:33 am

Re: StarCraft 2 and websites offering embedded Youtube video

Here you go. Download the attached file which is named SC2Casts.groovy and place it in the plugins folder of your serviio installation.

The open the console of your serviio 0.6 and go to the library -> online sources. Hit add and paste this address in there: http://barahmand.com/serviio/sc2casts.php
The url above is to fix the BOM at the beginning of the rss feed, which Java doesn't like.

lemmi know if things don't go as expected.
Attachments
SC2Casts.groovy
SC2Casts Plugin
(5.89 KiB) Downloaded 256 times
<<

sampath.mamilapo

Serviio lover

Posts: 71

Joined: Thu Mar 31, 2011 8:40 pm

Post Sun Sep 25, 2011 12:03 pm

Re: StarCraft 2 and websites offering embedded Youtube video

Thanks a lot. I will try it immediately :D

I would be nice to modify the groovy code in a way that it directly can eat the original rss. Does it just throw an exception and then end or could you just catch it and it would be peachy?

Cheers,
Sampy
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17095

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Sep 25, 2011 2:49 pm

Re: StarCraft 2 and websites offering embedded Youtube video

AMoo-Miki wrote:Here you go. Download the attached file which is named SC2Casts.groovy and place it in the plugins folder of your serviio installation.

The open the console of your serviio 0.6 and go to the library -> online sources. Hit add and paste this address in there: http://barahmand.com/serviio/sc2casts.php
The url above is to fix the BOM at the beginning of the rss feed, which Java doesn't like.

lemmi know if things don't go as expected.

great, can you upload the plugin to the Available plugins section?
<<

AMoo-Miki

Serviio newbie

Posts: 10

Joined: Sat Sep 24, 2011 6:22 pm

Post Sun Sep 25, 2011 8:23 pm

Re: StarCraft 2 and websites offering embedded Youtube video

The thing is Java's XML parser doesn't like the BOM at the beginning and an exception terminates the handling of the XML.
The source code to what i am serving is pretty simple:
  Code:
<?= preg_replace("#^[^<]*#", '', file_get_contents('http://sc2casts.com/rss/rss.php')); ?>


Maybe Serviio will implement a similar mechanism before it goes ahead with passing the content to the parser, coz this will not be the only feed that has BOM.

@zip: Sure :)
<<

sampath.mamilapo

Serviio lover

Posts: 71

Joined: Thu Mar 31, 2011 8:40 pm

Post Mon Sep 26, 2011 12:17 am

Re: StarCraft 2 and websites offering embedded Youtube video

I don't how you write these plugins but can't you 'modify' the BOM before handing it over to the XML parser? Or use a different parser that does not exit with this BOM?

On a different note, I tried the plugin and it works great except a little problem where it only extracts the last embedded Youtube video on a webpage.

Most webpages have more then one video embedded and in that case it only lists the last video in Serviio/on my TV.

Cheers,
Sampy
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17095

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Sep 26, 2011 8:52 am

Re: StarCraft 2 and websites offering embedded Youtube video

<<

AMoo-Miki

Serviio newbie

Posts: 10

Joined: Sat Sep 24, 2011 6:22 pm

Post Mon Sep 26, 2011 9:10 am

Re: StarCraft 2 and websites offering embedded Youtube video

Sampy,

zip has it planned up to take care of BOM in the next release. Thereafter we wouldn't need my transformer and you can have the original feed used.

Also, i will make a change to make sure it loads them all. Gimmi a couple of hours though.
<<

sampath.mamilapo

Serviio lover

Posts: 71

Joined: Thu Mar 31, 2011 8:40 pm

Post Mon Sep 26, 2011 8:20 pm

Re: StarCraft 2 and websites offering embedded Youtube video

Don't worry...no rush. I am very greatful for your nice plugins :D
<<

sampath.mamilapo

Serviio lover

Posts: 71

Joined: Thu Mar 31, 2011 8:40 pm

Post Sat Oct 01, 2011 5:46 pm

Re: StarCraft 2 and websites offering embedded Youtube video

Ok...now I am wondering where the plugin is at :D

I said no rush but that was almost a week ago ;)
<<

venkat1926

Streaming enthusiast

Posts: 26

Joined: Mon Oct 21, 2013 8:31 am

Post Wed Oct 23, 2013 7:28 am

Re: StarCraft 2 and websites offering embedded Youtube video

Serviio newbie
Posts: 10
Joined: Sat Sep 24, 2011 11:52 pm
Post Sun Sep 25, 2011 5:03 pm
Re: StarCraft 2 and websites offering embedded Youtube video
Here you go. Download the attached file which is named SC2Casts.groovy and place it in the plugins folder of your serviio installation.

The open the console of your serviio 0.6 and go to the library -> online sources. Hit add and paste this address in there: http://barahmand.com/serviio/sc2casts.php
The url above is to fix the BOM at the beginning of the rss feed, which Java doesn't like.

lemmi know if things don't go as expected.
ATTACHMENTS
SC2Casts.groovy
SC2Casts Plugin
(5.89 KiB) Downloaded 46 times



thanks.
when I click scecasts.groovy error comes
error message comes
"w"indows want to know which progsrams to use to dowload this file

any suggestisons

Return to Plugin requests

Who is online

Users browsing this forum: No registered users and 4 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.