FAQ  •  Register  •  Login

Vevo Plugin

<<

brunohansen

Serviio newbie

Posts: 11

Joined: Wed Apr 24, 2013 2:50 am

Post Wed Apr 24, 2013 3:19 am

Vevo Plugin

I'm thinking about to create a Vevo plugin but I'm having no success adding a Web Resource plugin!

What is the problem with this plugin?

  Code:
import org.serviio.library.metadata.*
import org.serviio.library.online.*

class VevoBeta extends WebResourceUrlExtractor {
   
    String getExtractorName() {
      log("---> test")
      return getClass().getName()
    }
   
   int getVersion() {
      return 3
   }
   
    boolean extractorMatches(URL resourceUrl) {
      log("---> test2")
      return true
    }

   WebResourceContainer extractItems(URL resourceUrl, int maxItemsToRetrieve) {
      return null
   }
   
    ContentURLContainer extractUrl(WebResourceItem item, PreferredQuality requestedQuality) {
      return null
    }
}


thx
Last edited by brunohansen on Thu Apr 25, 2013 3:11 pm, edited 1 time in total.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Apr 24, 2013 8:52 am

Re: Plugin not added

So when you copy it to the plugins folder, it won't show in the log as added? It might take a minute.
<<

brunohansen

Serviio newbie

Posts: 11

Joined: Wed Apr 24, 2013 2:50 am

Post Wed Apr 24, 2013 1:37 pm

Re: Plugin not added

It doesn't show in the log! Don't mind how long I wait it doesn't show!

I've created a feed plugin and it does show in the log, maybe there's some problem with Web Resource Plugins!

It'll be amazing to create a Vevo plugin!
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Apr 24, 2013 1:56 pm

Re: Plugin not added

Do you try enable detailed logging ?
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

brunohansen

Serviio newbie

Posts: 11

Joined: Wed Apr 24, 2013 2:50 am

Post Wed Apr 24, 2013 3:14 pm

Re: Plugin not added

Illico wrote:Do you try enable detailed logging ?


No, but plugins don't show up in /rest/plugins.

I'll try to enable detailed logging.

Anyone could try my plugin? Maybe my code has some problem.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Apr 24, 2013 4:23 pm

Re: Plugin not added

I will try...
You have to copy/paste your code to a ./serviio/plugins/vevo.groovy file
Do you have another groovy file on plugins folder ?
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Apr 24, 2013 4:47 pm

Re: Plugin not added

Actually should be VevoBeta.groovy
<<

brunohansen

Serviio newbie

Posts: 11

Joined: Wed Apr 24, 2013 2:50 am

Post Wed Apr 24, 2013 5:08 pm

Re: Plugin not added

Illico wrote:I will try...
You have to copy/paste your code to a ./serviio/plugins/vevo.groovy file
Do you have another groovy file on plugins folder ?


I've deleted all plugins from plugins folder so it only has VevoBeta.groovy inside.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Apr 24, 2013 6:39 pm

Re: Plugin not added

So I have tested copy/paste your code into "VevoBeta.groovy" file.

And Serviio detect the plugin on log:

2013-04-24 20:37:37,828 INFO [PluginCompilerThread] Looking for plugins at C:\Program Files\Serviio\bin\..\plugins
2013-04-24 20:37:37,828 INFO [PluginCompilerThread] Started looking for plugins
2013-04-24 20:37:37,828 DEBUG [PluginCompilerThread] Starting plugin VevoBeta.groovy compilation
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Apr 24, 2013 6:51 pm

Re: Plugin not added

Suggest this code :
VevoBeta.groovy
(768 Bytes) Downloaded 771 times


Add WebResource url on serviio console: http://www.vevo.com


