PDA

View Full Version : Version numbers in install.xml and Plugin.pm ?



erland
2007-09-29, 02:04
Does anyone know if there is some way I can have the version number in install.xml and Plugin.pm in one place ?

I need to use the version number in the perl code in Plugin.pm to be able to check for compatibility regarding plugin configuration between different releases.

I need the version number in install.xml to show the correct version number of the plugin to the user in "Server Settings/Extras".

If I have the version number in two places, I'm a bit afraid that I will forget to change one of them when releasing a new version.

mherger
2007-09-29, 03:05
> Does anyone know if there is some way I can have the version number in
> install.xml and Plugin.pm in one place ?

You probably don't even need the one in Plugin.pm any more. PluginManager seems to look up the information from the xml file. So can you. IMHO it should be that way. If it isn't already, then it's probably due for a bug report with patch ;-)

Michael

andyg
2007-09-29, 05:55
On Sep 29, 2007, at 6:05 AM, Michael Herger wrote:

>> Does anyone know if there is some way I can have the version
>> number in
>> install.xml and Plugin.pm in one place ?
>
> You probably don't even need the one in Plugin.pm any more.
> PluginManager seems to look up the information from the xml file.
> So can you. IMHO it should be that way. If it isn't already, then
> it's probably due for a bug report with patch ;-)

It's not there now, but the xml version should probably be available
with $class->version from within a plugin. So it just needs added to
Slim::Plugin::Base and PluginManager.