Skip to content

Commit

Permalink
Add video runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
sdornan committed Nov 16, 2011
1 parent 5b4873f commit 3b6d405
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
4 changes: 1 addition & 3 deletions animevice/menu.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mc
import simplejson
import urllib

API_PATH = 'http://api.animevice.com'
API_KEY = '399084fd5bd2854fd2fe8a6fc2eb723125578fbc' # Default API key
Expand Down Expand Up @@ -110,7 +109,6 @@ def get_videos(cat_id):
else:
url = vid['high_url']
date = vid['publish_date'].encode('utf-8').split(' ')[0].split('-')
#duration = vid['length_seconds']

item = mc.ListItem(mc.ListItem.MEDIA_VIDEO_CLIP)
item.SetLabel(vid['name'].encode('utf-8'))
Expand All @@ -119,7 +117,7 @@ def get_videos(cat_id):
item.SetImage(0, border)
item.SetPath(url.encode('utf-8'))
item.SetDate(int(date[0]), int(date[1]), int(date[2]))
#item.SetDuration(int(duration).encode('utf-8'))
item.SetDuration(vid['length_seconds'])
videos.append(item)

if border == 'bg_imgFlare_640x360.png'.encode('utf-8'):
Expand Down
4 changes: 1 addition & 3 deletions comicvine/menu.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mc
import simplejson
import urllib

API_PATH = 'http://api.comicvine.com'
API_KEY = '4a54f2e9f860c0230764deb5c01ceea49fe98dde' # Default API key
Expand Down Expand Up @@ -110,7 +109,6 @@ def get_videos(cat_id):
else:
url = vid['high_url']
date = vid['publish_date'].encode('utf-8').split(' ')[0].split('-')
#duration = vid['length_seconds']

item = mc.ListItem(mc.ListItem.MEDIA_VIDEO_CLIP)
item.SetLabel(vid['name'].encode('utf-8'))
Expand All @@ -119,7 +117,7 @@ def get_videos(cat_id):
item.SetImage(0, border)
item.SetPath(url.encode('utf-8'))
item.SetDate(int(date[0]), int(date[1]), int(date[2]))
#item.SetDuration(int(duration).encode('utf-8'))
item.SetDuration(vid['length_seconds'])
videos.append(item)

if border == 'bg_imgFlare_640x360.png'.encode('utf-8'):
Expand Down
4 changes: 1 addition & 3 deletions giantbomb/menu.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mc
import simplejson
import urllib

API_PATH = 'http://api.giantbomb.com'
API_KEY = '57659bff0faacdf8ab9b2500b552e7fd37b4b677' # Default API key
Expand Down Expand Up @@ -143,7 +142,6 @@ def get_videos(cat_id):
else:
url = vid['high_url']
date = vid['publish_date'].encode('utf-8').split(' ')[0].split('-')
#duration = vid['length_seconds']

item = mc.ListItem(mc.ListItem.MEDIA_VIDEO_CLIP)
item.SetLabel(vid['name'].encode('utf-8'))
Expand All @@ -152,7 +150,7 @@ def get_videos(cat_id):
item.SetImage(0, border)
item.SetPath(url.encode('utf-8'))
item.SetDate(int(date[0]), int(date[1]), int(date[2]))
#item.SetDuration(int(duration).encode('utf-8'))
item.SetDuration(vid['length_seconds'])
videos.append(item)

if border == 'bg_imgFlare_640x360.png'.encode('utf-8'):
Expand Down
4 changes: 1 addition & 3 deletions screened/menu.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mc
import simplejson
import urllib

API_PATH = 'http://api.screened.com'
API_KEY = '3a5d29f3544c5232254708c75bc9c3965bdb526e' # Default API key
Expand Down Expand Up @@ -110,7 +109,6 @@ def get_videos(cat_id):
else:
url = vid['high_url']
date = vid['publish_date'].encode('utf-8').split(' ')[0].split('-')
#duration = vid['length_seconds']

item = mc.ListItem(mc.ListItem.MEDIA_VIDEO_CLIP)
item.SetLabel(vid['name'].encode('utf-8'))
Expand All @@ -119,7 +117,7 @@ def get_videos(cat_id):
item.SetImage(0, border)
item.SetPath(url.encode('utf-8'))
item.SetDate(int(date[0]), int(date[1]), int(date[2]))
#item.SetDuration(int(duration).encode('utf-8'))
item.SetDuration(vid['length_seconds'])
videos.append(item)

if border == 'bg_imgFlare_640x360.png'.encode('utf-8'):
Expand Down
4 changes: 1 addition & 3 deletions tested/menu.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mc
import simplejson
import urllib

API_PATH = 'http://api.tested.com'
API_KEY = 'ca8c4515da52fdb3e3961e4273763c770fcce1a0' # Default API key
Expand Down Expand Up @@ -110,7 +109,6 @@ def get_videos(cat_id):
else:
url = vid['high_url']
date = vid['publish_date'].encode('utf-8').split(' ')[0].split('-')
#duration = vid['length_seconds']

item = mc.ListItem(mc.ListItem.MEDIA_VIDEO_CLIP)
item.SetLabel(vid['name'].encode('utf-8'))
Expand All @@ -119,7 +117,7 @@ def get_videos(cat_id):
item.SetImage(0, border)
item.SetPath(url.encode('utf-8'))
item.SetDate(int(date[0]), int(date[1]), int(date[2]))
#item.SetDuration(int(duration).encode('utf-8'))
item.SetDuration(vid['length_seconds'])
videos.append(item)

if border == 'bg_imgFlare_640x360.png'.encode('utf-8'):
Expand Down

0 comments on commit 3b6d405

Please sign in to comment.