xbmc-finnish-tv icon indicating copy to clipboard operation
xbmc-finnish-tv copied to clipboard

Ruutu.fi Kodi plugin does not list any content

Open markosanz opened this issue 9 years ago • 23 comments

The plugin stopped listing content some days ago. Any idea why this happens? Is it only me having the problem, maybe? Thanks.

markosanz avatar Sep 07 '15 19:09 markosanz

Same problem with my OSMC/Raspi2. Meaby they changed something at the website.

Pekafu avatar Sep 08 '15 19:09 Pekafu

Nelonen has release new version of ruutu. look like they changed everything

PetteriLah avatar Sep 09 '15 18:09 PetteriLah

Same problem here.

amergin avatar Sep 12 '15 18:09 amergin

I did some digging through the source files of their new design and found a way to download videos from their servers. What I haven't figured out yet is the way to get the list of all the shows and episodes nicely.

Also, I'm not that fluent with python at the moment that I could update the plugin itself in relatively reasonable time.

Ziticca avatar Sep 22 '15 18:09 Ziticca

Did a little digging to find out how Ruutu works:

GET @ http://www.ruutu.fi/ruutu_search/published-series JSON that shows all series and url for each series. Format:

{label: "Arman ja viimeinen ristiretki", value: "/series/1381171"}

GET @ http://www.ruutu.fi/component/690/update?series=?SERIESID&media_type=video_episode&orderby=sequence&order_direction=asc lists all episodes of that series as div elements. Example:

"<div class="item-list__item item-list__item item item-22 list-item video_episode video_episode-list-item video_episode-" data-video-id="2229549" data-season="2" data-sequence="13" data-content-id="" data-content-type="video_episode"> <a href="/video/2229549" class="item-list__item-link"> <div class="list-item-prefix"> <img src="http://static-gatling.nelonenmedia.fi/file/sites/default/files/styles/160x90/public/w_arman_ja_viimeinen_ristiretki_kausi_2_jakso_5_2560.jpg"alt="5 - Ecuador - viimeinen Waorani" /> <svg xmlns="http://www.w3.org/2000/svg" width="3em" height="3em" viewBox="0 0 48 48"><path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm-4 29V15l12 9-12 9z"/></svg> </div> <div class="list-item-main1 truncate"> 5 - Ecuador - viimeinen Waorani </div> <div class="list-item-main2 truncate"> <span class="prefix-piece"> (60min)</span> </div> </a> </div>"

Note the data-video-id="2229549" field

GET @ http://gatling.nelonenmedia.fi/media-xml-cache?id=VIDEOID XML file that lists episode synopsis and other detailed info like the episode thumbnail. The video url has a prefix of http://nelonenmedia-pmd.nelonenmedia.fi. Regex for the url, see here.

Example: for a episode Arman ja viimeinen ristiretki - Kausi 2 - Jakso 5 just GET @ http://gatling.nelonenmedia.fi/media-xml-cache?id=2229549 and fetch the video file at http://nelonenmedia-pmd.nelonenmedia.fi/video/49/carbon_735749_1000_none.mp4

Interestingly enough, the XML file lists video URLs for the premium content (and they seem to work without authentication). To be sure, episodes that have tag <span class="prefix-piece premium">Ruutu+</span> should be omitted from the series episode listing to avoid violating TOC or whatever.

With the above information it should be possible to rewrite the plugin to function again.

amergin avatar Oct 09 '15 21:10 amergin

And the video is also available with higher bitrate. The XML shows 720p with bitrate 3000. Just change 1000 to 3000 in the http url. http://nelonenmedia-pmd.nelonenmedia.fi/video/49/carbon_735749_3000_none.mp4

McNobody avatar Oct 15 '15 09:10 McNobody

@McNobody: nice catch, this definitely should be incorporated to the plugin. Or at least give the user the option to select between bitrates.

amergin avatar Oct 15 '15 10:10 amergin

Addition: the most popular episodes from the timeframe of one week can be listed by

GET @ http://www.ruutu.fi/component/527/update?media_type=video_episode&orderby=popularity_weekly&publishing_channel=nelonenmedia&order_direction=desc&limit=100

I cannot find any similar API calls to list the episodes by category (Viihde/Elokuvat/Dokumentit/...).

amergin avatar Oct 17 '15 23:10 amergin

