Addons4Xbox development

Discussion of XBMC4XBOX development.
Post Reply
User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Addons4Xbox development

Post by BuZz » Thu Nov 15, 2012 8:29 pm

Continued from http://www.xbmc4xbox.org.uk/forum/viewt ... ?f=7&t=584

I see it did install the dependencies. Not checked that part of the code yet. My thinking would be that when looking for dependencies we hardcode it to check first on "our repo" which would contain some that are fixed up if needed.

How would you prefer I contribute to this module. if you no longer have any xbox or free time, I would be happy to continue on your repository, or should that not be convenient I could manage it elsewhere.

I definitely think your plugin is the best way to go with addon/plugin installation.

temhil
Posts: 6
Joined: Thu Nov 15, 2012 4:25 pm

Re: Addons4Xbox development

Post by temhil » Thu Nov 15, 2012 8:39 pm

Hello again,

Here is a copy of the changelogs, that should give you a better idea of what was done.

Code: Select all

2012-03-13 Version 0.9.3 by Temhil
- Added alternative source for repositories list and selection of the source in the plugin settings

2011-08-21 Version 0.9.2 by Temhil
- Fixed extractor creating too short subdirectorie names: 
  only the name of the root directory (i.e anarchintosh-projects repository) will be shorten, not the subdirs names

2011-08-20 Version 0.9.1 by Temhil
- Fixed anarchintosh-projects repository install (patch by exobuzz)
- Install automatically required addons, if install fails let the user to chose between keep going
  and install it manually or cancel the install
  Note: this does not apply to addons installed from zip
- Added 'Manage installed Addons' options, this for example provide a way to list the required addons on which install failed
- Fixed on parsing wiki page of unofficial addons when an addons does not have a link to the zip file, now we ignore it

2011-07-06 Version 0.9 by Temhil
- Refactored code in order to improve loading performances
- Added Unofficial Add-on Repositories install from XBMC Wiki page
- Fixed some encoding issues

2011-06-19 Version 0.8.1 by Temhil
- Fixed zip issue appearing with some zip format used
- Fixed install issue for SVN/GIT install

2011-06-12 Version 0.8 by Temhil
- Added Window info describing addons (via context menu)

2011-06-04 Version 0.7 by Temhil
- New plugin icon (Thank you to Maxoo)
- Repositories are not anymore hardcoded but can be installed (from zip file)
- Fixed install from zip
- When the name of an addon stored in addon.xml is not a valid directory name, the user will be prompted to type a valid name (before it would fail)
- Added Weather addons support

2011-02-27 Version 0.6 by Temhil
- Added loop for renaming addon when name is not valid
- Display icons of addons available in a repository
- Fixed few other bugs

2011-02-25 Version 0.5 by Temhil
- Removed xbmcaddon library since it is part of xbmc4xbox, 
- Fixed filename lenght issue in extractor.
- Removed xbmcaddon install at 1st start

2010-11-28 Version 0.4 by Temhil
- Added dummy __init__.py files for local modules imports in order to ensure we are compatible with latest version of XBMC4XBOX (issue with sys.append in current version of XBMC4XBOX)
- Minor changes

2010-11-14 Version 0.3 by Temhil
- Added support of repositories using files instead of zip (i.e google code), reusing SVN repo installer code (still need to be fully adapted to current design)
- Some fixes
- Added few google code repos (hardcoded)

2010-11-08 Version 0.2 by Temhil
- Quick fix on non ascii addon name, for now those addons are ignored (waiting for a better solution)

2010-11-08 Version 0.1 by Temhil
- Initial version, alpha version still very incomplete. This version support install from local zip file or addon with zip file (official repo and passion XBMC repo). Default module are currently include with the plugin, in the future they will be install remotely if they are available online.
For changing the repo URL you can go to: http://code.google.com/p/passion-xbmc/s ... default.py
And modify or add a new URL to REPO_LIST_URL_LIST then that will appear in the options.

For managing dependencies, look at:
- The install remote when we trigger the install from remote locaiton: http://code.google.com/p/passion-xbmc/s ... _remote.py
- and specifically to the Addons Manager which checks for dependencies: http://code.google.com/p/passion-xbmc/s ... donsMgr.py

I will try to give you support as much as I can, unfortunately the fact of not being able to test on a XBOX myself would made any testing and development very difficult even for simple changes.

Let me know if you want access to our SVN or you can fork, since the code is open anyway :)

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Thu Nov 15, 2012 8:43 pm

