forked from 0x2620/pandora
use frame as thumbnail, fix default frame.
This commit is contained in:
parent
cce51fa4db
commit
34be7923a7
3 changed files with 14 additions and 14 deletions
|
@ -145,12 +145,11 @@ def update_sitemap(base_url):
|
||||||
#el.text = absolute_url("%s/video" % i.itemId)
|
#el.text = absolute_url("%s/video" % i.itemId)
|
||||||
el = ET.SubElement(video, "video:player_loc")
|
el = ET.SubElement(video, "video:player_loc")
|
||||||
el.attrib['allow_embed'] = 'no'
|
el.attrib['allow_embed'] = 'no'
|
||||||
el.text = absolute_url("%s/video" % i.itemId)
|
el.text = absolute_url("%s/player" % i.itemId)
|
||||||
el = ET.SubElement(video, "video:title")
|
el = ET.SubElement(video, "video:title")
|
||||||
el.text = i.get('title')
|
el.text = i.get('title')
|
||||||
el = ET.SubElement(video, "video:thumbnail_loc")
|
el = ET.SubElement(video, "video:thumbnail_loc")
|
||||||
icon = settings.CONFIG['user']['ui']['icons'] == 'frames' and 'icon' or 'poster'
|
el.text = absolute_url("%s/%96p.jpg" % i.itemId)
|
||||||
el.text = absolute_url("%s/%s256.jpg" %(i.itemId, icon))
|
|
||||||
description = i.get('description', i.get('summary', ''))
|
description = i.get('description', i.get('summary', ''))
|
||||||
if description:
|
if description:
|
||||||
el = ET.SubElement(video, "video:description")
|
el = ET.SubElement(video, "video:description")
|
||||||
|
|
|
@ -700,14 +700,15 @@ def frame(request, id, size, position=None):
|
||||||
return HttpResponseForbidden()
|
return HttpResponseForbidden()
|
||||||
frame = None
|
frame = None
|
||||||
if not position:
|
if not position:
|
||||||
frames = item.poster_frames()
|
if settings.CONFIG['media']['importFrames'] or item.poster_frame == -1:
|
||||||
if frames:
|
frames = item.poster_frames()
|
||||||
position = item.poster_frame
|
if frames:
|
||||||
if position == -1 or position > len(frames):
|
position = item.poster_frame
|
||||||
position = int(len(frames)/2)
|
if position == -1 or position > len(frames):
|
||||||
position = frames[int(position)]['position']
|
position = int(len(frames)/2)
|
||||||
elif item.poster_frame == -1 and item.sort.duration:
|
position = frames[int(position)]['position']
|
||||||
position = item.sort.duration/2
|
elif item.poster_frame == -1 and item.sort.duration:
|
||||||
|
position = item.sort.duration/2
|
||||||
else:
|
else:
|
||||||
position = item.poster_frame
|
position = item.poster_frame
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
<meta name="title" content="{{title}}" />
|
<meta name="title" content="{{title}}" />
|
||||||
<meta name="description" content="{{description}}"/>
|
<meta name="description" content="{{description}}"/>
|
||||||
<meta name="keywords" content="{{keywords|safe}}"/>
|
<meta name="keywords" content="{{keywords|safe}}"/>
|
||||||
<meta content="{{url}}/{{icon}}128.jpg" name="thumbnail"/>
|
<meta content="{{url}}/96p.jpg" name="thumbnail"/>
|
||||||
<meta content="{{url}}/{{icon}}128.jpg" name="image_src"/>
|
<meta content="{{url}}/96p.jpg" name="image_src"/>
|
||||||
<meta property="og:title" content="{{title}}"/>
|
<meta property="og:title" content="{{title}}"/>
|
||||||
<meta property="og:type" content="movie"/>
|
<meta property="og:type" content="movie"/>
|
||||||
<meta property="og:url" content="{{url}}"/>
|
<meta property="og:url" content="{{url}}"/>
|
||||||
<meta property="og:image" content="{{url}}/{{icon}}128.jpg"/>
|
<meta property="og:image" content="{{url}}/96p.jpg"/>
|
||||||
<meta property="og:site_name" content="{{settings.SITENAME}}"/>
|
<meta property="og:site_name" content="{{settings.SITENAME}}"/>
|
||||||
<meta property="og:description" content="{{description}}"/>
|
<meta property="og:description" content="{{description}}"/>
|
||||||
<meta name="google" value="notranslate"/>
|
<meta name="google" value="notranslate"/>
|
||||||
|
|
Loading…
Reference in a new issue