Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
465e7b2abc | ||
|
|
102a0177de | ||
|
|
578fb45785 | ||
|
|
96995bbbe5 | ||
|
|
43e1adbff9 | ||
|
|
6e8b828cd4 | ||
|
|
5851f226b6 | ||
|
|
4cfdafebbc | ||
|
|
006163bd2b | ||
|
|
b97acb8ef5 | ||
|
|
de6d686fe5 | ||
|
|
45bb88460c | ||
|
|
d2901bc68a | ||
|
|
2c0af15325 |
@@ -383,11 +383,6 @@ class SourceUpdater(BaseUpdater):
|
|||||||
|
|
||||||
class DesktopUpdater(BaseUpdater):
|
class DesktopUpdater(BaseUpdater):
|
||||||
|
|
||||||
version = None
|
|
||||||
update_failed = False
|
|
||||||
update_version = None
|
|
||||||
last_check = 0
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.desktop = Env.get('desktop')
|
self.desktop = Env.get('desktop')
|
||||||
|
|
||||||
@@ -396,7 +391,7 @@ class DesktopUpdater(BaseUpdater):
|
|||||||
def do_restart(e):
|
def do_restart(e):
|
||||||
if e['status'] == 'done':
|
if e['status'] == 'done':
|
||||||
fireEventAsync('app.restart')
|
fireEventAsync('app.restart')
|
||||||
else:
|
elif e['status'] == 'error':
|
||||||
log.error('Failed updating desktop: %s', e['exception'])
|
log.error('Failed updating desktop: %s', e['exception'])
|
||||||
self.update_failed = True
|
self.update_failed = True
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,10 @@ class Downloader(Plugin):
|
|||||||
|
|
||||||
for source in sources:
|
for source in sources:
|
||||||
try:
|
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
|
return filedata
|
||||||
except:
|
except:
|
||||||
log.debug('Torrent hash "%s" wasn\'t found on: %s', (torrent_hash, source))
|
log.debug('Torrent hash "%s" wasn\'t found on: %s', (torrent_hash, source))
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class FileBrowser(Plugin):
|
|||||||
|
|
||||||
driveletters = []
|
driveletters = []
|
||||||
for drive in string.ascii_uppercase:
|
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 + ":\\")
|
driveletters.append(drive + ":\\")
|
||||||
|
|
||||||
return driveletters
|
return driveletters
|
||||||
|
|||||||
@@ -281,8 +281,22 @@ class MoviePlugin(Plugin):
|
|||||||
def add(self, params = {}, force_readd = True, search_after = True):
|
def add(self, params = {}, force_readd = True, search_after = True):
|
||||||
|
|
||||||
if not params.get('identifier'):
|
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
|
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)
|
library = fireEvent('library.add', single = True, attrs = params, update_after = False)
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ class Searcher(Plugin):
|
|||||||
|
|
||||||
default_title = getTitle(movie['library'])
|
default_title = getTitle(movie['library'])
|
||||||
if not default_title:
|
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
|
return
|
||||||
|
|
||||||
fireEvent('notify.frontend', type = 'searcher.started.%s' % movie['id'], data = True, message = 'Searching for "%s"' % default_title)
|
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 {}
|
if identifier is None: return {}
|
||||||
try:
|
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)
|
data = self.urlopen((self.api_url % ('eta')) + (identifier + '/'), headers = headers)
|
||||||
dates = json.loads(data)
|
dates = json.loads(data)
|
||||||
log.debug('Found ETA for %s: %s', (identifier, dates))
|
log.debug('Found ETA for %s: %s', (identifier, dates))
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ log = CPLog(__name__)
|
|||||||
class IMDBAPI(MovieProvider):
|
class IMDBAPI(MovieProvider):
|
||||||
|
|
||||||
urls = {
|
urls = {
|
||||||
'search': 'http://www.imdbapi.com/?tomatoes=true&%s',
|
'search': 'http://www.imdbapi.com/?%s',
|
||||||
'info': 'http://www.imdbapi.com/?tomatoes=true&i=%s',
|
'info': 'http://www.imdbapi.com/?i=%s',
|
||||||
}
|
}
|
||||||
|
|
||||||
http_time_between_calls = 0
|
http_time_between_calls = 0
|
||||||
@@ -90,7 +90,7 @@ class IMDBAPI(MovieProvider):
|
|||||||
},
|
},
|
||||||
'rating': {
|
'rating': {
|
||||||
'imdb': (tryFloat(movie.get('imdbRating', 0)), tryInt(movie.get('imdbVotes', '').replace(',', ''))),
|
'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', '')),
|
'imdb': str(movie.get('imdbID', '')),
|
||||||
'runtime': self.runtimeToMinutes(movie.get('Runtime', '')),
|
'runtime': self.runtimeToMinutes(movie.get('Runtime', '')),
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class PublicHD(TorrentProvider):
|
|||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
if self.isDisabled() or quality['hd'] != True:
|
if self.isDisabled() or not quality.get('hd', False):
|
||||||
return results
|
return results
|
||||||
|
|
||||||
params = tryUrlencode({
|
params = tryUrlencode({
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#define MyAppName "CouchPotato"
|
#define MyAppName "CouchPotato"
|
||||||
#define MyAppVer "2.0.0.pre1"
|
#define MyAppVer "2.0.0.pre2"
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppName={#MyAppName}
|
AppName={#MyAppName}
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
VERSION = '2.0.0.pre1'
|
VERSION = '2.0.0.pre2'
|
||||||
BRANCH = 'desktop'
|
BRANCH = 'desktop'
|
||||||
|
|||||||
Reference in New Issue
Block a user