Compare commits

..
Author SHA1 Message Date
Ruud 465e7b2abc Merge branch 'refs/heads/develop' into desktop 2012-09-16 12:36:17 +02:00
Ruud 102a0177de Only use desktop updater callback on done and error 2012-09-16 12:34:24 +02:00
Ruud 578fb45785 Installer 1 up 2012-09-16 11:35:56 +02:00
Ruud 96995bbbe5 Merge branch 'refs/heads/develop' into desktop
Conflicts:
	version.py
2012-09-16 10:45:19 +02:00
Ruud 43e1adbff9 One up 2012-09-16 10:43:43 +02:00
Ruud 6e8b828cd4 Use proper object get 2012-09-16 10:11:24 +02:00
Ruud 5851f226b6 Add more disks to Windows root directory. 2012-09-16 10:11:04 +02:00
Ruud 4cfdafebbc Merge branch 'refs/heads/develop' into desktop 2012-09-14 13:15:47 +02:00
Ruud 006163bd2b Don't show error when thetvdb failes 2012-09-14 13:15:18 +02:00
Ruud b97acb8ef5 Merge branch 'refs/heads/develop' into desktop 2012-09-14 13:08:19 +02:00
Ruud de6d686fe5 Add API version to CP calls 2012-09-14 12:44:26 +02:00
Ruud 45bb88460c Remove wrongly added movies. 2012-09-14 12:42:52 +02:00
Ruud d2901bc68a Use thetvdb to check if the movie is a TV Show. 2012-09-11 21:32:36 +02:00
Ruud 2c0af15325 Torcache doesn't give back proper 404 2012-09-11 20:48:27 +02:00
10 changed files with 33 additions and 16 deletions
+1 -6
View File
@@ -383,11 +383,6 @@ class SourceUpdater(BaseUpdater):
class DesktopUpdater(BaseUpdater):
version = None
update_failed = False
update_version = None
last_check = 0
def __init__(self):
self.desktop = Env.get('desktop')
@@ -396,7 +391,7 @@ class DesktopUpdater(BaseUpdater):
def do_restart(e):
if e['status'] == 'done':
fireEventAsync('app.restart')
else:
elif e['status'] == 'error':
log.error('Failed updating desktop: %s', e['exception'])
self.update_failed = True
+4 -1
View File
@@ -67,7 +67,10 @@ class Downloader(Plugin):
for source in sources:
try:
filedata = self.urlopen(source % torrent_hash, show_error = False)
filedata = self.urlopen(source % torrent_hash, headers = {'Referer': ''}, show_error = False)
if 'torcache' in filedata and 'file not found' in filedata.lower():
continue
return filedata
except:
log.debug('Torrent hash "%s" wasn\'t found on: %s', (torrent_hash, source))
+1 -1
View File
@@ -55,7 +55,7 @@ class FileBrowser(Plugin):
driveletters = []
for drive in string.ascii_uppercase:
if win32file.GetDriveType(drive + ":") in [win32file.DRIVE_FIXED, win32file.DRIVE_REMOTE]:
if win32file.GetDriveType(drive + ":") in [win32file.DRIVE_FIXED, win32file.DRIVE_REMOTE, win32file.DRIVE_RAMDISK, win32file.DRIVE_REMOVABLE]:
driveletters.append(drive + ":\\")
return driveletters
+15 -1
View File
@@ -281,8 +281,22 @@ class MoviePlugin(Plugin):
def add(self, params = {}, force_readd = True, search_after = True):
if not params.get('identifier'):
log.error('Can\'t add movie without imdb identifier.')
msg = 'Can\'t add movie without imdb identifier.'
log.error(msg)
fireEvent('notify.frontend', type = 'movie.is_tvshow', message = msg)
return False
else:
try:
url = 'http://thetvdb.com/api/GetSeriesByRemoteID.php?imdbid=%s' % params.get('identifier')
tvdb = self.getCache('thetvdb.%s' % params.get('identifier'), url = url, show_error = False)
if tvdb and 'series' in tvdb.lower():
msg = 'Can\'t add movie, seems to be a TV show.'
log.error(msg)
fireEvent('notify.frontend', type = 'movie.is_tvshow', message = msg)
return False
except:
pass
library = fireEvent('library.add', single = True, attrs = params, update_after = False)
@@ -93,6 +93,8 @@ class Searcher(Plugin):
default_title = getTitle(movie['library'])
if not default_title:
log.error('No proper info found for movie, removing it from library to cause it from having more issues.')
fireEvent('movie.delete', movie['id'], single = True)
return
fireEvent('notify.frontend', type = 'searcher.started.%s' % movie['id'], data = True, message = 'Searching for "%s"' % default_title)
@@ -29,7 +29,10 @@ class CouchPotatoApi(MovieProvider):
if identifier is None: return {}
try:
headers = {'X-CP-Version': fireEvent('app.version', single = True)}
headers = {
'X-CP-Version': fireEvent('app.version', single = True),
'X-CP-API': 1,
}
data = self.urlopen((self.api_url % ('eta')) + (identifier + '/'), headers = headers)
dates = json.loads(data)
log.debug('Found ETA for %s: %s', (identifier, dates))
@@ -13,8 +13,8 @@ log = CPLog(__name__)
class IMDBAPI(MovieProvider):
urls = {
'search': 'http://www.imdbapi.com/?tomatoes=true&%s',
'info': 'http://www.imdbapi.com/?tomatoes=true&i=%s',
'search': 'http://www.imdbapi.com/?%s',
'info': 'http://www.imdbapi.com/?i=%s',
}
http_time_between_calls = 0
@@ -90,7 +90,7 @@ class IMDBAPI(MovieProvider):
},
'rating': {
'imdb': (tryFloat(movie.get('imdbRating', 0)), tryInt(movie.get('imdbVotes', '').replace(',', ''))),
'rotten': (tryFloat(movie.get('tomatoRating', 0)), tryInt(movie.get('tomatoReviews', '').replace(',', ''))),
#'rotten': (tryFloat(movie.get('tomatoRating', 0)), tryInt(movie.get('tomatoReviews', '').replace(',', ''))),
},
'imdb': str(movie.get('imdbID', '')),
'runtime': self.runtimeToMinutes(movie.get('Runtime', '')),
@@ -24,7 +24,7 @@ class PublicHD(TorrentProvider):
results = []
if self.isDisabled() or quality['hd'] != True:
if self.isDisabled() or not quality.get('hd', False):
return results
params = tryUrlencode({
+1 -1
View File
@@ -1,5 +1,5 @@
#define MyAppName "CouchPotato"
#define MyAppVer "2.0.0.pre1"
#define MyAppVer "2.0.0.pre2"
[Setup]
AppName={#MyAppName}
+1 -1
View File
@@ -1,2 +1,2 @@
VERSION = '2.0.0.pre1'
VERSION = '2.0.0.pre2'
BRANCH = 'desktop'