-
Notifications
You must be signed in to change notification settings - Fork 19
Home
Short guide to explain MyPicsDB.
German explanation: MyPicsDB on www.xycl.de
XBMC Forum: MyPicsDB Thread
- You must add picture sources to XBMC
- Within MyPicsDB select menu "Paths of pictures folders" to add these paths to the database.
HINT: Net shares or use of a NAS With Eden MyPicsDB version 1.3.4 and Frodo MyPicsDB version 2.0.0 you're able to access all sources which you've added as picture sources to XBMC, even if they are on net shares only accessible with SMB or NFS.
-
You must create a database: CREATE DATABASE MyPicsDB CHARACTER SET utf8 COLLATE utf8_general_ci;
-
Create a user (if not already done for music and movies): CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
-
give him rights: GRANT ALL ON . TO 'xbmc';
-
Go to plugin settings and enable MySql. Database MyPicsDB with user XBMC and password XBMC is preconfigured.
Idea from Fungify.
You can call (example for Windows): XBMC.RunScript("C:\Users\Name\AppData\Roaming\XBMC\addons\plugin.image.mypicsdb\scanpath.py",--database) where Name is the name of the xbmc windows user.
Frodo: Use the service "The Scheduler" (http://forum.xbmc.org/showthread.php?tid=144378) and create a custom built-in script with the above command.
Eden: Update MyPicsDB via HTTP API with a cron job.
wget --directory-prefix=tmp --http-user= --http-passwd= "http://Servername:Portnumber/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.RunScript("\plugin.image.mypicsdb\scanpath.py",--database)
Done by MikeBZH44
a) For skinners, MyPicsDB can be called with following parameters to populate window properties :
XBMC.RunScript(plugin.image.mypicsdb,0,?action='setproperties'&method ='Latest|Random'&sort ='Shooted|Added'&limit=10)
Parameters are :
-
action='setproperties' to store in main window properties and in CommonCache DB
-
method='Lastest' to get Latest pictures from DB
-
method='Random' to get random pictures from DB
-
sort='Shooted' to get latest pictures sorted by Shooted date (EXIF DateTimeOriginal)
-
sort='Added' to get latest pictures sorted by Added in DB date (DateAdded)
-
limit=10 to get only 10 pictures
Properties set to main window (ID=10000) :
MyPicsDB.Count = Number of pictures returned (max=limit) MyPicsDB.1.Path = Path to picture #1 MyPicsDB.1.Name = Name of picture #1 MyPicsDB.1.Folder = Name of picture folder #1 MyPicsDB.1.Date = Shooted date of picture #1 MyPicsDB.2.Path = Path to picture #2 MyPicsDB.2.Name = Name of picture #2 MyPicsDB.2.Folder = = Name of picture folder #2 MyPicsDB.2.Date = Shooted date of picture #2 ... ... ... MyPicsDB.10.Path = Path to picture #10 MyPicsDB.10.Name = Name of picture #10 MyPicsDB.10.Folder = = Name of picture folder #10 MyPicsDB.10.Date = Shooted date of picture #10
b) To run a slideshow when user clicks on a picture :
XBMC.RunScript(plugin.image.mypicsdb,0,?action='slideshow'&method='Random'¤t=1)
Parameters :
-
action='slideshow' to run slide show
-
method='Lastest' to get Latest pictures from DB
-
method='Random' to get Random pictures from DB
-
current=1 to start slideshow with Picture #1
c) Statistic properties
MyPicsDB.Categories = number of categories in DB MyPicsDB.Collections = number of collections in DB MyPicsDB.Folders = number of folders containing pictures in DB
MyPicsDBRandom.Categories = MyPicsDBLatest.Categories (same for Count, Collections, Folders) but we don't know wich method each skinner will use so I make the job twice ;)