FAQ  •  Register  •  Login

Error on plugin!!

<<

ritzzen

Streaming enthusiast

Posts: 27

Joined: Mon Nov 28, 2011 5:04 pm

Post Sat Feb 11, 2012 7:49 am

Error on plugin!!

Hi ,

I wrote a plugin to extract the image feed. But its failing with following error. Please help me to fix this. I am not very familiar with plugin code, just picked up existing one and tried to modify them. Appreciate any help.

Error log says

2012-02-11 02:18:59,959 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 138)
2012-02-11 02:18:59,960 DEBUG [OnlineLibraryManager] Resource http://feeds.feedburner.com/Pixses not in cache yet, loading it
2012-02-11 02:18:59,960 DEBUG [FeedParser] Parsing feed 'http://feeds.feedburner.com/Pixses'
2012-02-11 02:19:01,005 DEBUG [FeedParser] Found matching url extractor (PixsesURLextract) for resource http://feeds.feedburner.com/Pixses
2012-02-11 02:19:01,006 DEBUG [FeedItemUrlExtractor] PixsesURLextract: Starting extraction of url for item: NRI Beauty Preeti Desai Sizzles on Screen
2012-02-11 02:19:02,005 DEBUG [FeedItemUrlExtractor] PixsesURLextract: Extract URL: http://www.pixses.com/nri-beauty-preeti ... creen.html
2012-02-11 02:19:02,017 DEBUG [FeedItemUrlExtractor] PixsesURLextract: Finished extraction of url: ContentURLContainer [fileType=IMAGE, contentUrl=http://www.pixses.com/wp-content/uploads/preeti_desai_07.jpg, live=false, expiresImmediately=false, ]
2012-02-11 02:19:02,017 DEBUG [FeedParser] Cannot add feed entry of feed PIXSES | Hot Picture Special Collection because of invalid metadata. Message: Unknown online item image container.

And here is my plugin code
  Code:
import org.serviio.library.metadata.*
import org.serviio.library.online.*
import org.serviio.util.*


/** Pixses.com content URL extractor plugin.
 *
 * Based on Youtube.groovy by Petr Nejedly
 *
 * @author Erwin Bovendeur
 *
 */
class PixsesURLextract extends FeedItemUrlExtractor {

   final VALID_FEED_URL = '^http://feeds.feedburner.com/Pixses*'

   String getExtractorName() {
      return getClass().getName();
   }

   boolean extractorMatches(URL feedUrl) {
      return feedUrl ==~ VALID_FEED_URL;
   }

   
   ContentURLContainer extractUrl(Map links, PreferredQuality requestedQuality) {
      def linkUrl = links.alternate != null ? links.alternate : links.default
                String pageHtml = linkUrl.getText()
                def seqVarMatcher = pageHtml =~ 'http://www.pixses.com/wp-content/uploads.+jpg'
                assert seqVarMatcher != null
                def contentUrl = seqVarMatcher[0]
      log("Extract URL: " + linkUrl)
      return new ContentURLContainer(fileType: MediaFileType.IMAGE, contentUrl: contentUrl)           
   }

   /* Groovy test method */
   static void main(args) {
      PixsesURLextract extractor = new PixsesURLextract()
      assert extractor.extractorMatches( new URL("http://feeds.feedburner.com/Pixses"))
      Map links = ['default': new URL("http://www.pixses.com/nri-beauty-preeti-desai-sizzles-on-screen.html")]
      ContentURLContainer result = extractor.extractUrl(links, PreferredQuality.MEDIUM)
      println "Result: $result"
   }
}



Thanks

Ritz
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sat Feb 11, 2012 1:01 pm

Re: Error on plugin!!

Plugin seems good, no ideas
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
<<

ritzzen

Streaming enthusiast

Posts: 27

Joined: Mon Nov 28, 2011 5:04 pm

Post Sat Feb 11, 2012 1:23 pm

Re: Error on plugin!!

Is there a different method to handle image feeds? I was thinking since i followed the plugin code from a video feed, so it is getting this kind of error for image feed.

'because of invalid metadata. Message: Unknown online item image container."
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sat Feb 11, 2012 1:34 pm

Re: Error on plugin!!

ritzzen wrote:'because of invalid metadata. Message: Unknown online item image container."

Yes, this is the error source...don't know why ... will ask to ZIP.
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 Sat Feb 11, 2012 2:28 pm

Re: Error on plugin!!

Oops, it's a bug which won't allow images properly processed when coming from plugins. I raised a ticket: https://bitbucket.org/xnejp03/serviio/i ... rt-plugins
<<

ritzzen

Streaming enthusiast

Posts: 27

Joined: Mon Nov 28, 2011 5:04 pm

Post Sat Feb 11, 2012 3:16 pm

Re: Error on plugin!!

So it mean this fix would be available in the next release right?

Thanks

Ritz
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Feb 11, 2012 3:49 pm

Re: Error on plugin!!

yes
<<

ritzzen

Streaming enthusiast

Posts: 27

Joined: Mon Nov 28, 2011 5:04 pm

Post Sat Feb 11, 2012 8:38 pm

Re: Error on plugin!!

Looks like there is another bug, not very sure about it, but thats what it looks to me, if serviio finds thumburl as feed(thumburl encoded as "enclosure url="), it does not use plugin. what i mean to say that once serviio finds a feed and if we want to override it by using a plugin, it does not accept the plugin.
Let me know your say on it.

Thank

Ritz
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Feb 12, 2012 1:50 am

Re: Error on plugin!!

ritzzen wrote:Looks like there is another bug, not very sure about it, but thats what it looks to me, if serviio finds thumburl as feed(thumburl encoded as "enclosure url="), it does not use plugin. what i mean to say that once serviio finds a feed and if we want to override it by using a plugin, it does not accept the plugin.
Let me know your say on it.

Thank

Ritz

looking at the code it should run plugin if the matches() method returns true

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 10 guests

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