thanks! im happy to continue development on your svn if that's ok with you. I just did a svn to git checkout of your entire repo so I could temporarily work on a local branch. my google code email is (buzz [at] exotica [dot] org [dot] uk)

temhil
Posts: 6
Joined: Thu Nov 15, 2012 4:25 pm

Re: Addons4Xbox development

Post by temhil » Thu Nov 15, 2012 8:53 pm

BuZz wrote:thanks! im happy to continue development on your svn if that's ok with you. I just did a svn to git checkout of your entire repo so I could temporarily work on a local branch. my google code email is (buzz [at] exotica [dot] org [dot] uk)
You should have access now. Just one little if you code follow the naming rules on the commit, that would be nice, it just make it easier to know what the change is about, since there are many different addons or other submitted in the repo.

FYI Frost did a newer version of the repo installer (when I wrote the 1st version of it, I use common code with the addons4xbox installer at the time), which is pretty good on the parsing of the wiki page. Could be interesting to reuse some of it in the future.

skatulskijean
Posts: 1028
Joined: Wed Jul 04, 2012 8:01 am
Has thanked: 1 time
Been thanked: 148 times

Re: Addons4Xbox development

Post by skatulskijean » Thu Nov 15, 2012 8:55 pm

BuZz wrote:I definitely think your plugin is the best way to go with addon/plugin installation.
i think the same!
temhil wrote:I will try to give you support as much as I can, unfortunately the fact of not being able to test on a XBOX myself would made any testing and development very difficult even for simple changes.
can anywhere on the country from temil put a xbox to him?
BuZz wrote:For changing the repo URL you can go to: http://code.google.com/p/passion-xbmc/s ... default.py
yes this what i have make for my test build to access the Eden-Repro on the xbox!

Thanks temil
Thanks BuzZ

Regards Jan

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Thu Nov 15, 2012 9:37 pm

temhil wrote:
BuZz wrote:thanks! im happy to continue development on your svn if that's ok with you. I just did a svn to git checkout of your entire repo so I could temporarily work on a local branch. my google code email is (buzz [at] exotica [dot] org [dot] uk)
You should have access now. Just one little if you code follow the naming rules on the commit, that would be nice, it just make it easier to know what the change is about, since there are many different addons or other submitted in the repo.

FYI Frost did a newer version of the repo installer (when I wrote the 1st version of it, I use common code with the addons4xbox installer at the time), which is pretty good on the parsing of the wiki page. Could be interesting to reuse some of it in the future.
I updated a ticket http://code.google.com/p/passion-xbmc/i ... tail?id=18

thought it would be a good idea to post my first patch before I commit, just in case ;-)

i made a whitespace error in that commit (removed a space). tis fixed. but apart from that should be ok.

whufclee
Posts: 922
Joined: Tue Jul 17, 2012 5:42 pm
Location: Essex, UK
Has thanked: 18 times
Been thanked: 109 times
Contact:

Re: Addons4Xbox development

Post by whufclee » Thu Nov 15, 2012 10:17 pm

First of all, great to hear from you temhil - welcome back!

This is all very good news, Addons4Xbox Installer was definitely the way forward but I couldn't work out how to make the changes needed. Below is a basic guide to how things work...

Each addon has an addon.xml file which is very similar to the old description.xml and Addons4Xbox Installer reads the info from that and finds out which script modules need installing and also finds out where to install the addon (programs, video, music etc). If I remember correctly the installer would only install script modules located on xbmc.org repo, this would need fixing - possibly have our own repo for script modules?

This is what I wanted to do...
Have a master addons.xml file which grabs info of every addon available. I made a small batch file that done this - it basically grabbed all addon.xml's from every known repo and merged them into one file (it also deleted all the crap that wasn't needed). For some reason I don't think my batch file works any more but let me know if you want to take a look at it and I'll try and sort it out for you.

The idea of a master addons.xml file was that we could get Addons4Xbox Installer to scan for the version numbers of each addon installed and compare it to the relevant ones on the master addons.xml. In theory as this is only one file that has to be scanned it should be a fairly quick process and the user can then be notified if a newer version of an addon is available. The other plus point (in theory) was that the master addon.xml could be used to list the available addons rather than having to trawl through various repo's.

I "think" it should be a fairly simple thing to do with someone who has some coding knowledge (buzz!). The last time I tried to use Addons4Xbox Installer it wouldn't fetch repository info as the wiki kept changing the layout. Ned Scott was helpful and reverted it back for us but I think it changed again and subsequently broke the installer.