log:
2013-04-24 20:48:28,213 INFO [PluginCompilerThread] Looking for plugins at C:\Program Files\Serviio\bin\..\plugins
2013-04-24 20:48:28,213 INFO [PluginCompilerThread] Started looking for plugins
2013-04-24 20:48:28,213 DEBUG [PluginCompilerThread] Starting plugin VevoBeta.groovy compilation
...
2013-04-24 20:48:28,750 INFO [PluginCompilerThread] Added Web Resouce plugin VevoBeta (VevoBeta.groovy), version: 1
...
2013-04-24 20:48:54,564 DEBUG [OnlineLibraryManager] Resource http://www.vevo.com not in cache yet, loading it
2013-04-24 20:48:54,564 DEBUG [WebResourceParser] Parsing web resource 'http://www.vevo.com'
2013-04-24 20:48:54,565 DEBUG [WebResourceParser] Found matching url extractor (VevoBeta) for resource http://www.vevo.com
2013-04-24 20:48:54,565 DEBUG [FeedItemUrlExtractor] VevoBeta: Starting parsing resource: http://www.vevo.com
2013-04-24 20:48:54,665 DEBUG [FeedItemUrlExtractor] VevoBeta: ---> WebResourceContainer
2013-04-24 20:48:54,665 WARN [WebResourceParser] Plugin returned null container
2013-04-24 20:48:54,666 WARN [OnlineContentCacheDecorator] Could not store object to local cache (online_feeds): Value must not be null
2013-04-24 20:48:54,666 WARN [FeedUpdaterThread] An error occured while scanning for online item information, will continue
java.lang.NullPointerException
at org.serviio.library.online.OnlineLibraryManager.getEarliestItemExpiryDate(OnlineLibraryManager.java:313)
at org.serviio.library.online.OnlineLibraryManager.storeResourceExpiryDate(OnlineLibraryManager.java:358)
at org.serviio.library.online.OnlineLibraryManager.findResource(OnlineLibraryManager.java:177)
at org.serviio.library.online.OnlineLibraryManager.findResourceInCacheOrParse(OnlineLibraryManager.java:186)
at org.serviio.library.online.metadata.FeedUpdaterThread.getOnlineItems(FeedUpdaterThread.java:159)
at org.serviio.library.online.metadata.FeedUpdaterThread.run(FeedUpdaterThread.java:96)
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

brunohansen

Serviio newbie

Posts: 11

Joined: Wed Apr 24, 2013 2:50 am

Post Wed Apr 24, 2013 11:30 pm

Re: Plugin not added

Illico wrote:Suggest this code :
VevoBeta.groovy


Add WebResource url on serviio console: http://www.vevo.com



Thanks! Now it's worked, but I don't know why...

Just more few questions:

- Serviio comes with some lib to parse Json or XML, like Jax-B or Jackson? It would help a lot when developing plugins!
- Can a plugins use other plugin, like youtube plugin? It would help a lot to!
- Is there a way to send filters by DLNA?
- Is there a way to show more than 20 results and use something like pagination?
- Is there a way to configure buffer size, to work with bad conections?

- I'm using a Wd Tv Live 3 generation, I've selected its profile but i can play you tube videos when high resolution is selected on online sources. Wd Tv says there's no media in current folder... I'm not using you tube plugin. I'll try to use it.

Thanks again!
<<

brunohansen

Serviio newbie

Posts: 11

Joined: Wed Apr 24, 2013 2:50 am

Post Thu Apr 25, 2013 12:29 am

Re: Plugin not added

It worked nice with YouTube plugin!
<<

brunohansen

Serviio newbie

Posts: 11

Joined: Wed Apr 24, 2013 2:50 am

Post Thu Apr 25, 2013 4:40 am

Re: Plugin not added

I've generate feeds links like this one https://gdata.youtube.com/feeds/api/vid ... ults=1&v=2

Is there a way to delegate to YouTube plugin process it?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Apr 25, 2013 8:49 am

Re: Plugin not added

I guess you could just instantiate it and call a method on it. But it'd require the user to have both plugins installed, which is not so great.

Re xml/json - it's built into Groovy, look at the other plugins or examples (jsonparser/jsonslupres/xmlparser/xmlsluprer)
<<

brunohansen

Serviio newbie

Posts: 11

Joined: Wed Apr 24, 2013 2:50 am

Post Thu Apr 25, 2013 1:37 pm

Re: Plugin not added

zip wrote:I guess you could just instantiate it and call a method on it. But it'd require the user to have both plugins installed, which is not so great.


Yes, I can instantiate it. But FeedPlugin wait for a Map<String,URL> links provided for some Serviio Class so wich Serviio Class can I use to process a https://gdata.youtube.com/feeds/api... URL to get Map<String,URL> links?

  Code:
ContentURLContainer extractUrl(Map<String,URL> links, PreferredQuality requestedQuality)


zip wrote:Re xml/json - it's built into Groovy, look at the other plugins or examples (jsonparser/jsonslupres/xmlparser/xmlsluprer)


I've found it after I asked. Now I'm using jsonslupres, it's really nice!

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 3 guests

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