FAQ  •  Register  •  Login

Pure Java plugin development

<<

MKej

Serviio newbie

Posts: 4

Joined: Sat Mar 31, 2012 9:50 am

Post Sat Mar 31, 2012 10:02 am

Pure Java plugin development

Hello,

First of all, I'd like to say that your software is simply amazing. It gets the job done, yet it seems very lightweight, unlike other similar solutions.

It pleases me even more that it is written in Java - language I've been earning my living with since years.
I got excited when I found that there is a plugin engine and jumped into dev guide right away.

The problem I have is that plugins need to be .groovy files. Is there any possibility that I could deploy them simply as jars?
Classes that need to be implemented look like there should be no trouble in implementing them in pure Java.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16726

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Mar 31, 2012 10:52 am

Re: Pure Java plugin development

Groovy is very similar to Java and you can basically write Java code in groovy classes. Give it a try, it's very nice and has a lot of features that java's missing and does a lot of things more elegantly (handling collections, dates, regex, xml, etc)
<<

MKej

Serviio newbie

Posts: 4

Joined: Sat Mar 31, 2012 9:50 am

Post Sat Mar 31, 2012 12:36 pm

Re: Pure Java plugin development

I agree with what you said, but the problem is rather in packaging. Say, I would like my plugin to span to multiple classes. It's possible both for Java and Groovy to place them all in one .java/.groovy file, but will make the file itself less readable.

It's a very minor thing, as most online content plugins should not be as large. But do you consider expanding the plugin architecture to other components? I'm currently working on on-the-fly converter of subtitle formats, so that not only .srt will be supported. It would be great if I could send it to you as a plugin later on.
<<

kairoh

DLNA master

Posts: 178

Joined: Sun Aug 08, 2010 10:41 am

Location: France

Post Sat Mar 31, 2012 3:40 pm

Re: Pure Java plugin development

MKej wrote:I'm currently working on on-the-fly converter of subtitle formats, so that not only .srt will be supported. It would be great if I could send it to you as a plugin later on.

I've i've coded this to convert SSA -> SRT and SUB -> SRT.
It works in memory but may be written to a new srt file (maybe others transcoding option should be added).
There is 2 opened tickets : #246 and #63.
Serviio WebUI console developer : New Homepage | Support | Project | Issues

Samsung UA32C6600 | WinXP / Ubuntu 11.10 | Samsung Galaxy S | Freebox v6
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play HowTo: Turn on detailed logging
<<

MKej

Serviio newbie

Posts: 4

Joined: Sat Mar 31, 2012 9:50 am

Post Sat Mar 31, 2012 3:54 pm

Re: Pure Java plugin development

kairoh wrote:I've i've coded this to convert SSA -> SRT and SUB -> SRT.
It works in memory but may be written to a new srt file (maybe others transcoding option should be added).
There is 2 opened tickets : #246 and #63.

Thank you for pointing this out, although I have already completed my implementation.

There's still the question of how to integrate it with serviio, at least for private use. The only solution I see is to create a jar file overriding some of the base serviio classes and putting it in /lib/, hoping the classloader will reach them before original ones.
I'm afraid it is against serviio terms of use, though.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16726

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Mar 31, 2012 5:13 pm

Re: Pure Java plugin development

MKej wrote:I'm afraid it is against serviio terms of use, though.

You can do that, for personal use.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16726

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Mar 31, 2012 5:14 pm

Re: Pure Java plugin development

MKej wrote:But do you consider expanding the plugin architecture to other components? I'm currently working on on-the-fly converter of subtitle formats, so that not only .srt will be supported. It would be great if I could send it to you as a plugin later on.

Not at the moment.
<<

Helen222

Serviio newbie

Posts: 7

Joined: Wed Feb 28, 2018 9:12 pm

Post Fri Jul 20, 2018 12:09 pm

Re: Pure Java plugin development

This is a great thread! I've recently started learning programming languages. It wasn't easy for me to decide what language to start with. Having explored the subject, I found out that Java is a dominant among other languages. Of course, there are many other advantages, and one of them is salary. The article on https://diceus.com/java-developer-salary/ explained me the subject in more detail. I should say, Java developers have pretty high wages, and it was one of the reasons for me to start exactly with Java. And I'm sure the information given here will be useful for me. Thanks for sharing!

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.