Skip to content

Commit

Permalink
fix long vods in service.
Browse files Browse the repository at this point in the history
  • Loading branch information
coryo committed Dec 31, 2015
1 parent 2e2541f commit aa6826d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TwitchMod by Cory <babylonstudio@gmail.com>
import sys
from sys import maxint as MAXINT
from urllib import urlencode
from updater import Updater
from DumbTools import DumbKeyboard, DumbPrefs
Expand Down Expand Up @@ -275,7 +275,7 @@ def ChannelVodsList(name=None, apiurl=None, broadcasts=True, limit=PAGE_LIMIT):
oc.add(VideoClipObject(url="1"+url,
title=unicode(title),
summary=unicode(video['description']),
duration=min(int(video['length'])*1000, sys.maxint),
duration=min(int(video['length'])*1000, MAXINT),
thumb=Resource.ContentsOfURLWithFallback(video['preview'],
fallback=ICONS['videos'])))
if len(oc) + ignored >= limit:
Expand Down
2 changes: 1 addition & 1 deletion Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleVersion</key>
<string>1.3.1</string>
<string>1.3.2</string>
<key>PlexPluginVersionUrl</key>
<string>https://api.github.com/repos/coryo/TwitchMod.bundle/releases/latest</string>
<key>PlexPluginCodePolicy</key>
Expand Down
3 changes: 2 additions & 1 deletion Contents/Services/URL/TwitchTV/ServiceCode.pys
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from sys import maxint as MAXINT
from collections import OrderedDict
from time import time
#from __builtin__ import str
Expand Down Expand Up @@ -56,7 +57,7 @@ def MetadataObjectForURL(url):
title=unicode(video['title']),
summary=unicode(video['description']),
thumb=Resource.ContentsOfURLWithFallback(video['preview']),
duration=int(video['length']) * 1000
duration=min(int(video['length']) * 1000, MAXINT)
)
else:
raise Ex.MediaNotAvailable
Expand Down

0 comments on commit aa6826d

Please sign in to comment.