Skip to content

Commit

Permalink
- Fix LG play video with long description
Browse files Browse the repository at this point in the history
- Video info now fetching from API instead of parsing from callback data
  • Loading branch information
KOL committed Dec 13, 2014
1 parent 6c43226 commit e56f0c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,21 @@ def VideoList(uid, title, album_id=0, offset=0):


@route(PREFIX_V + '/play')
def VideoPlay(info):
def VideoPlay(uid, vid):

item = JSON.ObjectFromString(info)
res = ApiRequest('video.get', {
'owner_id': uid,
'videos': '%s_%s' % (uid, vid),
'width': 320,
})

if not res or not res['count']:
return ObjectContainer(
header=L('Error'),
message=L('No entries found')
)

item = res['items'][0]

if not item:
raise Ex.MediaNotAvailable
Expand Down Expand Up @@ -246,7 +258,8 @@ def GetVideoObject(item):
return VideoClipObject(
key=Callback(
VideoPlay,
info=JSON.StringFromObject(item)
uid=item['owner_id'],
vid=item['id']
),
rating_key='%s.%s' % (Plugin.Identifier, item['id']),
title=u'%s' % item['title'],
Expand Down
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>1.2</string>
<string>1.3</string>

<key>PlexClientPlatforms</key>
<string>*</string>
Expand Down

0 comments on commit e56f0c5

Please sign in to comment.