117
edits
Changes
no edit summary
==Brief description==
Playlist API allows to export playlist in different formats from Ace Stream Media Server in different formats. API available since version 3.1.28.
API endpoint: <tt>'''<tt><nowiki>http://<engine_host>:6878/playlist/get</nowiki>'''</tt>'''
'''Parameters:'''
Allowed values for list parameters:
* '''format''' - acestream, m3u, json;
* '''category''' - tv, movies, music_video, music, other;
* '''protocol''' - http, hls.
==Playlist output formats==
"'''m3u'''" format is intented for different media players. "'''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; - * ''playback_url '' (string) - playback URL; - * ''content_id '' (string) - Content ID (may be null); - * ''infohash '' (string) - infohash (may be null); - * ''transport_file_url '' (string) - transport file URL (may be null); - * ''category '' (string) - media type (see list for "category" parameter); - * ''is_live '' (integer) - 1: live content, 0: VOD, -1: unknown; - * ''auto_search '' (bool) - whether autosearch is enabled for this playlist item; - * ''tags '' (list of strings) - list of tags.
==Examples==
'''Get playlist in "m3u" format:'''
Request:
<nowiki>http://127.0.0.1:6878/playlist/get?format=acestreamm3u</nowiki>
Response:
#EXTM3U
#EXTINF:-1,Test Channel 1
#EXTINF:-1 acestream-autosearch="1",Test Channel 2
'''Get playlist in "acestream" format:'''
Request:
<nowiki>http://127.0.0.1:6878/playlist/get?format=m3uacestream</nowiki>
Response:
#EXTM3U
#EXTINF:-1,Test Channel 1
#EXTINF:-1 acestream-autosearch="1",Test Channel 2
Request:
<nowiki>http://127.0.0.1:6878/playlist/get?format=json</nowiki>
Response:
"auto_search": false,
"title": "Test Channel 1",
"playback_url": "<nowiki>http://127.0.0.1:6878/ace/getstream?id=acbfd1954084ffc68c65b0948485e5d0f82173e2&hlc=1&transcode_audio=0 &transcode_mp3=0&transcode_ac3=0&preferred_audio_language=eng</nowiki>",
"is_live": 1,
"transport_file_url": null,
"auto_search": true,
"title": "Test Channel 2",
"playback_url": "<nowiki>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</nowiki>",
"is_live": 1,
"transport_file_url": null,