Author Topic: Plugin Update Notification/Updater  (Read 22357 times)

AvikB

  • Sr. Member
  • ****
  • Posts: 945
i dont know how you did it, but http://getmusicbee.com/rss updates every time i update the musicbee version
It is a bit different. since it only shows the latest version of musicbee.
But for addon updater, there are 100s of addons and the only way to get the exact addon is to use the ID.


For example even the URL to access the addon contains the ID. The XML manifest will simply store this addon ID in it.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
i dont need the add-on id - i just need a full list of plugin names and when each one was last updated.
I can match the plugin name against the cached values MB keeps from the plugin About block

Of course the plugin author will need to make sure the name on the add-ons page matches the one provided in the About block

AvikB

  • Sr. Member
  • ****
  • Posts: 945
I dont need to query by name - i just need a full list of names and when they were last updated
that is not possible right now. Also i don't think that is a good idea. Right now there is 100+ addons and to get full names of each and last update date it will run 100+ quarries each time it will get the list.
if 100 user tries to check for update at once, it will cause slowdown for the database.

also i am not sure how you are going to check WHICH addon needs to be updated without proper ID. since name of the addon can be different on website than the add-on file.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
ok fair enough - i thought it might be possible just to append to a file each plugin update

AvikB

  • Sr. Member
  • ****
  • Posts: 945
i dont need the add-on id - i just need a full list of plugin names and when each one was last updated. I can match the plugin name against the cached values MB keeps from the plugin About block Of course the plugin author will need to make sure the name on the add-ons page matches the one provided in the About block
also how are you going to see if the current plugin is the latest or not? If i get the last update date, what are you going to compare it with?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
the server file would have the last update date for each plugin - MB can cache that (it already caches the plugin name)

AvikB

  • Sr. Member
  • ****
  • Posts: 945
that could work. But i also need the addon ID since getting the list is not a viable solution.
Maybe you can add another field in the API like this:

and then cache it.
Also maybe a new function that can return an array of Plugins that has implemented the AddonID field.
That would make it much more easier. But then again what about skins? They are the ones that gets update quite a lot.

redwing

  • Guest
What I thought was plugin/skin authors put id/version info to the xml file (skin file for skins). Then MB reads and compares it with the server file to see if there's version update for the id and alert the user.

Then no need for additional updater just for alert unless it can actually update plugins.

AvikB

  • Sr. Member
  • ****
  • Posts: 945
What I thought was plugin/skin authors put id/version info to the xml file (skin file for skins). Then MB reads and compares it with the server file to see if there's version update for the id and alert the user. Then no need for additional updater just for alert unless it can actually update plugins.
welp we already discussed that instead of using versions we will use "last update date".
Also the same method won't work for theater mode or plugins. they will require some modification.

As for automatic update. i would love to implement this but we would need a Content Delivery Network, it is costly though.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
I could manually maintain a mapping file that maps add-on id to plugin name/ skin name
MB would load the mapping file from the getmusicbee.com website
Its not ideal but i dont think its too much of a burden to do

However if you are proposing a live query to support this, i dont think its a good idea as there will be a huge number of hits as MB would run the query every time MB is started. The add-ons page is already quite slow to load some times.
I always had in mind you would be appending to a text file each time a add-on is updated and that MB would load the file, so if thats not the case it might be better to go back to your original idea.

derTyp

  • Jr. Member
  • **
  • Posts: 71
Would it be possible to generate the xml file every hour/day etc. and host this static file instead of doing a live query every time? Or is this already too much load?

redwing

  • Guest
The XML file will store the "last updated" date as well, which will be modified by the updater.

I don't like this idea at all that requires keeping additional xml file for each skin/TM file just for update alert. I'd rather opt out.

AvikB

  • Sr. Member
  • ****
  • Posts: 945
I could manually maintain a mapping file that maps add-on id to plugin name/ skin name
MB would load the mapping file from the getmusicbee.com website
Its not ideal but i dont think its too much of a burden to do

However if you are proposing a live query to support this, i dont think its a good idea as there will be a huge number of hits as MB would run the query every time MB is started. The add-ons page is already quite slow to load some times.
I always had in mind you would be appending to a text file each time a add-on is updated and that MB would load the file, so if thats not the case it might be better to go back to your original idea.

actually doing a query is fast, since it only contains the json formatted data:


the addon page on the other hand takes some time. It is mostly due to image loading. I will do something about it in future.


I am not planning to append to a text file. I think the ideal solution is to have a .xml manifest file that would contain all the info needed for the update.
The updater will scan for the manifest files and get the update data only for the addons that are installed.


I don't think manually maintain a list is proper way to do it.

AvikB

  • Sr. Member
  • ****
  • Posts: 945

The XML file will store the "last updated" date as well, which will be modified by the updater.
I don't like this idea at all that requires keeping additional xml file for each skin/TM file just for update alert. I'd rather opt out.
Do you have any particular reasons fro disliking it? It will be only few byte or kb at best. and since it resides in the plugin/skin directory it won't make unnecessary folders in some obscure temp directory.

redwing

  • Guest
For the benefit, it's too much hassle for managing and organizing add-ons. Whenever you re-organize them, you have to find and move that xml file too. Also I don't want to make my already cluttered skin/TM folders more messy by adding those files. I'd rather check add-on updates manually.