Let me know if there's anything I can help with.

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Thu Nov 15, 2012 10:23 pm

Certainly have it handling upgrades would be good. the plugin itself could scan all added repos and work out if there are new versions - which would save doing anything special externally. but thats something for later - just having it so you can install some popular addons is a good start, which it mostly does already. I will fix up a few compatibility issues though and go from there.

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Thu Nov 15, 2012 10:24 pm

If i set up a new addons4Xbox repository it would be nice if people like Jan would add their fixed up stuff, also, and hopefully we can get enough people helping that its kept up to date.

whufclee
Posts: 922
Joined: Tue Jul 17, 2012 5:42 pm
Location: Essex, UK
Has thanked: 18 times
Been thanked: 109 times
Contact:

Re: Addons4Xbox development

Post by whufclee » Thu Nov 15, 2012 10:43 pm

Cool mate, you can use the XAI repo if you want (addons4xbox.googlecode.com). Everything on there is from all the unofficial repo's and the old repo's on SVN Repo Installer. I personally tested 500+ plugins and scripts last year (kozz and xphazer also double checked them) which took months to do and the content on this repo is what's working, there's probably a few that have since broke but most should still work.

If we're going to use the Addons4Xbox Installer then the addons will need an addon.xml rather than description.xml. This is a fairly simple task but is tedious and takes forever, fortunately it should be easier than making all the description.xml's though as we can probably copy most of the official ones (mainbranch needs addon.xml files to install so every repo has them these days). I might be able to get some of this done, let me know if you want me to get started on it.

We also kept a spreadsheet with the results of the plugin/script testing, I think it's on google docs. This shows what's working, broken, what the errors are, any bugs etc. Don't know if that might be of any use?

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Thu Nov 15, 2012 10:56 pm

whufclee wrote:Cool mate, you can use the XAI repo if you want (addons4xbox.googlecode.com). Everything on there is from all the unofficial repo's and the old repo's on SVN Repo Installer. I personally tested 500+ plugins and scripts last year (kozz and xphazer also double checked them) which took months to do and the content on this repo is what's working, there's probably a few that have since broke but most should still work.

If we're going to use the Addons4Xbox Installer then the addons will need an addon.xml rather than description.xml. This is a fairly simple task but is tedious and takes forever, fortunately it should be easier than making all the description.xml's though as we can probably copy most of the official ones (mainbranch needs addon.xml files to install so every repo has them these days). I might be able to get some of this done, let me know if you want me to get started on it.

We also kept a spreadsheet with the results of the plugin/script testing, I think it's on google docs. This shows what's working, broken, what the errors are, any bugs etc. Don't know if that might be of any use?
spreadsheet should be of use. if the repo has just working unmodified addons, we can probably just update most of em with the addon.xml as you said, but if those ones work directly from the official repos, then my plan is people will install from there. I might for example include a whitelist or something, so they are not shown stuff that doesn't work.

anyway. still a lot of idea. right now im peeking at jans stuff to generate some diffs to see if using his changes would save some time on some of the non working plugins. If you can save me some time Jan by providing code changes that would be great too. isee in url resolver you disabled some login stuff. which "source" of url resolver did you use btw ? seems there are multiple forks, some which are different but with the same version numbers :/ what was the fix you did for getting urlresolver settings to show ?(i see you mentioned that in your release notes).

whufclee
Posts: 922
Joined: Tue Jul 17, 2012 5:42 pm
Location: Essex, UK
Has thanked: 18 times
Been thanked: 109 times
Contact:

Re: Addons4Xbox development

Post by whufclee » Thu Nov 15, 2012 11:25 pm

BuZz wrote:but if those ones work directly from the official repos, then my plan is people will install from there. I might for example include a whitelist or something, so they are not shown stuff that doesn't work.
That's a very valid point, the majority are untouched. In fact for most of them all I had to do was rename addon.py to default.py and icon.png to default.tbn, however Addons4Xbox Installer takes care of this problem anyway so yes they should be good to be installed directly from the original repo's. I guess the only ones which will have to be kept on the XAI repo are the ones from the old SVN Repo Installer days - I can make some addon.xml files for those. I think the whitelist is a great idea, any idea on how we could administer the whitelist? Could we somehow use the spreadsheet?

One of the problems a lot of users had with the Addons4Xbox Installer was that it was confusing where to find certain addons. You had to manually select which repo you wanted to look at, this is why I thought having a master addons.xml file might be useful - we could possibly have addons shown by genre like in mainbranch. That being said I guess it would be possible to acheive this without a master file but presumably it would take a lot longer to parse the results?

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Thu Nov 15, 2012 11:40 pm

