forked from 0x2620/pandora
48 lines
1.7 KiB
Python
48 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
# vi:si:et:sw=4:sts=4:ts=4
|
|
|
|
from django.conf.urls.defaults import *
|
|
|
|
|
|
urlpatterns = patterns("item.views",
|
|
#frames
|
|
(r'^(?P<id>[A-Z0-9].*)/(?P<size>\d+)p(?P<position>[\d\.]*)\.jpg$', 'frame'),
|
|
|
|
#timelines
|
|
(r'^(?P<id>[A-Z0-9].*)/timeline(?P<mode>[a-z]*)(?P<size>\d+)p(?P<position>\d+)\.(?P<format>png|jpg)$', 'timeline'),
|
|
(r'^(?P<id>[A-Z0-9].*)/timeline(?P<mode>[a-z]*)(?P<size>\d+)p\.(?P<format>png|jpg)$', 'timeline'),
|
|
|
|
#download
|
|
(r'^(?P<id>[A-Z0-9].*)/download$', 'download'),
|
|
(r'^(?P<id>[A-Z0-9].*)/download/$', 'download'),
|
|
(r'^(?P<id>[A-Z0-9].*)/download/(?P<resolution>\d+)p\.(?P<format>webm|ogv|mp4)$', 'download'),
|
|
|
|
#video
|
|
(r'^(?P<id>[A-Z0-9].*)/(?P<resolution>\d+)p(?P<index>\d*)\.(?P<format>webm|ogv|mp4)$', 'video'),
|
|
(r'^(?P<id>[A-Z0-9].*)/(?P<resolution>\d+)p(?P<index>\d*)\.(?P<track>.+)\.(?P<format>webm|ogv|mp4)$', 'video'),
|
|
|
|
#torrent
|
|
(r'^(?P<id>[A-Z0-9].*)/torrent$', 'torrent'),
|
|
(r'^(?P<id>[A-Z0-9].*)/torrent/(?P<filename>.*?)$', 'torrent'),
|
|
|
|
#export
|
|
(r'^(?P<id>[A-Z0-9].*)/json$', 'item_json'),
|
|
(r'^(?P<id>[A-Z0-9].*)/xml$', 'item_xml'),
|
|
|
|
#srt export
|
|
(r'^(?P<id>[A-Z0-9].*)/(?P<layer>.+)\.(?P<language>.{2})\.srt$', 'srt'),
|
|
|
|
#srt export
|
|
(r'^(?P<id>[A-Z0-9].*)/(?P<layer>.+)\.srt$', 'srt'),
|
|
|
|
#icon
|
|
(r'^(?P<id>[A-Z0-9].*)/icon(?P<size>\d*)\.jpg$', 'icon'),
|
|
|
|
#poster
|
|
(r'^(?P<id>[A-Z0-9].*)/posterframe(?P<position>\d+).jpg$', 'poster_frame'),
|
|
(r'^(?P<id>[A-Z0-9].*)/poster(?P<size>\d+)\.jpg$', 'poster'),
|
|
(r'^(?P<id>[A-Z0-9].*)/siteposter(?P<size>\d*)\.jpg$', 'siteposter'),
|
|
(r'^(?P<id>[A-Z0-9].*)/poster\.jpg$', 'siteposter'),
|
|
|
|
(r'^random$', 'random_annotation'),
|
|
)
|