Media sources: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Ray N
m (small misspelling)
>NedBot
m (Bot: Removing from Category:Library; cosmetic changes)
Line 7: Line 7:
Remember that XBMC will add everything that lies inside the folder you select. So if you choose to add your C-disk, XBMC will have access to your entire C-disk for content by default. You can select as many sources you like if you have content in different places. When you have finished browsing and found the folder you would like, you should input a name for your source. This name will be displayed when you browse your sources. To finish, simply confirm by selecting "OK". You will now see a new entry in the list with the name you gave it.  
Remember that XBMC will add everything that lies inside the folder you select. So if you choose to add your C-disk, XBMC will have access to your entire C-disk for content by default. You can select as many sources you like if you have content in different places. When you have finished browsing and found the folder you would like, you should input a name for your source. This name will be displayed when you browse your sources. To finish, simply confirm by selecting "OK". You will now see a new entry in the list with the name you gave it.  


Remember you can always add, edit or delete sources anytime you want to, via the [[General_Navigation#Context_Menus|Context Menu]] (which you can access e.g. by pressing the letter c on a keyboard). When you delete a source you only delete the link to that source within XBMC - your files will remain intact.
Remember you can always add, edit or delete sources anytime you want to, via the [[General Navigation#Context Menus|Context Menu]] (which you can access e.g. by pressing the letter c on a keyboard). When you delete a source you only delete the link to that source within XBMC - your files will remain intact.


==[[Adding Media Sources]]==
==[[Adding Media Sources]]==


===Through the User Interface===
===Through the User Interface===
By default every root section includes a ''Add Sources'' button that you can click to start adding sources. This can be disabled though [[Appearance_Settings#View_Options|Settings/Appearance/View Options/Disable add source buttons in file lists]].
By default every root section includes a ''Add Sources'' button that you can click to start adding sources. This can be disabled though [[Appearance Settings#View Options|Settings/Appearance/View Options/Disable add source buttons in file lists]].
====Via the Context menu====
====Via the Context menu====
{|
{|
| valign="top" |
| valign="top" |
While in the root of any of XBMC's sections you can call up the [[General_Navigation#Context_Menus|Context Menu]] to add new sources (e.g. by pressing the letter C on a keyboard). From there you can also edit any of your current sources, just make sure you have the source you wish to edit selected.  With the option ''Make Default'' you make a source the default when opening the window for the first time after reboot.<br>
While in the root of any of XBMC's sections you can call up the [[General Navigation#Context Menus|Context Menu]] to add new sources (e.g. by pressing the letter C on a keyboard). From there you can also edit any of your current sources, just make sure you have the source you wish to edit selected.  With the option ''Make Default'' you make a source the default when opening the window for the first time after reboot.<br />


'''Note:''' For this context-menu to appear (for Add/Edit/Remove Sources), you need to be on your root-folder of ie. My Videos/My Music/My Pictures.<br><br>
'''Note:''' For this context-menu to appear (for Add/Edit/Remove Sources), you need to be on your root-folder of ie. My Videos/My Music/My Pictures.<br /><br />
'''Note:''' The Context Menu will show more or less options, depending on where you call it.
'''Note:''' The Context Menu will show more or less options, depending on where you call it.
| [[Image:bookmark.add.jpg|right]]<br>
| [[File:bookmark.add.jpg|right]]<br />
|}
|}


{|
{|
|
|
[[Image:Source.add.jpg|360px]]
[[File:Source.add.jpg|360px]]
| valign="top" |
| valign="top" |
Browse or enter the name and location (Local / IP / UNC) you wish to assign to the source.
Browse or enter the name and location (Local / IP / UNC) you wish to assign to the source.
Line 34: Line 34:


===Through Sources.xml===
===Through Sources.xml===
'''Note:''' This is considered to be an ''Advanced Topic'', most settings can be changed in the GUI, see previous paragraph.<br>
'''Note:''' This is considered to be an ''Advanced Topic'', most settings can be changed in the GUI, see previous paragraph.<br />


''sources.xml'' is the configuration file where XBMC stores your media source locations. In this section we will concentrate on xml syntax of sources and the various options that are available.<br>
''sources.xml'' is the configuration file where XBMC stores your media source locations. In this section we will concentrate on xml syntax of sources and the various options that are available.<br />


The configuration file ''sources.xml'' exists in the ''userdata folder''. It depends on your Operating System (Linux, Mac, XP, Vista) and if you changed the default settings during installation, where you can find your ''userdata folder''. See [[The UserData Folder|Advanced Topics/The UserData Folder]] to find out where you have to look.<br>
The configuration file ''sources.xml'' exists in the ''userdata folder''. It depends on your Operating System (Linux, Mac, XP, Vista) and if you changed the default settings during installation, where you can find your ''userdata folder''. See [[The UserData Folder|Advanced Topics/The UserData Folder]] to find out where you have to look.<br />


====XML Syntax and Source Breakdown====
====XML Syntax and Source Breakdown====
Line 106: Line 106:


===Locking===
===Locking===
If you want to make a source more private, you can use ''lockcodes or passwords'' to protect that source. The easiest way to accomplish this in XBMC, is using the GUI dialogs. First, enable the Master Lock in ''Settings/System/Master Lock''. After enabling the Master Lock, a ''Set Lock'' button will pop up in the ''Context Menu'' allowing you to set a lock. XBMC will ask for the ''master lock code'' and then give you the opportunity to set a unique ''Password'' on that specific share. To ''Remove the Lock'' you need to remember the ''Master Lock'' code.<br>
If you want to make a source more private, you can use ''lockcodes or passwords'' to protect that source. The easiest way to accomplish this in XBMC, is using the GUI dialogs. First, enable the Master Lock in ''Settings/System/Master Lock''. After enabling the Master Lock, a ''Set Lock'' button will pop up in the ''Context Menu'' allowing you to set a lock. XBMC will ask for the ''master lock code'' and then give you the opportunity to set a unique ''Password'' on that specific share. To ''Remove the Lock'' you need to remember the ''Master Lock'' code.<br />


'''Note:''' Locking a source means you only give it protection in XBMC. Outside XBMC the source is still available and only protected, or not protected at all, by the Operating System. In the same way, if someone has access to manually edit the ''sources.xml'' he or she can remove or change the settings for the locked source. So, don't feel too safe when you protect a source in XBMC.
'''Note:''' Locking a source means you only give it protection in XBMC. Outside XBMC the source is still available and only protected, or not protected at all, by the Operating System. In the same way, if someone has access to manually edit the ''sources.xml'' he or she can remove or change the settings for the locked source. So, don't feel too safe when you protect a source in XBMC.
Line 139: Line 139:
:;3  
:;3  
:: Full-text lock. Enter with on screen keyboard or USB keyboard.
:: Full-text lock. Enter with on screen keyboard or USB keyboard.
:: Enter HTML-escaped alphanumeric password. Make sure all characters are available on your language's on screen keyboard/USB keyboard.
:: Enter HTML-escaped alphanumeric password. Make sure all characters are available on your language's on screen keyboard/USB keyboard.


==[[Types of Media Sources]]==
==[[Types of Media Sources]]==
There are many Types of Media Sources, which will be explained in the [[Types of Media Sources|Advanced Topics/Types of Media Sources]].
There are many Types of Media Sources, which will be explained in the [[Types of Media Sources|Advanced Topics/Types of Media Sources]].


[[category:Settings]]
[[Category:Settings]]
[[category:File Sharing]]
[[Category:File Sharing]]
[[category:Library]]
[[Category:Video Library]]
[[category:Video Library]]
[[Category:Music Library]]
[[category:Music Library]]

Revision as of 02:03, 27 November 2011

Time.png THIS PAGE IS OUTDATED:

This page or section has not been updated in a long time, no longer applies, refers to features that have been replaced/removed, and/or may not be reliable.

This page is only kept for historical reasons, or in case someone wants to try updating it.

Template:XBMC wiki toc Inline Media Sources are virtual links to the content you wish XBMC to use. When you enter any of the Videos, Music, Pictures or the Filemanager, you will see an entry for "Add Sources". When you first start with XBMC you should at least add one source, like a drive or directory on your PC or Mac to get you started.

If you select "Add sources" a dialog appears, where you may manually input a path, or browse to a source that contains media that you would like XBMC to use and display. As an example, if you enter the Music section, you could tell XBMC where it should look for your music. This can be as simple as selecting a folder on your computer or you can also choose to browse your home network for media. These two options would be the most widely used places for sources.

Remember that XBMC will add everything that lies inside the folder you select. So if you choose to add your C-disk, XBMC will have access to your entire C-disk for content by default. You can select as many sources you like if you have content in different places. When you have finished browsing and found the folder you would like, you should input a name for your source. This name will be displayed when you browse your sources. To finish, simply confirm by selecting "OK". You will now see a new entry in the list with the name you gave it.

Remember you can always add, edit or delete sources anytime you want to, via the Context Menu (which you can access e.g. by pressing the letter c on a keyboard). When you delete a source you only delete the link to that source within XBMC - your files will remain intact.

Adding Media Sources

Through the User Interface

By default every root section includes a Add Sources button that you can click to start adding sources. This can be disabled though Settings/Appearance/View Options/Disable add source buttons in file lists.

Via the Context menu

While in the root of any of XBMC's sections you can call up the Context Menu to add new sources (e.g. by pressing the letter C on a keyboard). From there you can also edit any of your current sources, just make sure you have the source you wish to edit selected. With the option Make Default you make a source the default when opening the window for the first time after reboot.

Note: For this context-menu to appear (for Add/Edit/Remove Sources), you need to be on your root-folder of ie. My Videos/My Music/My Pictures.

Note: The Context Menu will show more or less options, depending on where you call it.

Bookmark.add.jpg

Source.add.jpg

Browse or enter the name and location (Local / IP / UNC) you wish to assign to the source. For more detailed information on the virtual keyboard including USB, gamepad, remote, and remote t9 text input see the On Screen Keyboard section of the manual.

From here you can also set the content of your media source, see: Advanced Topics/Set Content (Video Library). With this feature you can let XBMC pick the FanArt and Thumbnails from the internet that way giving your XBMC a very nice look by showing the appropriate FanArt and Thumbnails when browsing your media.

Through Sources.xml

Note: This is considered to be an Advanced Topic, most settings can be changed in the GUI, see previous paragraph.

sources.xml is the configuration file where XBMC stores your media source locations. In this section we will concentrate on xml syntax of sources and the various options that are available.

The configuration file sources.xml exists in the userdata folder. It depends on your Operating System (Linux, Mac, XP, Vista) and if you changed the default settings during installation, where you can find your userdata folder. See Advanced Topics/The UserData Folder to find out where you have to look.

XML Syntax and Source Breakdown

XML syntax is very similar to html syntax, but can be less forgiving. Lets first take a look at a source:

    <music>
      <default>Main Music Collection</default>
      <source>
        <name>Main Music Collection</name>
        <path>smb://username:[email protected]/share/music/</path>
      </source>
    </music>

Some basics to cover first
Tags
Each word inside of <> symbols is called a 'tag'. Tags can either be starting, or ending tags. To make an ending tag you simply add a forward slash / to the beginning of the tag name. <tag> is a starting tag </tag> is an ending tag. Developers try to make tag names as self explanatory as possible. <name> for example is the name of the source.
Data
Between two tags is where any data associated with that source is stored. <tag>DATA</tag>. You can also store other tags inside of each other

Example:

    <music>
      <default>Main Music Collection</default>
      <source>
        <name>Main Music Collection</name>
        <path>smb://username:[email protected]/share/music/</path>
        <thumbnail>E:\Apps\XBMC\media\music.png</thumbnail>
        <lockmode>1</lockmode>
        <lockcode>12345678</lockcode>             
      </source>
    </music>

Required Fields
<music></music>
This tag defines which section your source belongs to. Other valid sections are <programs> <videos> <pictures> and <files>. You cannot have multiple <music> sections in your xml file.
<default></default>
If you specify the Name of a source here, the contents of this source will be shown when you enter e.g. the Music section (this example) instead of the ROOT shares listing.
<name></name>
The Name of the source. This will accept any characters in the current character set.
<path></path>
The path of the source. This can be a local path such as "e:\media\images\" or remote url such as "smb://username:password@serverip/path/". You may have more than one <path> tag in a single source, called multipaths. in Multipaths the directory listings will be combined. See Types of Media Sources for more information concerning paths.
* Multipath sources are restricted to local (PC or Xbox built-in hard drive), smb/samba, and xbms paths.
* The path can not be a playable object or an executable file, (ie a video, audio or .xbe file), it must be a share or a sub folder under a share.

Multipath Example:

    <music>
      <source>
        <name>Main Music Collection</name>
        <path>F:\Music</path>
        <path>smb://username:[email protected]/share/music/</path>
      </source>
    </music>

Thumbnails

    <thumbnail>e:\media\images\videos.png</thumbnail>

All sources can have a custom thumbnail icon. The image must be located locally on the Xbox.

Locking

If you want to make a source more private, you can use lockcodes or passwords to protect that source. The easiest way to accomplish this in XBMC, is using the GUI dialogs. First, enable the Master Lock in Settings/System/Master Lock. After enabling the Master Lock, a Set Lock button will pop up in the Context Menu allowing you to set a lock. XBMC will ask for the master lock code and then give you the opportunity to set a unique Password on that specific share. To Remove the Lock you need to remember the Master Lock code.

Note: Locking a source means you only give it protection in XBMC. Outside XBMC the source is still available and only protected, or not protected at all, by the Operating System. In the same way, if someone has access to manually edit the sources.xml he or she can remove or change the settings for the locked source. So, don't feel too safe when you protect a source in XBMC.

Note: The advanced user again, can manually edit the sources.xml file to accomplish the same. Remember when you enter lockcodes in the configuration file sources.xml you must first convert the lockcode to MD5 hash format before you enter them. You can use this site (link) to convert/hash them.

Note: The rest of this paragraph is for the advanced user.

Locking Example:

    <source>
      <name>SMB</name>
      <path pathversion="1">smb://DOMAIN;username:pwd@MyWindowsServer/movies/</path>
      <lockmode>1</lockmode>
      <lockcode>12345678</lockcode>
      <badpwdcount>0</badpwdcount>
    </source>

<lockmode> and <lockcode>

<lockmode> consists of four options:
0
Source is not locked. This is the default value if not specified.
1
Numeric lock. Can be typed via on screen numpad or remote control. Must be a numeric value.
2
Gamepad lock. Enter by pushing Xbox controller button sequence.
Enter gamepad button sequence using the following letter codes:
A B X Y = Same as buttons on gamepad
U D L R = D-pad Up, Down, Left, Right
W K ( ) = White, Black, Left Trigger, Right Trigger
3
Full-text lock. Enter with on screen keyboard or USB keyboard.
Enter HTML-escaped alphanumeric password. Make sure all characters are available on your language's on screen keyboard/USB keyboard.

Types of Media Sources

There are many Types of Media Sources, which will be explained in the Advanced Topics/Types of Media Sources.