See pull request https://github.com/szymex/xbmc-finnish-tv/pull/84 for a rudimentary implementation of the Ruutu addon.

amergin avatar Oct 19 '15 16:10 amergin

I'm seeing no interest in the new ruutu addon I've made a pull request of. Is this repo dead or simply is there no interest in the code?

amergin avatar Nov 30 '15 21:11 amergin

I am interested but have no idea what to do to use what you did. Needless to say I am new to GitHub.

markosanz avatar Nov 30 '15 23:11 markosanz

Thanks amergin for working to fix this, can you consider forking this repo if nothing else helps?

apfibox avatar Dec 03 '15 20:12 apfibox

Looks like the maintainer is missing. The main problem at the moment is that Areena plugin is not working any longer. Maybe you could use your skills with that?

teepean avatar Dec 04 '15 06:12 teepean

@teepean: indeed seems like the maintainer is missing and this is delaying things.

@apfibox: I'm thinking that perhaps we should create an Github organization (free of course) and several collaborators would have write access to that maintained repo. That way any one collaborator that goes missing does not halt the whole dev operation.

@markosanz: If you want to try the fork out, just git clone my branch https://github.com/amergin/xbmc-finnish-tv/tree/new-ruutu-addon/plugin.video.ruutu and then go and replace the existing plugin.video.ruutu folder (created by the szymex package) in your kodi plugin folder with the cloned folder.

I'm seeing issue https://github.com/szymex/xbmc-finnish-tv/issues/85 has some info about an attempt towards the new Yle API. Rather than everybody starts creating their own repos and the users would have to pull the repos separately, the organization repo would also help in housing all the content together.

amergin avatar Dec 06 '15 17:12 amergin

@amergin: Your good fix with ruutu is not working for me anymore. I get forbidden 403 in log file. Does anyone know more about this issue?

samariini avatar Dec 12 '15 16:12 samariini

This one from Mediaportal is working. Maybe it has some hints?

https://github.com/offbyoneBB/mp-onlinevideos2/blob/master/SiteUtilProjects/OnlineVideos.Sites.doskabouter/RuutuUtil.cs

teepean avatar Dec 12 '15 17:12 teepean

teepean: are you sure it is still working? According to onlinevideos it is broken: http://onlinevideos.nocrosshair.de/Reports.aspx?site=Ruutu.fi

samariini avatar Dec 14 '15 09:12 samariini

Yep, still working. Buffering takes a while but it does start playing.

EDIT: Looks like it was just fixed as well. But it was working when I tried it couple of days ago.

https://github.com/offbyoneBB/mp-onlinevideos2/commits/master/SiteUtilProjects/OnlineVideos.Sites.doskabouter/RuutuUtil.cs

teepean avatar Dec 14 '15 20:12 teepean

@samariini: I'm seeing this too. What previously worked, and which the fix relied upon, was getting the video URL from the Gatling XML and then playing it in Kodi. I thought it might have something to do with the bitrate selection but even the default 432p gives 403's.

Any ideas how this works nowadays? I see that by typing the m3u8 playlist file from the XML into VLC the video works. Example: XML file -> m3u8 -> points to chunked list. The chunking is probably for including ads.

Any ideas how to get past this?

amergin avatar Dec 15 '15 21:12 amergin

amergin: Can you play m3u8 file in kodi, or maybe use Python m3u8 parser? Someone say put the m3u8 link inside .strm file and play that. In your example, I dont see the typical ad what usually comes in web browser/android/iphone app so maybe the chunking is not for ads at all? If you can fix this with or without ads I would be very happy.

samariini avatar Dec 16 '15 09:12 samariini

@samariini: From the looks of it, FlickFetch and similar dl tools just download the chunks and then combine them into one file. Doing that in Kodi wouldn't be streaming anymore.

Playing the chunks in order would break rewind functionality in the Kodi player.

I don't see how the solution at @teepean's link works. It just points to the playlist i.e. plays the chunks in order.

amergin avatar Dec 16 '15 20:12 amergin

I edited ruutu.py and changed HTTPMediaFile -> CastMediaFile. For me this works, I dont mind about rewind.

samariini avatar Dec 17 '15 07:12 samariini

I rewrote the ruutu plugin and got it working again https://github.com/vesatoivonen/plugin.video.ruutu

vesatoivonen avatar Jan 06 '19 08:01 vesatoivonen