Page 1 of 1

Plugin versioning

PostPosted: Wed Dec 19, 2012 1:21 pm
by zip
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.

Re: Plugin versioning

PostPosted: Wed Dec 19, 2012 1:53 pm
by jhb50
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?

Re: Plugin versioning

PostPosted: Wed Dec 19, 2012 3:00 pm
by zip
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.

Re: Plugin versioning

PostPosted: Wed Dec 19, 2012 4:30 pm
by Xmantium
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

Re: Plugin versioning

PostPosted: Wed Dec 19, 2012 5:34 pm
by zip
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.

Re: Plugin versioning

PostPosted: Sun Dec 30, 2012 6:19 pm
by jhb50
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.

Re: Plugin versioning

PostPosted: Sun Dec 30, 2012 9:49 pm
by r-win
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?

Re: Plugin versioning

PostPosted: Mon Dec 31, 2012 12:00 am
by zip
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.

Re: Plugin versioning

PostPosted: Fri Jan 04, 2013 3:24 pm
by r-win
I understand, but now that we have it........ :twisted:

Re: Plugin versioning

PostPosted: Mon Jan 21, 2013 11:14 pm
by qanatoz
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

Re: Plugin versioning

PostPosted: Mon Jan 21, 2013 11:35 pm
by zip
It's just a label. The major.minor type gives us absolutely no advantage, only introduces possible type check problems.

Re: Plugin versioning

PostPosted: Sun Mar 24, 2013 1:08 pm
by ttguy
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.