added date and time to dvr playlists
This commit is contained in:
parent
4f5f23a6d7
commit
489476c4ee
1 changed files with 4 additions and 0 deletions
|
@ -383,11 +383,13 @@ http_dvr_list_playlist(http_connection_t *hc)
|
|||
durration = de->de_stop - de->de_start;
|
||||
durration += (de->de_stop_extra + de->de_start_extra)*60;
|
||||
bandwidth = ((8*fsize) / (durration*1024.0));
|
||||
strftime(buf, sizeof(buf), "%FT%T%z", localtime(&(de->de_start)));
|
||||
|
||||
htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL));
|
||||
|
||||
htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRItime_t"\n", durration);
|
||||
htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%d,BANDWIDTH=%d\n", de->de_id, bandwidth);
|
||||
htsbuf_qprintf(hq, "#EXT-X-PROGRAM-DATE-TIME:%s\n", buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "/dvrfile/%d", de->de_id);
|
||||
htsbuf_qprintf(hq, "http://%s%s?ticket=%s\n", host, buf,
|
||||
|
@ -420,12 +422,14 @@ http_dvr_playlist(http_connection_t *hc, dvr_entry_t *de)
|
|||
|
||||
if(fsize) {
|
||||
bandwidth = ((8*fsize) / (durration*1024.0));
|
||||
strftime(buf, sizeof(buf), "%FT%T%z", localtime(&(de->de_start)));
|
||||
|
||||
htsbuf_qprintf(hq, "#EXTM3U\n");
|
||||
htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL));
|
||||
|
||||
htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRItime_t"\n", durration);
|
||||
htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%d,BANDWIDTH=%d\n", de->de_id, bandwidth);
|
||||
htsbuf_qprintf(hq, "#EXT-X-PROGRAM-DATE-TIME:%s\n", buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "/dvrfile/%d", de->de_id);
|
||||
ticket_id = access_ticket_create(buf);
|
||||
|
|
Loading…
Add table
Reference in a new issue