Skip to content

Commit

Permalink
- Add published date to video descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
KOL committed Nov 13, 2015
1 parent 103576d commit e4fd902
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<key>CFBundleSignature</key>
<string>hook</string>
<key>CFBundleVersion</key>
<string>3.7</string>
<string>3.8</string>

<key>PlexPluginVersionUrl</key>
<string>http://bit.ly/1FuE3dz</string>
Expand Down
22 changes: 5 additions & 17 deletions Contents/Services/URL/YouTubeTV/ServiceCode.pys
Original file line number Diff line number Diff line change
Expand Up @@ -125,29 +125,17 @@ def MetadataObjectForURL(url):
if thumb[0] == '/':
thumb = 'http:%s' % thumb

try:
summary = u'%s\n%s' % (
item['video']['public_name'],
item['video']['description']
)
except:
summary = u'%s\n%s' % (
Video.GetFromMainContent(item, 'short_byline_text'),
Video.GetFromMainContent(item, 'description'),
)

return VideoClipObject(
title=u'%s' % item['video']['title'],
rating_key=url.split('&')[0],
summary=summary,
summary=u'%s / %s\n%s' % (
Video.GetFromMainContent(item, 'short_byline_text'),
Video.GetFromMainContent(item, 'date_text'),
Video.GetFromMainContent(item, 'description'),
),
thumb=thumb,
rating=(float(meta['avg_rating'])*2),
tags=meta['keywords'].split(','),
# TODO
# originally_available_at=Datetime.ParseDate(
# item['video']['time_created_text'],
# '%b %d, %Y'
# ).date(),
duration=(item['video']['length_seconds']*1000) if item[
'video'
]['length_seconds'] else None,
Expand Down

0 comments on commit e4fd902

Please sign in to comment.