From 0290989946a23f98c84016c05727f72d3a2c2073 Mon Sep 17 00:00:00 2001 From: Roman Bazalevsky Date: Fri, 23 Oct 2015 21:07:28 +0300 Subject: [PATCH 1/1] =?utf8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?utf8?q?=D0=BD=20=D0=BF=D0=BE=D1=82=D0=BE=D0=BA=20ogg=20=D0=B1=D0=B5?= =?utf8?q?=D0=B7=20=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87=D0=B5=D0=BD?= =?utf8?q?=D0=B8=D1=8F=20=D1=81=D0=BA=D0=BE=D1=80=D0=BE=D1=81=D1=82=D0=B8?= =?utf8?q?=20(=D0=BF=D1=80=D0=B5=D1=84=D0=B8=D0=BA=D1=81=20/ogv=20=D0=B8?= =?utf8?q?=20/m3uo=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA?= =?utf8?q?=D0=B0).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- plugins/m3u_plugin.py | 4 +++- vlcclient/vlcmessages.py | 3 +++ vphttp.py | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/m3u_plugin.py b/plugins/m3u_plugin.py index 2ea921a..636ad4e 100644 --- a/plugins/m3u_plugin.py +++ b/plugins/m3u_plugin.py @@ -38,7 +38,7 @@ import os class M3u(VPProxyPlugin): - handlers = ('m3u', 'm3ut', 'm3uw', 'list', 'play', 'index') + handlers = ('m3u', 'm3ut', 'm3uw', 'm3uo', 'list', 'play', 'index') logger = logging.getLogger('plugin_m3u') playlist = None @@ -55,6 +55,8 @@ class M3u(VPProxyPlugin): prefix='ogg' elif self.splitted_path[1]=='m3ut': prefix='mp4' + elif self.splitted_path[1]=='m3uo': + prefix='ogv' elif self.splitted_path[1] in ("list","play","index"): None else: diff --git a/vlcclient/vlcmessages.py b/vlcclient/vlcmessages.py index 1d03938..48e9321 100644 --- a/vlcclient/vlcmessages.py +++ b/vlcclient/vlcmessages.py @@ -16,6 +16,9 @@ class VlcMessage(object): elif qtype=='ogg': command = command + 'transcode{vcodec=theora,acodec=vorbis,vb=800,ab=128}:' muxer='ogg' + elif qtype=='ogv': + command = command + 'transcode{vcodec=theora,acodec=vorbis}:' + muxer='ogg' # elif qtype=='webm': # command = command + 'transcode{vcodec=VP80,acodec=vorbis,vb=512,ab=64}:' # muxer='ffmpeg{mux=ogg}' diff --git a/vphttp.py b/vphttp.py index 0a6ae43..155db57 100644 --- a/vphttp.py +++ b/vphttp.py @@ -165,7 +165,7 @@ class HTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler): self.reqtype = self.splittedpath[1].lower() # If first parameter is 'pid' or 'torrent' or it should be handled # by plugin - if not (self.reqtype in ('get','mp4','ogg') or self.reqtype in VPStuff.pluginshandlers): + if not (self.reqtype in ('get','mp4','ogg','ogv') or self.reqtype in VPStuff.pluginshandlers): self.dieWithError(400) # 400 Bad Request return except IndexError: @@ -237,7 +237,7 @@ class HTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler): "Sending fake headers for " + useragent) self.send_response(200) self.send_header('Cache-Control','no-cache'); - if self.reqtype=="ogg": + if self.reqtype in ("ogg","ogv"): self.send_header("Content-Type", "video/ogg") else: self.send_header("Content-Type", "video/mpeg") -- 2.34.1