Changes

Jump to: navigation, search

Playlist API

34 bytes added, 18:18, 1 February 2018
no edit summary
==Brief description==
Playlist API allows to export playlist in different formats from Ace Stream Media Server in different formats.
API endpoint:
'''Parameters:'''
* ''format'' (list) - set output format;* ''category'' (list) - filter by category (media type);* ''subcategory'' (string) - filter by subcategory (tags);* ''favorites'' (bool, default is 0) - filter favorites; favorites=0 means to output both favorite and non-favorite items;* ''items'' (list of integers) - filter by playlist item ids;* ''host'' (string) - configure playback URL: set "host" part of URL. Actually this is an IP address of Ace Stream Media Server. By default the host from endpoint URL is used.;* ''protocol'' (string, defaults to server settings) - configure playback URL: set output protocol (http or hls);* ''transcode_audio'' (bool, defaults to server settings) - configure playback URL: enabled audio transcoding;* ''transcode_mp3'' (bool, defaults to server settings) - configure playback URL: transcode MP3 to AAC (by default MP3 is not transcoded);* ''transcode_ac3'' (bool, defaults to server settings) - configure playback URL: transcode only AC3 to AAC and don't transcode other codecs;* ''preferred_audio_language'' (string, defaults to server settings) - configure playback ULR: set preferred audio language;* ''download'' (bool, default is 0) - download playlist as file;* ''skip_autosearch'' (bool, default is 0) - don't replace playlist data with autosearch results; this doesn't affect playlist items with disabled autosearch.
Boolean values are passed as 0 or 1 (e.g. transcode_audio=1), list of integers is passed as string of values concatenated with comma (e.g. items=14,115,127).
Allowed values for list parameters.
==Playlist output formats==
"'''acestream'''" format is used to export playlist in such way so it can be imported in the Ace Stream software running somewhere else.
At the moment we use M3U format with some additional fields, specific to Ace Stream.
Each playlist item is identified either by Content ID (start with acestream://) or infohash (starts with magnet:). Infohash is used when Content ID is not available for some playlist item.
Both types of identifiers are recognized by Ace Stream Media Server when playlist is imported.
"'''json'''" format is indented to be used for automation. Playlist is returned as list of items, each item is an object with such fields:
* id (integer)* playlist item id unique for this media server; this id can be passed in "items" parameter to filter specific playlist items
* title (string)* title
* tags (list of strings)* list of tags
"'''m3u'''" format is intented for different media players.
==Examples==
'''Get playlist in "acestream" format.:''' 
Request:
http://127.0.0.1:6878/playlist/get?format=acestream
'''Get playlist in "m3u" format.:''' 
Request:
http://127.0.0.1:6878/playlist/get?format=m3u
http://127.0.0.1:6878/ace/getstream?infohash=7889e5f0cea9b72f5dcd7a9c67e665c7f4f5b3eb&hlc=1&transcode_audio=0&transcode_mp3=0&transcode_ac3=0&preferred_audio_language=eng
'''Get playlist in "json" format.:''' 
Request:
http://127.0.0.1:6878/playlist/get?format=json

Navigation menu