Changeset 1860
- Timestamp:
- 02/11/08 19:21:47 (2 months ago)
- svm:headrev:
cc3e1ea1-1e01-0410-8d68-8b121e83a9d5:11142- Location:
- freevo
- Files:
-
- 3 modified
-
ChangeLog (modified) (1 diff)
-
src/util/fxdimdb.py (modified) (3 diffs)
-
src/video/plugins/imdb.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
freevo/ChangeLog
r1849 r1860 29 29 * Fixed headlines plug-in to ignore items without a title, etc. (B#2183225) 30 30 * Fixed imdb helper to correctly handle dates when available (B#2075291) 31 * Fixed imdb search when a season is specified but no episode (B#2214605) 31 32 * Fixed joy plug-in to remove any pending events when enabled (B#1916407) 32 33 * Fixed mplayer crash when auto cropping is enabled (B#2089592) -
freevo/src/util/fxdimdb.py
r1764 r1860 141 141 142 142 # find <season>X<episode> 143 season = '' 144 episode = '' 143 145 m = re.compile('([0-9]+)[xX]([0-9]+)') 144 146 res = m.search(name) … … 256 258 self.id = id 257 259 258 if season and episode: 260 if season is None or episode is None: 261 episodeid = None 262 else: 259 263 # This is a TV series, lets use a special search 260 url = 'http:// us.imdb.com/title/tt%s/episodes' % id264 url = 'http://www.imdb.com/title/tt%s/episodes' % id 261 265 req = urllib2.Request(url, txdata, txheaders) 262 266 263 267 try: 264 268 idpage = urllib2.urlopen(req) 265 except urllib2.HTTPError, error:266 raise FxdImdb_Net_Error( "IMDB unreachable" + error)269 except urllib2.HTTPError, why: 270 raise FxdImdb_Net_Error('IMDB unreachable' + str(why)) 267 271 268 272 episodeid = self.find_episode(idpage, id, season, episode) … … 270 274 271 275 # do the standard search 272 url = 'http:// us.imdb.com/title/tt%s' % episodeid276 url = 'http://www.imdb.com/title/tt%s' % id 273 277 req = urllib2.Request(url, txdata, txheaders) 274 278 275 279 try: 276 280 idpage = urllib2.urlopen(req) 277 except urllib2.HTTPError, error:278 raise FxdImdb_Net_Error( "IMDB unreachable" + error)281 except urllib2.HTTPError, why: 282 raise FxdImdb_Net_Error('IMDB unreachable' + str(why)) 279 283 280 284 self.parse_data(idpage, id, episodeid, season, episode) -
freevo/src/video/plugins/imdb.py
r1772 r1860 146 146 except UnicodeError, e: 147 147 print e 148 # if filename had a season/episode letsŽgrab it149 self.season = fxd.season150 self.episode = fxd.episode151 152 except Exception, e:153 print 'imdb_search:', e148 # if filename had a season/episode lets' grab it 149 self.season = hasattr(fxd, 'season') and fxd.season or '' 150 self.episode = hasattr(fxd, 'episode') and fxd.episode or '' 151 152 except urllib2.HTTPError, why: 153 _debug_('%s', (why,), DWARNING) 154 154 box.destroy() 155 box = PopupBox(text=_(' Unknown error while connecting to IMDB'))155 box = PopupBox(text=_('Connecting to IMDB failed:') + str(why)) 156 156 box.show() 157 157 time.sleep(2) … … 160 160 161 161 # for d in duplicates: 162 # items = [ menu.MenuItem('Add to "%s"' % d.name,163 # self.imdb_add_to_fxd, (d, 'add')),164 # menu.MenuItem('Variant to "%s"' % d.name,165 # self.imdb_add_to_fxd, (d, 'variant'))] + items162 # items = [ 163 # menu.MenuItem('Add to "%s"' % d.name, self.imdb_add_to_fxd, (d, 'add')), 164 # menu.MenuItem('Variant to "%s"' % d.name, self.imdb_add_to_fxd, (d, 'variant')) 165 # ] + items 166 166 167 167 box.destroy()
