use local ffmpeg2theora if available
This commit is contained in:
parent
60839de99c
commit
6bd249a5ae
2 changed files with 7 additions and 1 deletions
|
@ -62,7 +62,11 @@ def oshash(filename):
|
||||||
|
|
||||||
def avinfo(filename):
|
def avinfo(filename):
|
||||||
if os.path.getsize(filename):
|
if os.path.getsize(filename):
|
||||||
p = subprocess.Popen(['ffmpeg2theora', '--info', filename],
|
ffmpeg2theora = 'ffmpeg2theora'
|
||||||
|
local = os.path.expanduser('~/.ox/bin/ffmpeg2theora')
|
||||||
|
if os.path.exists(local):
|
||||||
|
ffmpeg2theora = local
|
||||||
|
p = subprocess.Popen([ffmpeg2theora, '--info', filename],
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
info, error = p.communicate()
|
info, error = p.communicate()
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -160,6 +160,8 @@ def decodeHtml(html):
|
||||||
return match.group(0)
|
return match.group(0)
|
||||||
return charrefpat.sub(entitydecode, html).replace(u'\xa0', ' ')
|
return charrefpat.sub(entitydecode, html).replace(u'\xa0', ' ')
|
||||||
|
|
||||||
|
decode_hmtl = decodeHtml
|
||||||
|
|
||||||
def highlight(text, query, hlClass="hl"):
|
def highlight(text, query, hlClass="hl"):
|
||||||
"""
|
"""
|
||||||
>>> highlight('me & you and $&%', 'and')
|
>>> highlight('me & you and $&%', 'and')
|
||||||
|
|
Loading…
Reference in a new issue