Special protocol: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Martijn
>NedBot
m (Robot: Cosmetic changes)
Line 2: Line 2:
The "Special Protocol" is XBMC's solution to platform dependent directories. Common directory names are assigned a special://[name] path which is passed around inside XBMC and then translated to the platform specific path before the operating system sees it. This helps keep most of the platform mess centralized in the code.
The "Special Protocol" is XBMC's solution to platform dependent directories. Common directory names are assigned a special://[name] path which is passed around inside XBMC and then translated to the platform specific path before the operating system sees it. This helps keep most of the platform mess centralized in the code.


==Available Paths==
== Available Paths ==
* '''special://xbmc''' - XBMC' installation root directory. This path is read-only contains the XBMC binary, support libraries and default configuration files, skins, scripts and plugins. Users should not modify files or install addons in this directory.
* '''special://xbmc''' - XBMC' installation root directory. This path is read-only contains the XBMC binary, support libraries and default configuration files, skins, scripts and plugins. Users should not modify files or install addons in this directory.
* '''special://home''' - XBMC's user specific (OS user) configuration directory. This path contains a writable version of the special://xbmc directories. Any addons should be installed here.
* '''special://home''' - XBMC's user specific (OS user) configuration directory. This path contains a writable version of the special://xbmc directories. Any addons should be installed here.
Line 20: Line 20:
* '''special://logpath''' - This path points to the path where the [[log file]] is saved. Added in XBMC v12 Frodo.
* '''special://logpath''' - This path points to the path where the [[log file]] is saved. Added in XBMC v12 Frodo.


==Linux default mappings==
== Linux default mappings ==
* '''special://xbmc''' - /usr/share/xbmc when installed from a binary package (ie PPA, rpm, deb, etc). /usr/local/share/xbmc when compiled (unless you specify an alternate prefix)
* '''special://xbmc''' - /usr/share/xbmc when installed from a binary package (ie PPA, rpm, deb, etc). /usr/local/share/xbmc when compiled (unless you specify an alternate prefix)
* '''special://home''' - /home/''[username]''/.xbmc (Note the '.', this directory is hidden so you may need to enable hidden files in your file manager to see it).
* '''special://home''' - /home/''[username]''/.xbmc (Note the '.', this directory is hidden so you may need to enable hidden files in your file manager to see it).


==Windows default mappings==
== Windows default mappings ==
===Windows XP===
=== Windows XP ===
This assumes your Windows install drive is C:. Replace as necessary.
This assumes your Windows install drive is C:. Replace as necessary.
* '''special://xbmc''' - C:\Program Files\XBMC
* '''special://xbmc''' - C:\Program Files\XBMC
* '''special://home''' - C:\Documents and Settings\''[username]''\Application Data\XBMC\
* '''special://home''' - C:\Documents and Settings\''[username]''\Application Data\XBMC\


===Windows Vista/7===
=== Windows Vista/7 ===
This assumes your Windows install drive is C:. Replace as necessary.
This assumes your Windows install drive is C:. Replace as necessary.
* '''special://xbmc''' - C:\Program Files\XBMC
* '''special://xbmc''' - C:\Program Files\XBMC
Line 36: Line 36:
* '''special://home''' - C:\Users\''[username]''\AppData\Roaming\XBMC
* '''special://home''' - C:\Users\''[username]''\AppData\Roaming\XBMC


===Portable Mode===
=== Portable Mode ===
In portable mode, XBMC is entirely self contained, so its install directory must be writable.
In portable mode, XBMC is entirely self contained, so its install directory must be writable.
* '''special://xbmc''' - Where ever you installed XBMC (MUST be writable).
* '''special://xbmc''' - Where ever you installed XBMC (MUST be writable).
* '''special://home''' - special://xbmc
* '''special://home''' - special://xbmc


==OS X default mappings==
== OS X default mappings ==
* '''special://xbmc''' - /Applications/XBMC.app/Contents/Resources/XBMC
* '''special://xbmc''' - /Applications/XBMC.app/Contents/Resources/XBMC
* '''special://home''' - /Users/''[username]''/Library/Application Support/XBMC
* '''special://home''' - /Users/''[username]''/Library/Application Support/XBMC
* '''special://temp''' - /Users/''[username]''/.xbmc/temp ''(Note the '.', this directory is hidden so you need to use Terminal.app to see it)''
* '''special://temp''' - /Users/''[username]''/.xbmc/temp ''(Note the '.', this directory is hidden so you need to use Terminal.app to see it)''


===Apple TV 1 (silver)===
=== Apple TV 1 (silver) ===
* '''special://xbmc''' - /Users/frontrow/Applications/XBMC.app/Contents/Resources/XBMC
* '''special://xbmc''' - /Users/frontrow/Applications/XBMC.app/Contents/Resources/XBMC
* '''special://home''' - /Users/frontrow/Library/Application Support/XBMC
* '''special://home''' - /Users/frontrow/Library/Application Support/XBMC
* '''special://temp''' - /Users/frontrow/.xbmc/temp ''(Note the '.', this directory is hidden so you need to use Terminal.app to see it)''
* '''special://temp''' - /Users/frontrow/.xbmc/temp ''(Note the '.', this directory is hidden so you need to use Terminal.app to see it)''


==iOS default mappings==
== iOS default mappings ==
===Apple TV 2 (black)===
=== Apple TV 2 (black) ===
* '''special://xbmc''' - /private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome
* '''special://xbmc''' - /private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome
* '''special://home''' - /private/var/mobile/Library/Preferences/XBMC
* '''special://home''' - /private/var/mobile/Library/Preferences/XBMC
* '''special://temp''' - /private/var/mobile/Library/Preferences/XBMC/temp
* '''special://temp''' - /private/var/mobile/Library/Preferences/XBMC/temp


