[cineoob] subtitle part cleaned
This commit is contained in:
parent
e25e2d0511
commit
983f8a69aa
1 changed files with 2 additions and 12 deletions
|
|
@ -550,12 +550,7 @@ class Cineoob(ReplApplication):
|
||||||
Get information about a subtitle.
|
Get information about a subtitle.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
subtitle = None
|
subtitle = self.get_object(id, 'get_subtitle')
|
||||||
_id, backend = self.parse_id(id)
|
|
||||||
for _backend, result in self.do('get_subtitle', _id, backends=backend, caps=ICapSubtitle):
|
|
||||||
if result:
|
|
||||||
backend = _backend
|
|
||||||
subtitle = result
|
|
||||||
if not subtitle:
|
if not subtitle:
|
||||||
print >>sys.stderr, 'Subtitle not found: %s' % id
|
print >>sys.stderr, 'Subtitle not found: %s' % id
|
||||||
return 3
|
return 3
|
||||||
|
|
@ -630,12 +625,7 @@ class Cineoob(ReplApplication):
|
||||||
Search subtitles of movie_ID.
|
Search subtitles of movie_ID.
|
||||||
"""
|
"""
|
||||||
language, id = self.parse_command_args(line, 2, 2)
|
language, id = self.parse_command_args(line, 2, 2)
|
||||||
movie = None
|
movie = self.get_object(id, 'get_movie', ('original_title'))
|
||||||
_id, backend = self.parse_id(id)
|
|
||||||
for _backend, result in self.do('get_movie', _id, backends=backend, caps=ICapCinema):
|
|
||||||
if result:
|
|
||||||
backend = _backend
|
|
||||||
movie = result
|
|
||||||
if not movie:
|
if not movie:
|
||||||
print >>sys.stderr, 'Movie not found: %s' % id
|
print >>sys.stderr, 'Movie not found: %s' % id
|
||||||
return 3
|
return 3
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue