FAQ  •  Register  •  Login

ARD-Mediathek

<<

Physikus

Serviio newbie

Posts: 8

Joined: Sun Apr 03, 2016 1:06 pm

Post Sun Apr 03, 2016 1:24 pm

ARD-Mediathek

New plugin for ARD "Mediathek"
it should give access to the stored content, but not to live-streams
fsk rated videos are accessible all the time and not only after 20:00 or 22:00

The following URL should give access to a variety of Tatort episodes and related clips

Web Resource:
http://www.ardmediathek.de/tv/suche?searchText=tatort


best

Physikus
Attachments
ARD.groovy
ARD-Mediathek plugin
(9.28 KiB) Downloaded 892 times
<<

bitmaster

Serviio newbie

Posts: 6

Joined: Mon Apr 11, 2016 10:19 am

Post Wed Jun 15, 2016 7:18 am

Re: ARD-Mediathek

Physikus, thank you for this plugin!

Unfortunately, it's not working for me. The plugin is recognized by serviio and it starts parsing, but doesn't retrieve any content, i.e. actually no online content is being stored. Here is my log output (following your 'tatort' example):
  Code:
2016-06-14 22:54:09,231 DEBUG [OnlineLibraryManager] Resource http://www.ardmediathek.de/tv/suche?searchText=tatort not in cache, (re)loading it
2016-06-14 22:54:09,232 DEBUG [WebResourceParser] Parsing web resource 'http://www.ardmediathek.de/tv/suche?searchText=tatort'
2016-06-14 22:54:09,232 DEBUG [WebResourceParser] Found matching url extractor (ARD-Mediathek) for resource http://www.ardmediathek.de/tv/suche?searchText=tatort
2016-06-14 22:54:09,232 DEBUG [FeedItemUrlExtractor] ARD-Mediathek: Starting parsing resource: http://www.ardmediathek.de/tv/suche?searchText=tatort
2016-06-14 22:54:09,431 DEBUG [OnlineContentCacheDecorator] Stored online content 'http://www.ardmediathek.de/tv/suche?searchText=tatort' in the cache (online_feeds), returning it
2016-06-14 22:54:09,431 DEBUG [OnlineLibraryManager] Resource http://www.ardmediathek.de/tv/suche?searchText=tatort will expire in the cache on Fri Jun 24 22:54:09 CEST 2016


Any hints?

Cheers,
bitmaster
Serviio Pro 1.6.1 on Ubuntu 14.04
<<

Physikus

Serviio newbie

Posts: 8

Joined: Sun Apr 03, 2016 1:06 pm

Post Wed Jun 15, 2016 6:37 pm

Re: ARD-Mediathek

Hi bitmaster,

well, I just looked at my configuration. I have configured the URL exactly as shown in the example and it's working fine for me.
My serviio is running under Windows (WHS2011).
Have you tried the URL with a webbrowser?
Maybe it's some kind of geoblocking. I'm from Germany as you may have guessed.

Perhaps another ULR like 'http://www.ardmediathek.de/tv/suche?searchText=tagesschau' is working?

Currently I have no clue why it's not working for you.

Best Physikus
<<

bitmaster

Serviio newbie

Posts: 6

Joined: Mon Apr 11, 2016 10:19 am

Post Fri Jun 17, 2016 11:06 am

Re: ARD-Mediathek

Hi Physikus,

I'm from Germany as well :-) I have tested with a few other search strings, but no luck - maybe it's related to the server version. Which version of serviio are you using? Mine is 1.6.1 Pro on Ubuntu 14.04.

I'll also try increasing my log level to see whether it could be a problem with my version of ffmpeg...

Viele Grüße,
bitmaster

Edit: All the search URLs are working in my web browser.
Serviio Pro 1.6.1 on Ubuntu 14.04
<<

Physikus

Serviio newbie

Posts: 8

Joined: Sun Apr 03, 2016 1:06 pm

Post Sat Jun 18, 2016 8:46 am

Re: ARD-Mediathek

Hi,

I'm also running Serviio 1.6.1 pro. The main difference seems to be the operating system (Windows Home Server 2011 for me).

I used the following addinional log config:

  Code:
 <category name="org.serviio.external">
    <priority value="DEBUG"/>
 </category>
 <category name="org.serviio.upnp.webserver">
    <priority value="DEBUG"/>
 </category>
 <category name="org.serviio.renderer">
    <priority value="DEBUG"/>
 </category>
 <category name="org.serviio.delivery">
    <priority value="DEBUG"/>
 </category>
 <category name="org.serviio.library.online">
   <priority value="DEBUG"/>
 </category>


The log is showing something like this:

  Code:
