It is currently Wed May 22, 2013 8:13 pm


Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Blip.TV url change
PostPosted: Tue May 17, 2011 12:50 pm 

Joined: Thu May 05, 2011 7:56 am
Posts: 5
Hi,

The current url style from Blip.tv has change from :

http://blip.tv/file/5079320

to:

http://blip.tv/project-rant/rant-123-dear-impatient-patient-5097063

so the url parser does not get the right values.


Top
 Profile E-mail  
 
 Post subject: Re: Blip.TV url change
PostPosted: Wed May 18, 2011 6:22 am 

Joined: Thu May 05, 2011 7:56 am
Posts: 5
Here is the fix to get Blip.tv back working with HDFLVPlayer

Steps:

1. Edit the video.php file located (sites/all/modules/hdflvplayer/hdflvplayer/videourl.php)

2. Locate code:

<code>
} elseif(preg_match('/http:\/\/(.*?)blip\.tv\/file\/[0-9]+/', $location, $vresult)) {
</code>

replace with:

<code>
} elseif(preg_match('/http:\/\/(.*?)blip\.tv\/[a-z0-9\-\_]+\/[a-z0-9\-\_]+\-[0-9]+/', $location, $vresult)) {
</code>

Note: the change on the regex is to accomodate the new url format. With this change the type of video is back so the module now can identify when the video is coming from Blip.tv

3. Locate code:

<code>
preg_match('/http:\/\/(.*?)blip\.tv\/file\/get\/(.*?)\.flv/', $newInfo, $result);

$vid_location[0] = urldecode($result[0]);
</code>

replace with:

<code>
$newurl = explode('-', $url);
$source = 'http://blip.tv/rss/flash/'.$newurl[count($newurl)-1];
$xmlstr = file_get_contents($source);
$xml = simplexml_load_string($xmlstr);

$vid_location[0] = urldecode($xml->channel->item->enclosure['url']);
</code>

Note: the reason for the code change is because the flv file path is not shown anymore on the video page source code, so to work around this issue I use their RSS feed where the flv is always shown.

Thank you all for this module and I hope that someone can benefit from this fix. The only think to fix now will be the images if you want to pull the thumbnails and description from Blip.tv.


Top
 Profile E-mail  
 
 Post subject: Re: Blip.TV url change
PostPosted: Wed May 18, 2011 11:54 pm 

Joined: Tue Jun 30, 2009 4:45 am
Posts: 54
Hi,

Thanks a lot for informing us. We will update the pack as soon as possible.



thanks


Top
 Profile E-mail  
 
 Post subject: Re: Blip.TV url change
PostPosted: Wed May 30, 2012 8:07 am 

Joined: Wed Jul 07, 2010 8:49 am
Posts: 120
:-)


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

© Copyrights and all rights reserved by Contus Support