How does XBMC download uncompressed addon directory trees from http?
#1
Hi there, i was inspired by anarchintosh's aggregate repo project (that he/she clearly never actually started) and have begun writing a repository aggregator for XBMC, in python. This means duplicating in python the code used in XBMC to download an addon from a repository.

I've written a whole lot of the python classes necessary for this already, but i need to ask the XBMC team: How does the repository framework (introduced in Dharma) check out an uncompressed addon directory from a repository? How can any http server be used to host an uncompressed repository, when there is no way of remotely walking the directory trees?

Walking seems necessary for any repository that does not use the standardised file format of compressed addons (ie. for compressed addons the names of all files in the addon directory - changelog, zip, icon, fanart, addon.xml - on the http server can be predicted and constructed).

It seems like pure magic that XBMC can download an uncompressed addon... how does it find the names of the various python filenames and subdirectories etc?

Is there possibly something funny going on with a curl wget like function?
Reply
#2
that is pretty much what's going on, directory listing ability is required on the server side.
Reply
#3
(2012-04-10, 18:55)spiff Wrote: that is pretty much what's going on, directory listing ability is required on the server side.

It should be noted that this is not the best approach, better would be a listing, or XML file giving the locations of all the files that are to be downloaded, so that deprecation can occur without deleting the files deprecated, also allows reversion.

Code:
<xbmc addon>
<addon icon>lolfile.jpg</addon icon>
<addon name>"Blah Blah"</addon name>
   <addon version>"1.04"</addon version>
     <addon files>"subfolder/subfolder/subfolder/addonfile1.py";"subfolder/subfolder/subfolder/addonfile2.py"</addon files>
  <addon version>"1.03"</addon version>
...
</xbmc addon>
Reply
#4
and that xml would be fairly easy for repository admins to build (using a python script that walks the local directory.)

repository owners already have to use addons_xml_generator.py before committing... would just be a matter of adding a bit more code to it.
Reply
#5
FYI this is a link to my update to addons_xml_generator.py
http://forum.xbmc.org/showthread.php?tid=129401
Reply

Logout Mark Read Team Forum Stats Members Help
How does XBMC download uncompressed addon directory trees from http?0