poster
This commit is contained in:
parent
480f4fec30
commit
6dcffed666
3 changed files with 9 additions and 4 deletions
|
@ -144,11 +144,12 @@ class Movie(models.Model):
|
|||
posters_url = models.TextField(blank=True)
|
||||
poster_height = models.IntegerField(default=0)
|
||||
poster_width = models.IntegerField(default=0)
|
||||
|
||||
poster_frame = models.FloatField(default=-1)
|
||||
|
||||
def get_poser(self):
|
||||
url = self.poster_url:
|
||||
if not url:
|
||||
def get_poster(self):
|
||||
url = self.poster_url
|
||||
if not url and self.poster:
|
||||
url = self.poster.url
|
||||
return url
|
||||
|
||||
|
@ -208,6 +209,7 @@ class Movie(models.Model):
|
|||
movie[pub_key] = value()
|
||||
else:
|
||||
movie[pub_key] = value
|
||||
movie['poster'] = self.get_poster()
|
||||
if fields:
|
||||
for f in fields:
|
||||
if f.endswith('.length') and f[:-7] in ('cast', 'genre', 'trivia'):
|
||||
|
|
|
@ -5,7 +5,6 @@ from django.conf.urls.defaults import *
|
|||
|
||||
|
||||
urlpatterns = patterns("backend.views",
|
||||
(r'^upload/$', 'firefogg_upload'),
|
||||
(r'^frame/(?P<id>.*)/(?P<position>.*)\.(?P<size>\d+).jpg$', 'frame'),
|
||||
(r'^stream/(?P<id>.*).(?P<quality>.*).ogv$', 'video'),
|
||||
(r'^$', 'api'),
|
||||
|
|
|
@ -134,6 +134,10 @@ TRANSMISSON_PORT=9091
|
|||
TRANSMISSON_USER='transmission'
|
||||
TRANSMISSON_PASSWORD='transmission'
|
||||
|
||||
|
||||
#list of poster services, https://wiki.0x2620.org/wiki/pandora/posterservice
|
||||
POSTER_SERVICES=[]
|
||||
|
||||
#overwrite default settings with local settings
|
||||
try:
|
||||
from local_settings import *
|
||||
|
|
Loading…
Reference in a new issue