Plugin development problem
- Code:
import org.serviio.library.metadata.MediaFileType;
import org.serviio.library.online.*;
/**
* WebResource extractor plugin example
*
* @author Jonathan Brain
* @website http://brainforge.co.uk
* @version 1.0
*/
class BrainForge extends WebResourceUrlExtractor{
protected final static VALID_WEB_RESOURCE_URL = '^brainforge://.*.pxf.*$'
protected static final int PLUGIN_VERSION = 1
@Override
protected WebResourceContainer extractItems(URL url, int i) {
// TODO
// return uk.co.brainforge.serviio.dosomething(url);
String webResourceTitle="Unknown title"
String thumbnailUrl="";
return new WebResourceContainer(title: webResourceTitle ,thumbnailUrl:thumbnailUrl, items: items)
}
@Override
protected ContentURLContainer extractUrl(WebResourceItem webResourceItem, PreferredQuality preferredQuality) {
return new ContentURLContainer(fileType:MediaFileType.IMAGE, thumbnailUrl:webResourceItem.additionalInfo.thumbnailURL, contentUrl:webResourceItem.additionalInfo.sourceURL)
}
@Override
boolean extractorMatches(URL url) {
return true;
}
@Override
String getExtractorName() {
return getClass().getName()
}
@Override
int getVersion() {
return PLUGIN_VERSION;
}
}
In the Serviio library I have a Web Resource configured.
Media type image selected.
Source URL configured as:
In serviio.log I see the following messages:
2017-06-08 09:13:27,075 INFO [PluginCompilerThread] Added Web Resouce plugin BrainForge (brainforge.groovy), version: 1
2017-06-08 09:14:02,049 WARN [FeedUpdaterWorker] An error occured while trying to parse an online resouce requiring a plugin, provide the plugin or remove the resource: No plugin for web resource brainforge://t:/temp/temp.pxf has been found.
Why is my plugin not being found