===iDevice===
=== iDevice ===
* '''special://xbmc''' - /Applications/XBMC.app/XBMCData/XBMCHome {{highlight|''<- Symbolic link, but the real path has some random characters in it.''}}
* '''special://xbmc''' - /Applications/XBMC.app/XBMCData/XBMCHome {{highlight|''<- Symbolic link, but the real path has some random characters in it.''}}
* '''special://home''' - /private/var/mobile/Library/Preferences/XBMC
* '''special://home''' - /private/var/mobile/Library/Preferences/XBMC
* '''special://temp''' - private/var/mobile/Library/Preferences/XBMC/temp
* '''special://temp''' - private/var/mobile/Library/Preferences/XBMC/temp


==See also==
== See also ==
'''Development:'''
'''Development:'''
* [[Add-on development]]
* [[Add-on development]]

Revision as of 15:41, 27 April 2013

Template:XBMC wiki toc The "Special Protocol" is XBMC's solution to platform dependent directories. Common directory names are assigned a special://[name] path which is passed around inside XBMC and then translated to the platform specific path before the operating system sees it. This helps keep most of the platform mess centralized in the code.

Available Paths

  • special://xbmc - XBMC' installation root directory. This path is read-only contains the XBMC binary, support libraries and default configuration files, skins, scripts and plugins. Users should not modify files or install addons in this directory.
  • special://home - XBMC's user specific (OS user) configuration directory. This path contains a writable version of the special://xbmc directories. Any addons should be installed here.
  • special://temp - XBMC's temporary directory. This path is used to cache various data during normal usage. Unless you need the log, nothing in this directory is detrimental to XBMC's operation. Normally special://home/temp
  • special://masterprofile - XBMC's main configuration directory. Normally located at special://home/userdata, this directory contains global settings and sources, as well as any XBMC profile directories. Normally special://home/userdata
  • special://profile - XBMC's currently active profile directory. This directory points at special://masterprofile/profile_name (or special://masterprofile if no profile is in use) and contains per profile overrides for settings and sources.
  • special://subtitles - User defined custom subtitle path. Set it in Video Settings.
  • special://userdata - Alias from special://masterprofile.
  • special://database - This path contains the database files XBMC uses to store library info. Normally special://masterprofile/Database.
  • special://thumbnails - This path contains cached thumbnails. Normally special://masterprofile/Thumbnails
  • special://recordings - This path contains saved shoutcast radio recordings. You will be asked to specify this directory the first time you attempt to record a stream.
  • special://screenshots - This path contains XBMC screen shots. You will be asked to specify this directory the first time you take a screen shot.
  • special://musicplaylists - This path contains saved music playlists. Normally special://profile/playlists/music.
  • special://videoplaylists - This path contains saved video playlists. Normally special://profile/playlists/video.
  • special://cdrips - This path contains the tracks from CDs you rip with XBMC. You will be asked to specify this directory the first time you rip a CD.
  • special://skin - This path points to the currently active skin's root directory.
  • special://logpath - This path points to the path where the log file is saved. Added in XBMC v12 Frodo.

Linux default mappings

  • special://xbmc - /usr/share/xbmc when installed from a binary package (ie PPA, rpm, deb, etc). /usr/local/share/xbmc when compiled (unless you specify an alternate prefix)
  • special://home - /home/[username]/.xbmc (Note the '.', this directory is hidden so you may need to enable hidden files in your file manager to see it).

Windows default mappings

Windows XP

This assumes your Windows install drive is C:. Replace as necessary.

  • special://xbmc - C:\Program Files\XBMC
  • special://home - C:\Documents and Settings\[username]\Application Data\XBMC\

Windows Vista/7

This assumes your Windows install drive is C:. Replace as necessary.

  • special://xbmc - C:\Program Files\XBMC
  • special://xbmc - C:\Program Files (x86)\XBMC (Windows 64 bit)
  • special://home - C:\Users\[username]\AppData\Roaming\XBMC

Portable Mode

In portable mode, XBMC is entirely self contained, so its install directory must be writable.

  • special://xbmc - Where ever you installed XBMC (MUST be writable).
  • special://home - special://xbmc

OS X default mappings

  • special://xbmc - /Applications/XBMC.app/Contents/Resources/XBMC
  • special://home - /Users/[username]/Library/Application Support/XBMC
  • special://temp - /Users/[username]/.xbmc/temp (Note the '.', this directory is hidden so you need to use Terminal.app to see it)

Apple TV 1 (silver)

  • special://xbmc - /Users/frontrow/Applications/XBMC.app/Contents/Resources/XBMC
  • special://home - /Users/frontrow/Library/Application Support/XBMC
  • special://temp - /Users/frontrow/.xbmc/temp (Note the '.', this directory is hidden so you need to use Terminal.app to see it)

iOS default mappings

Apple TV 2 (black)

  • special://xbmc - /private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome
  • special://home - /private/var/mobile/Library/Preferences/XBMC
  • special://temp - /private/var/mobile/Library/Preferences/XBMC/temp

iDevice

  • special://xbmc - /Applications/XBMC.app/XBMCData/XBMCHome <- Symbolic link, but the real path has some random characters in it.
  • special://home - /private/var/mobile/Library/Preferences/XBMC
  • special://temp - private/var/mobile/Library/Preferences/XBMC/temp

See also

Development: