Add-On Repository

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
LRFalk01 Offline
Junior Member
Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #1
I've started work on a new Add-On for Follw.it integration. It isn't release ready or anything, but I am having difficulty figuring out how to get auto update to work.

I have a repo setup: Google Code Page, but when I increment the version number in the addon.xml, the installed addon does not update. Is there something that I am missing? I also noticed that the update button in the add-on details is greyed out. Is there something I forgot to do?

Thanks,
Lucas
find quote
Bstrdsmkr Offline
Posting Freak
Posts: 803
Joined: Oct 2010
Reputation: 17
Post: #2
You also need to update the md5
find quote
LRFalk01 Offline
Junior Member
Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #3
It looks like the script I found to generate this may not be returning the proper value.
m = md5.new( open( "addons.xml" ).read() ).hexdigest()
'4cd0121bb7f0eecfda839e956acbc7f7'

I changed the value to what an md5 checker said was valid
'071C31D797438BE316B4BB20D582C8E4'

It still is not prompting for update when xbmc starts. Is this something that xbmc will only check once a day or something?
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #4
addon.xml is irrelevant in the context. addons.xml run the show. You then md5 this file. This checksum is checked on a 6h interval on each client. The seed for the checksum is irrelevant, all that matters is that it changes when the repository changes.
(This post was last modified: 2012-04-06 17:18 by spiff.)
find quote
LRFalk01 Offline
Junior Member
Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #5
Is there a way to force the check while I am trying to test this?
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #6
Of course. Context menu...
find quote
LRFalk01 Offline
Junior Member
Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #7
Okay. I believe the md5 is now valid. The repo has the plugin as version 0.0.5, and I have 0.0.4 installed. At some point will xbmc check the repo and install the new version automatically?

The update option for the add-on is greyed out. Am I looking at the wrong context menu?

(I am very sorry for my ignorance)
(This post was last modified: 2012-04-06 17:24 by LRFalk01.)
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #8
Yes that is not even a context menu. Context menu = right click menu (c on a keyboard). Open that on the correct context, your repository, and voila.
find quote
LRFalk01 Offline
Junior Member
Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #9
I found the force refresh option and ran it. Add-on automatically updated. Thank you very much for help.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,914
Joined: Aug 2007
Reputation: 102
Location: Eastleigh, UK
Post: #10
Slightly off-topic but the addons_xml_generator.py doesn't append 'addons.xml' to the generated code.

ie 7d0ac33f501a84d52778045750acc63c instead of 7d0ac33f501a84d52778045750acc63c addons.xml

So running the md5 file doesn't actually check anything.
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #11
We just compare file contents so as long as it is consequent it is fine
find quote
LRFalk01 Offline
Junior Member
Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #12
That turned out to be a good thing seeing how the python script isn't generating the correct md5 anyway. I'll have to work on getting the script to work correctly. Thanks for the heads up Hitcher.
find quote
LRFalk01 Offline
Junior Member
Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #13
Fixed the md5 not vailid issue on the generator script. It looks like it was an issue with how python opens files in Windows. Open the the file in 'rb' mode to fix the md5 not being right, also appended the file name. TeraCopy validates the file now. Everything is golden now. Thanks again everyone.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,914
Joined: Aug 2007
Reputation: 102
Location: Eastleigh, UK
Post: #14
Just noticed this myself as well.

I was previously using Little MD5-Creator to make them but have recently switched over to a more automated repo updater for my skins so as to eliminate human error.

EDIT: Care to post the updated script?

Thanks.

PS. Might also be worth editing the wiki link.
(This post was last modified: 2012-04-06 18:02 by Hitcher.)
find quote
LRFalk01 Offline
Junior Member
Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #15
Here you go:
addons_xml_generator.py
I changed the script from using the md5 import to using hashlib. From what I read, md5 is depreciated.

Yeah, the project is not quit ready for anyone to use yet. It is almost there. I do plan on spending some time on the wiki before I have anyone use it.
(This post was last modified: 2012-04-06 18:06 by LRFalk01.)
find quote
Post Reply