How to - create roving and home profiles for mobile iOS devices

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
gerner Offline
Donor
Posts: 164
Joined: Apr 2004
Reputation: 0
Location: NZ
Lightbulb  How to - create roving and home profiles for mobile iOS devices
Post: #1
I thought I'd share how I've set up my iPad using two different profiles, one for use on my home network accessing my MYSQL database, the other for use when travelling. These notes are written from the perspective of using an iPad, but I think it might be relevant for iphone users too.

I have two use cases for xbmc on my iPad:
1. When I'm using the iPad at home, chances are I want to access the same library I have available on my htpc, streaming my media from my networked storage.
2. When i'm on the move, e.g. train, plane or away from home, I'm interested in playing media that i've copied over to the iPad disk.

For scenario one I use the Master profile. First I set up a Mysql database for my video and music libraries as used by my htpc. This is well documented on lifehacker here and there's some detailed posts on this forum, including some excellent tips for speeding up the music views here. Next I set up my advancedsettings.xml for the master profile as follows:

PHP Code:
<advancedsettings>

  <
videodatabase>
    <
type>mysql</type>
    <
host>mysql-server</host>
    <
name>xbmc_video</name>
    <
user>xbmc</user>
    <
pass>***</pass>
  </
videodatabase>

  <
musicdatabase>
     <
type>mysql</type>
     <
host>mysql-server</host>
     <
name>xbmc_music</name>
     <
user>xbmc</user>
     <
pass>***</pass>
  </
musicdatabase>

  <
pathsubstitution>
      <
substitute>
      <
from>/media/Goods/</from>
      <
to>smb://MEDIABOB/goods/</to>
      
</substitute>
  </
pathsubstitution>

</
advancedsettings

The path substitution setting allows clients to switch library paths with locally defined ones, so using the above example paths read from the database will have '/media/Goods/' replaced with 'smb://MEDIABOB/goods/'. This feature is only available in iOS releases built after this commit, i.e. after the first official release, and is a great way to make local fast filesystem scans available to networked devices.

Finally, rename the master profile to At Home so we know how it's been set up.

Before going any further, if you haven't already, add some media to the disk of the mobile device (Tip: you may already have some music in your /var/mobile/Media/ITunes_Control/Music folder). I created new 'movie' and 'TV' folders in /var/mobile and put my files there - easy to access from within xbmc as this is the home directory.

Time now to set up a new profile called Travelling, setting the profile to use seperate media info and media sources. For mine I set it to use the directory 'local' within the profiles folder. Finally I set some nice pictures for each profile and set the use login screen option so I can choose which library to use when starting up xbmc on my iPad.

Now we want to set up our media sources for the travelling profile. I exited from xbmc and re-launched (I had some issues selecting the profile without a restart). On starting xbmc pick the travelling profile. Add sources for movies, tv and music to point to the local media. DO NOT RUN THE AUTOMATED SCANS at this point. Once you've set up your sources, quit xbmc.

Using iFile or similar, move an advancedsettings.xml to the directory selected for your travelling profile, this should specify a local sqlite DB. Mine looks like this:

PHP Code:
<advancedsettings>

<
musicdatabase>
  <
type>sqlite3</type>
  <
host>/var/mobile/Library/Preferences/XBMC/userdata/Database</host>
  <
name>MyMusic7</name>
</
musicdatabase>

<
videodatabase>
  <
type>sqlite3</type>
  <
host>/var/mobile/Library/Preferences/XBMC/userdata/Database</host>
  <
name>/MyVideos34</name>
</
videodatabase>
</
advancedsettings

Okay, now you're ready to scan your local media. Launch xbmc, select the travelling profile and scan the media from sources set up a moment ago.

Hey presto, all being well, you should now have a dual purpose xbmc installation, ready to launch with local or networked media.

Notes:

1. There's probably plenty of ways of skinning this cat. These instructions worked for me though, so hopefully should help someone else out there.
2. Not sure why the advancedsettings.xml should be required for the travelling profile, I was expecting default sqlite behaviour to apply, but it does appear necessary.

Any questions or suggestions for improvements please shout.
(This post was last modified: 2012-01-07 22:58 by gerner.)
find quote
martintamare Offline
Junior Member
Posts: 7
Joined: Jan 2012
Reputation: 0
Post: #2
Thanks man, this post was very helpfull !

I was fighting with one roaming profile which was still updating mysql database Wink

I notice you were using xbmc on iPad -> which skin do you use ?
I did not find the gesture to scroll throught list, so I'm stuck ... Any advice ?
find quote
gerner Offline
Donor
Posts: 164
Joined: Apr 2004
Reputation: 0
Location: NZ
Thumbs Up   
Post: #3
Cheers dude, nice to know it helped someone.

I've been using confluence skin - used to be a pain to scroll through lists but recent builds allow the behaviour you'd expect, just select and drag. I think older builds you could move down 1 by dragging down, or you had to fiddle with finding the sliding bar on the righ of the list and drag that. I would upgrade if you can.
find quote
bionic1234 Offline
Senior Member
Posts: 206
Joined: Oct 2006
Reputation: 0
Post: #4
This is great!!
Just wondering, are you looking to automate the process of downloading content in anyway?
find quote
gerner Offline
Donor
Posts: 164
Joined: Apr 2004
Reputation: 0
Location: NZ
Post: #5
Thanks. Automate downloads from my home network to the iPad? Nope, I move files manually using Ifile.
find quote
martintamare Offline
Junior Member
Posts: 7
Joined: Jan 2012
Reputation: 0
Post: #6
To automate the process, you just need to install ssh on your ipad, and then you will be able to scp file from anywhere to it Smile

About the roaming profile (the one with sqlite), I noticed it has to be the default one, because if not, it crashes xbmc at start (eden beta 3)...
find quote
amcfarla Offline
Senior Member
Posts: 139
Joined: Oct 2009
Reputation: 1
Post: #7
I have discovered one issue, and I am not sure how to resolve. I have this same type setup, using MYSQL on my home network so all the XBMC clients on my network share the same library. I have set up a 'travel' profile on my iPad, but I have discovered when I leave my house and try opening up XBMC on my iPad connected to another network(another wifi network) it just hangs at the splash screen for XBMC.

The only way I can resolve this issue and get XBMC to launch is to remove my advancedsettings.xml file out of the main userdata folder. I have read a few articles that says you need to keep that advancedsettings.xml file in the main userdata folder even when you set up multiple profiles, but unless I am not connected to a network or connected to my home network(where that ip address is accessible in that file) XBMC will not open. The reason I want to connect to another network is to be able to use add-ons and without a network connection add-ons don't serve much of a purpose. Does anyone have an answer to this? Thank you.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 20,377
Joined: Jan 2011
Reputation: 258
Location: Arizona, USA
Post: #8
The MySQL set up needs to be on a secondary profile, not the first.

You can make easy links to the XBMC wiki using double brackets around common XBMC words: debug log = debug log, Video library = Video library, SMB = SMB , userdata = userdata, etc
find quote