2016-06-18 10:24:13,808 DEBUG [OnlineLibraryManager] Resource http://www.ardmediathek.de/tv/suche?searchText=arte not in cache, (re)loading it
2016-06-18 10:24:13,808 DEBUG [WebResourceParser] Parsing web resource 'http://www.ardmediathek.de/tv/suche?searchText=arte'
2016-06-18 10:24:13,808 DEBUG [WebResourceParser] Found matching url extractor (ARD-Mediathek) for resource http://www.ardmediathek.de/tv/suche?searchText=arte
2016-06-18 10:24:13,808 DEBUG [FeedItemUrlExtractor] ARD-Mediathek: Starting parsing resource: http://www.ardmediathek.de/tv/suche?searchText=arte
2016-06-18 10:24:15,836 DEBUG [FeedItemUrlExtractor] ARD-Mediathek: Starting extraction of url for item: Invasive Arten
2016-06-18 10:24:15,945 DEBUG [FeedItemUrlExtractor] ARD-Mediathek: Finished extraction of url: ContentURLContainer [fileType=VIDEO, contentUrl=http://www.hr.gl-systemhaus.de/mp4/ARDmediathek/2015_08/150812213619_aw_arten_67458_webl_ard.mp4, thumbnailUrl=http://www.ardmediathek.de/image/00/30/03/37/24/445341358/16x9/512, expiresOn=Mon Jun 20 10:24:00 CEST 2016, expiresImmediately=false, cacheKey=ARD-30033718ASSET_H, live=false, userAgent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36]
2016-06-18 10:24:15,946 DEBUG [WebResourceParser] Stored item with key 'ARD-30033718' to cache
2016-06-18 10:24:15,946 DEBUG [WebResourceParser] Added resource item 1: 'Invasive Arten' (http://www.hr.gl-systemhaus.de/mp4/ARDmediathek/2015_08/150812213619_aw_arten_67458_webl_ard.mp4)
2016-06-18 10:24:15,946 DEBUG [FeedItemUrlExtractor] ARD-Mediathek: Starting extraction of url for item: Invasive Arten in Deutschland
2016-06-18 10:24:16,186 DEBUG [FeedItemUrlExtractor] ARD-Mediathek: Finished extraction of url: ContentURLContainer [fileType=VIDEO, contentUrl=http://mvideos.daserste.de/videoportal/Film/c_440000/447602/format544106.mp4, thumbnailUrl=http://www.ardmediathek.de/image/00/22/48/79/78/816011761/16x9/512, expiresOn=Mon Jun 20 10:24:00 CEST 2016, expiresImmediately=false, cacheKey=ARD-22487968ASSET_H, live=false, userAgent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36]
2016-06-18 10:24:16,186 DEBUG [WebResourceParser] Stored item with key 'ARD-22487968' to cache


Please try the obove log configuration and post the result.
What about the ZDF-plugin. Is it not working also?

Physikus
<<

bitmaster

Serviio newbie

Posts: 6

Joined: Mon Apr 11, 2016 10:19 am

Post Sat Jun 18, 2016 7:38 pm

Re: ARD-Mediathek

[Edit: Saw your answer just now, sorry! ZDF plugin is working, found the problem with these loggging settings and the standalone debugging instructions from the wiki]

...finally got it to work...

I had set the "Max number of feed items to retrieve" to unlimited, which sets
  Code:
maxItemsToRetrieve = -1

This made the item list size always larger than
  Code:
maxItemsToRetrieve

which made the extractItems function not loop over the found URLs.

I attached a new version which will extract all available items when set to unlimited (watch out... ;) ). I also extended the buildItem function to append the extracted date to the item titles (useful for e.g. Tagesschau items, and also some Tatorts which have no date in their main title).

Hope this may also help a few others ;-)

And thanks again to Physikus for this very useful plugin!

Cheers,
Bitmaster

PS: Here's a diff:
  Code:
2d1
< import org.apache.commons.lang.StringUtils
112c111
<             for (def i = 0; i < matcher.getCount() && list.size() < maxItemsToRetrieve | maxItemsToRetrieve == -1; i++) {
---
>             for (def i = 0; i < matcher.getCount() && list.size() < maxItemsToRetrieve; i++) {
130c129
<             if (list.size() < maxItemsToRetrieve | maxItemsToRetrieve == -1) {
---
>             if (list.size() < maxItemsToRetrieve) {
204,206d202
<         // extract date from subtitle and append to item title
<         def date = StringUtils.left(matches[4].toString(), 10)
<         title += ", " + date
Attachments
ARD.groovy
(9.53 KiB) Downloaded 685 times
Serviio Pro 1.6.1 on Ubuntu 14.04
<<

Physikus

Serviio newbie

Posts: 8

Joined: Sun Apr 03, 2016 1:06 pm

Post Mon Jun 20, 2016 7:12 pm

Re: ARD-Mediathek

Hi bitmaster,

thanks for investigating this issue. In my configuration I've set a limit for online retrieval. So I did not run into this error. :)
But I'm astonished that your solution is working correctly. I think the check in the loop should be something like this
  Code:
for (def i = 0; i < matcher.getCount() && (list.size() < maxItemsToRetrieve || maxItemsToRetrieve == -1); i++) {...}

and not
  Code:
for (def i = 0; i < matcher.getCount() && list.size() < maxItemsToRetrieve | maxItemsToRetrieve == -1; i++) {...}

because | is a bitwise and not a logical operator and because of operator precedence.

Best,
Physikus
<<

bitmaster

Serviio newbie

Posts: 6

Joined: Mon Apr 11, 2016 10:19 am

Post Mon Jun 20, 2016 8:25 pm

Re: ARD-Mediathek

Hi Physikus,

the | should be the bitwise OR of the boolean results of the "less than" and the "equals" operations - so bitwise should be fine.
Initially I had set braces around terms according to the desired precedence, but removed all of them after checking for the Java/Groovy operator precedence, which as far as I could see should be fine (I'm not very familiar with Java/Groovy):
comparison -> binary (& | ^) -> logical (&& ||)

Best,
Bitmaster
Serviio Pro 1.6.1 on Ubuntu 14.04
<<

Physikus

Serviio newbie

Posts: 8

Joined: Sun Apr 03, 2016 1:06 pm

Post Tue Jun 21, 2016 4:56 pm

Re: ARD-Mediathek

You're right.
Bitwise OR has a slightly higher precedence than logical AND.

Return to Available plugins

Who is online

Users browsing this forum: No registered users and 25 guests

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