MediasourceAdd Interface Reference

Add a new media source to the library. More...


Detailed Description

Add a new media source to the library.

Path: /mediasource/add

Parameters:
[in]urlThe URL of the media source
[in]titleThe title of the media source
[in]tagsThe tags to associate with it (a comma separated list of tags, each tags can use dots for hierarchy and two consecutive dots to indicatete a dot character)
[in]typeThe type of the media source. Possible values are file, folder, audurl, vidurl, imgurl, audfeed, vidfeed, imgfeed
[in]lookforaudioA boolean value indicating if to look for audio items or not whne processing the media source
[in]lookforvideoA boolean value indicating if to look for video items or not whne processing the media source
[in]lookforphotoA boolean value indicating if to look for photos items or not whne processing the media source
[in]transcodingwhenOne of always, never, pprofile or an empty string, where an empty string means that the global system settings applies, pprofile means: automatically determine whether the media should be transcoded based on the profile associated with the given device. This value overrides the system wide settings (see SettingsFetch for more information)
[in]publicA boolean value indicating if the media source is public and hence can be sent to a global respository for sharing with others. This field is only relevant for Internet media, local files/folders are always private.
Returns:
The newly added id (if added succesfully) within an XML documnt with the top level element response and two attributes status and message. The status can be either success or failure and the message describes the cause of the error in a user friendly manner.

Advanced Paramters: Some optional advanced parameters that are supported as well are below

Parameters:
[in]menusA specific set of menus under which this media source should be added (a comma separated list of menu names, each name can use dots for hierarchy and two consecutive dots to indicatete a dot character)
[in]menurootThe root under which to place menus. If omitted, it is assumed that the menus start with their root. An unlimited set of root menus can be created by an application, each such set of menus exists side by side with all the other sets and can become the active set of menus by modifying the root settings variable (see SettingsUpdate for more information). It is possible to create automatic indexes under any menu root by hard coding such indexes in config.xml.
[in]featuresA boolen value indicating if the media source should be listed as a top level menu item.

Examples:

The following will Add the folder c:\test: /mediasource/add?url=c:\test&title=test&type=folder&transcodingwhen=

If that folder does not exist the result will be:

<response status="failure" message="Content source does not exist or is not currently accessible...">
  

If it already exists as a media source the result will be:

<response status="failure" message="Content source already exists.">
  

If it exists in the file system and does not exists as a media source, the result will be:

<response status="success" message="Addition started successfully and will continue in the background.">