whufclee wrote: One of the problems a lot of users had with the Addons4Xbox Installer was that it was confusing where to find certain addons. You had to manually select which repo you wanted to look at, this is why I thought having a master addons.xml file might be useful - we could possibly have addons shown by genre like in mainbranch. That being said I guess it would be possible to acheive this without a master file but presumably it would take a lot longer to parse the results?
certainly we can look at wawys to resolve this later on - say by precaching a list of all in the plugin itself or something. I barely know this code, so first things i need to look at some basic stuff.

I also just fixed an issue in our addons emulation code so settings for script modules work correctly. makes the urlresolver setting open correctly from [removed] for example.

temhil
Posts: 6
Joined: Thu Nov 15, 2012 4:25 pm

Re: Addons4Xbox development

Post by temhil » Fri Nov 16, 2012 12:13 am

I looked at your changes buzz, looks pretty good, don't hesitate to submit.

About the looking for addons in 1 place discussion I though about it while I was working on the Addons4xbox installer, and I think the only solution is to have it done on the server side.
The xbox has limited processing power, and just parsing one repo was long to do, so parsing all the repo (not too much complicated to do in the installer) would be very very long.
That was also the reason why for the dependency I was looking only at one repo.
People want to have it all automatic but they would complain even more if it was taking 5 minutes to load, BUT if we have only only xml to parse with everything, we save a lot on http connection, download etc ... would just be parsing so not too bad.

For the update same idea, one place otherwise it would be too long. I think that should be also triggered by the user, not automatic because otherwise it would be very long.

The thing thus with one place we need a server that would get the repo xml, parse them and create one, automatically, I did it manually dureing month at the time of the Installer Passion-XBMC (was a FTP server), and it was very time consuming, so not a long term solution in my experience and opinion.

User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 216 times
Contact:

Re: Addons4Xbox development

Post by Dom DXecutioner » Fri Nov 16, 2012 12:20 am

Nice topic... Let me know if there's anything I can help with; been eager to do some python stuff; admittedly, I've been a bit busy and uninspired lately :(
Image

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Fri Nov 16, 2012 2:11 am

whufclee wrote:Cool mate, you can use the XAI repo if you want (addons4xbox.googlecode.com).
Looking at the structure, either I could use your repository here, and we split things off like

addons/ the new addon content
xai/ the current content

or some other way or we use a new repository. so as not to mess with your current XAI work, perhaps we should have a new repository for it ?

whufclee
Posts: 922
Joined: Tue Jul 17, 2012 5:42 pm
Location: Essex, UK
Has thanked: 18 times
Been thanked: 109 times
Contact:

Re: Addons4Xbox development

Post by whufclee » Fri Nov 16, 2012 2:34 am

It honestly makes no difference to me, whatever you think is best. For the time being it would be best to keep the current structure intact so users at least have xai they can use until the new one is ready. If you manage to get addons4xbox working I'm very happy to totally drop xai as it was only ever meant to be a temporary fix.

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Fri Nov 16, 2012 3:26 am

Temhil:

In RemoteArchiveInstaller.py you have

Code: Select all

#TODO: find cleaner solution in order to remove the / at the end of the folder name
folders = [ self.itemInfo[ "url" ].replace(self.REPO_URL, "").replace("//", "").replace("/", "").replace( " ", "%20" ) ]
I wondered why you wanted to remove trailing / from the folders as most webservers without a trailing / will do a redirect and add one - unless I've missed some additional function of this ?

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Fri Nov 16, 2012 3:31 am

I had another question regarding the Parser class - which can download remote directories - it checks for revision etc, so is limited to svn repositories. Was this just a safety check ? As it could be useful that it worked for any directory list - and as far as I can see the revision of an svn is not useful for anything specific.

User avatar
BuZz
Site Admin
Posts: 1889
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 62 times
Been thanked: 422 times
Contact:

Re: Addons4Xbox development

Post by BuZz » Fri Nov 16, 2012 4:37 am

It looks as though previously you grabbed the url from revision line and used it later but not anymore. I stripped all the revision stuff out and removed the url from the dictionary as well as changing around some of the path concatenation etc so directories end in a slash. Seems to work fine, and can now download all the files from a raw nginx tree also, not just svn.

I plan to change all the print debug stuff to xbmc.log statements so they only log in debug mode, as it is currently very verbose.

Post Reply