forked from 0x2620/pandora
rewrite timecodes ot new form
This commit is contained in:
parent
6728b8cbaa
commit
ab33af301e
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
# Create your views here.
|
# Create your views here.
|
||||||
from django.shortcuts import get_object_or_404, redirect
|
|
||||||
from urllib import quote
|
from urllib import quote
|
||||||
|
import re
|
||||||
|
|
||||||
|
from django.shortcuts import get_object_or_404, redirect
|
||||||
|
|
||||||
import models
|
import models
|
||||||
|
|
||||||
|
@ -50,6 +52,10 @@ def padma_video(request, url):
|
||||||
else:
|
else:
|
||||||
alias = get_object_or_404(models.IDAlias, old=hid)
|
alias = get_object_or_404(models.IDAlias, old=hid)
|
||||||
url = '/%s' % alias.new
|
url = '/%s' % alias.new
|
||||||
|
timecodes = re.compile('(\d{2}:\d{2}:\d{2}\.\d{3})-(\d{2}:\d{2}:\d{2}\.\d{3})').findall(view)
|
||||||
|
if timecodes:
|
||||||
|
timecodes = [t[:-4] for t in timecodes[0]]
|
||||||
|
view = ','.join(timecodes)
|
||||||
if view:
|
if view:
|
||||||
url += '/' + {
|
url += '/' + {
|
||||||
'editor': 'timeline',
|
'editor': 'timeline',
|
||||||
|
|
Loading…
Reference in a new issue