Changes

Jump to: navigation, search

Playlist API

312 bytes added, 14:55, 19 April 2018
Brief description
''Added in version 3.1.28'' ==Brief description==
Playlist API allows to export playlist in different formats from Ace Stream Media Server.
* ''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.
* ''generate_player_id'' (bool, default is 0) - with this option engine will output playlist with random '''pid''' ([[Engine_HTTP_API#Player ID]]) for each item.
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.:
* '''format:'''* - acestream* , m3u, json;* json '''category:'''* - tv* , movies* , music_video* , music, other;* other '''protocol:'''* - http* , hls.
== Playlist output formats ==
"'''m3u'''" format is intented for different media players.
==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.
* ''tags'' (list of strings) - list of tags.
"'''m3u'''" format is intented for different media players.
 ==Examples=='''Get playlist in "acestreamm3u" format:'''
Request:
<nowiki>http://127.0.0.1:6878/playlist/get?format=acestreamm3u</nowiki>
Response:
 
#EXTM3U
#EXTINF:-1,Test Channel 1
acestream<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>
#EXTINF:-1 acestream-autosearch="1",Test Channel 2
magnet<nowiki>http://127.0.0.1:6878/ace/getstream?xtinfohash=urn:btih:7889e5f0cea9b72f5dcd7a9c67e665c7f4f5b3eb&hlc=1&transcode_audio=0 &transcode_mp3=0&transcode_ac3=0&preferred_audio_language=eng</nowiki>
'''Get playlist in "m3uacestream" format:'''
Request:
<nowiki>http://127.0.0.1:6878/playlist/get?format=m3uacestream</nowiki>
Response:
 
#EXTM3U
#EXTINF:-1,Test Channel 1
httpacestream://127.0.0.1:6878/ace/getstream?id=acbfd1954084ffc68c65b0948485e5d0f82173e2&hlc=1&transcode_audio=0 &transcode_mp3=0&transcode_ac3=0&preferred_audio_language=eng
#EXTINF:-1 acestream-autosearch="1",Test Channel 2
httpmagnet://127.0.0.1:6878/ace/getstream?infohashxt=urn:btih:7889e5f0cea9b72f5dcd7a9c67e665c7f4f5b3eb&hlc=1&transcode_audio=0 &transcode_mp3=0&transcode_ac3=0&preferred_audio_language=eng
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,

Navigation menu