chanjunkai пре 5 година
родитељ
комит
6ce607282c
1 измењених фајлова са 6 додато и 7 уклоњено
  1. 6 7
      Controller/CloudStorage.py

+ 6 - 7
Controller/CloudStorage.py

@@ -134,14 +134,13 @@ class CloudStorageView(View):
             )
             # m3u8 = '{uid}/vod{channel}/{time}/{time}.m3u8'. \
             #     format(uid=uid, channel=channel, time=vod['time'])
-            playlist_entries = [
-                {
-                    'name': response_url,
-                    'duration': 10,
-                }
-            ]
+            playlist_entries.append({
+                'name': response_url,
+                'duration': 10,
+            })
         playlist = PlaylistGenerator(playlist_entries).generate()
-        return HttpResponse(status=200, content=playlist)
+        return HttpResponse(status=200, content=playlist,content_type='application/json')
+
 
     def do_get_sign_sts(self, request_dict, ip, response):
         uidToken = request_dict.get('uidToken', None)