According to the Milestone 11.0 release notes, it should be possible to select a specific profile for auto login. However, this feature is missing.
This pull request adds this function as it is described in the patch of Trac #10708. At the moment only the first part is implemented:
"1. This patch comes in three parts. The first part adds to profiles.xml. It defaults to a blank string (logs in the most recent user, like before). If you change this to an integer, XBMC will load that profile."
If this fix is accepted, I will add the other two patches as well (exposing this new setting to the skin and adding support for it in Confluence).
Note that the code is by bruing. I do not want to take credit for it.
According to the trac ticket, the feature was changed, and thus a simplified version was pulled in. If this is not the case, then please explain in the trac ticket (rather than here) what is missing.
FYI: I left some comments in the trac ticket.
@jmarshallnz I removed the superfluous getter and setter, and replaced the XMLUtils::GetString() by the XMLUtils::GetUInt() function like you suggested. I then started squashing it all, but somehow end up two additional commits which are not mine. Only e121c58 is relevant. Please let me know if this is a problem, if so then I will simply close the PR and create a new one to get rid of this mess.
Tested under Linux. Test cases performed:
<autologin> tag not available in profiles.xml -> last loaded profile is used.
<autologin> tag less than 0 -> last loaded profile is used.
<autologin> tag greater than available profiles -> last loaded profile is used.
<autologin> tag empty -> last loaded profile is used.
<autologin> tag valid profile number -> the configured profile is loaded.
Rebase on upstream/master.
After all the git wizzardry I did a new clean compile to be sure that all is still ok. All test cases were repeated and passed successfully.
can you rebase again?
@jmarshallnz you ok with this going in?
After rebase, all good.
I can probably get rid of 9aae10. If necessary, let me know and I'll look into it tomorrow afternoon (CET)
You need to rebase on master to get rid of the unneeded stuff.
damm. i rebased this as well ;) cptspiff:rebased_1540
Adds <autologin></autologin> to profiles.xml.
When set to an invalid profile index the lastloaded profile will be loaded. When set to a valid index, XBMC will load that profile.