Skip to content

Commit

Permalink
Fixed str casting error
Browse files Browse the repository at this point in the history
  • Loading branch information
sdornan committed Aug 31, 2011
1 parent 4e148a9 commit 000a0d1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion comicvine/descriptor.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<app>
<id>comicvine</id>
<name>Comic Vine</name>
<version>1.0</version>
<version>1.1</version>
<description>Comic Vine is the world's largest comic book website. Watch hundreds of original videos and interviews with comic creators and artists.</description>
<thumb>http://media.comicvine.com/media/devices/boxee.png</thumb>
<repository>http://dir.boxee.tv/apps</repository>
Expand Down
12 changes: 3 additions & 9 deletions comicvine/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def link_account():
mc.ShowDialogOk("Let's do this.", "To link your account, visit www.comicvine.com/boxee to get a link code.\n\nEnter this code on the next screen.")

link_code = mc.ShowDialogKeyboard("Enter your link code.", "", False).upper()
new_api_key = str(get_api_key(link_code))
new_api_key = get_api_key(link_code)
if new_api_key:
mc.GetApp().GetLocalConfig().SetValue('api_key', new_api_key)
mc.GetApp().GetLocalConfig().SetValue('api_key', str(new_api_key))
global API_KEY
API_KEY = new_api_key
API_KEY = str(new_api_key)
return True
else:
return False
Expand All @@ -96,12 +96,6 @@ def get_videos(cat_id):
elif cat_id == 'search':
query = mc.ShowDialogKeyboard("Search", "", False).replace(' ', '%20')
response = mc.Http().Get(API_PATH + '/search/?api_key=' + API_KEY + '&resources=video&query=' + query + '&format=json')
elif cat_id == '5-DP':
response = mc.Http().Get(API_PATH + '/videos/?api_key=' + API_KEY + '&video_type=5&offset=161&format=json')
elif cat_id == '5-P4':
response = mc.Http().Get(API_PATH + '/videos/?api_key=' + API_KEY + '&video_type=5&format=json')
elif cat_id == '5-MO':
response = mc.Http().Get(API_PATH + '/videos/?api_key=' + API_KEY + '&video_type=5&offset=105&limit=21&format=json')
else:
response = mc.Http().Get(API_PATH + '/videos/?api_key=' + API_KEY + '&video_type=' + cat_id + '&sort=-publish_date&format=json')

Expand Down
2 changes: 1 addition & 1 deletion giantbomb/descriptor.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<app>
<id>giantbomb</id>
<name>Giant Bomb</name>
<version>2.0</version>
<version>2.1</version>
<description>Giant Bomb is a video game enthusiast site with a sense of humor. Watch Jeff Gerstmann and crew in thousands of original game videos, reviews and previews.</description>
<thumb>http://media.giantbomb.com/media/devices/boxee.png</thumb>
<repository>http://dir.boxee.tv/apps</repository>
Expand Down
6 changes: 3 additions & 3 deletions giantbomb/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ def link_account():
mc.ShowDialogOk("Let's do this.", "To link your account, visit www.giantbomb.com/boxee to get a link code.\n\nEnter this code on the next screen.")

link_code = mc.ShowDialogKeyboard("Enter your link code.", "", False).upper()
new_api_key = str(get_api_key(link_code))
new_api_key = get_api_key(link_code)
if new_api_key:
mc.GetApp().GetLocalConfig().SetValue('api_key', new_api_key)
mc.GetApp().GetLocalConfig().SetValue('api_key', str(new_api_key))
global API_KEY
API_KEY = new_api_key
API_KEY = str(new_api_key)
return True
else:
return False
Expand Down

0 comments on commit 000a0d1

Please sign in to comment.