FAQ  •  Register  •  Login

Plugin versioning

<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Dec 19, 2012 1:21 pm

Plugin versioning

Since 1.1, Serviio supports versioning your plugins. Just override method getVersion() and return an Integer. If not implemented, it defaults to 1.

I suggest, the easiest for you is to just increase the number by 1 with every new plugin release.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Wed Dec 19, 2012 1:53 pm

Re: Plugin versioning

I don't understand what this means. I currently generate a log message of the version being used when my plugins are run. What will this do?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Dec 19, 2012 3:00 pm

Re: Plugin versioning

The value will be listed when requesting a list of installed plugins.

http://docs.serviio.apiary.io/#onlineplugins

Can also be used with services like serviidb.com to ensure you have a minimal version installed for a certain feature, etc. It'll also be printed in serviio.log, so should be easier to debug issues.
<<

Xmantium

User avatar

DLNA master

Posts: 1396

Joined: Sat Jul 23, 2011 2:12 pm

Location: Manchester, UK

Post Wed Dec 19, 2012 4:30 pm

Re: Plugin versioning

Wouldnt it be better to follow the 0.0.0.0 format or even 0.0.0
This format is used by so many app markets and plugins by XBMC follow the same version number format rather than a whole integer
Sony Bravia 2010 52NX803 - Sony PS3 - Xbox 360
Serviio running on QNAP NAS 639 Pro - 1.6 Intel Dual Core - 2GB RAM and QNAP NAS 121 - 2Ghz ARM Marvell - 1GB RAM
Console using ServiiDroid for Android, ServiiMetro and ServiiWP for Windows Phone and WebUI for iOS
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Dec 19, 2012 5:34 pm

Re: Plugin versioning

Xmantium wrote:Wouldnt it be better to follow the 0.0.0.0 format or even 0.0.0
This format is used by so many app markets and plugins by XBMC follow the same version number format rather than a whole integer

No. This value is there just to track revision history and is much easier to compare that any free text.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Dec 30, 2012 6:19 pm

Re: Plugin versioning

This is not of much value.
Currently it only displays when the plugin is added
  Code:
2012-12-30 13:04:40,390 INFO  [PluginCompilerThread] Added Web Resouce plugin YouTubeTop100 (Top100.groovy), version: 19
so it will only be in the log at startup time so not present in the section of the log displaying problems when a plugin is executed as below:
  Code:
2012-12-30 13:05:39,875 DEBUG [OnlineLibraryManager] Resource http://www.youtubetop100.com?res=720&start=1&for=10 not in cache yet, loading it
2012-12-30 13:05:39,875 DEBUG [WebResourceParser] Parsing web resource 'http://www.youtubetop100.com?res=720&start=1&for=10'
2012-12-30 13:05:39,876 DEBUG [WebResourceParser] Found matching url extractor (YouTubeTop100) for resource http://www.youtubetop100.com?res=720&start=1&for=10
2012-12-30 13:05:39,876 DEBUG [FeedItemUrlExtractor] YouTubeTop100: Starting parsing resource: http://www.youtubetop100.com?res=720&start=1&for=10

It is still necessary for me to generate this log message to display the version info at feed parse time.
  Code:
2012-12-30 13:05:39,876 DEBUG [FeedItemUrlExtractor] YouTubeTop100: Parsing with Top100 V19

The version info should be automatically displayed when the plugin is executed.
<<

r-win

User avatar

DLNA master

Posts: 100

Joined: Sun May 22, 2011 6:16 am

Location: Lelystad, Netherlands

Post Sun Dec 30, 2012 9:49 pm

Re: Plugin versioning

I agree, jbh50. Just got an exception report of one of my plugins, and it also lacks the version number.

Zip, can you add the version to the plugin related log lines?
Linksys WRT320N | Samsung PS-50C7700 | Microsoft XBOX 360 | Windows 8.1 | Linux Ubuntu 13.04
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Dec 31, 2012 12:00 am

Re: Plugin versioning

It wasn't intended for logging much, although we can add something around that too. Mostly it was there to integrate with external systems like serviidb.com, so that when we have a plugin repository at some point you can be notified there is a new version available, etc. So it's mostly one for the future.
<<

r-win

User avatar

DLNA master

Posts: 100

Joined: Sun May 22, 2011 6:16 am

Location: Lelystad, Netherlands

Post Fri Jan 04, 2013 3:24 pm

Re: Plugin versioning

I understand, but now that we have it........ :twisted:
Linksys WRT320N | Samsung PS-50C7700 | Microsoft XBOX 360 | Windows 8.1 | Linux Ubuntu 13.04
<<

qanatoz

User avatar

Serviio lover

Posts: 64

Joined: Sun Feb 19, 2012 8:33 pm

Post Mon Jan 21, 2013 11:14 pm

Re: Plugin versioning

Xmantium wrote:Wouldnt it be better to follow the 0.0.0.0 format or even 0.0.0
This format is used by so many app markets and plugins by XBMC follow the same version number format rather than a whole integer

Agree x.x.x or x.x.x.x version format numbers is standard way for software versioning.
http://en.wikipedia.org/wiki/Software_versioning
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Jan 21, 2013 11:35 pm

Re: Plugin versioning

It's just a label. The major.minor type gives us absolutely no advantage, only introduces possible type check problems.
<<

ttguy

Serviio lover

Posts: 63

Joined: Sun May 27, 2012 10:52 am

Post Sun Mar 24, 2013 1:08 pm

Re: Plugin versioning

zip is correct.

Is ver 1.10 newer than version 1.2 ?
1.10 is a number smaller than 1.2 so 1.2 must be a newer version than 1.10 right?
Integer version numbers just make it simpiler for the program to know what is newer than what.
--
linux/Humax HDR-3000T

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 2 guests

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