Browse Source

Import cleanup

pull/3944/head
Ruud 11 years ago
parent
commit
c97bd38c83
  1. 8
      couchpotato/core/media/_base/media/main.py
  2. 1
      couchpotato/core/media/movie/_base/main.py
  3. 1
      couchpotato/core/media/movie/charts/main.py
  4. 2
      couchpotato/core/media/movie/searcher.py
  5. 1
      couchpotato/core/plugins/manage.py

8
couchpotato/core/media/_base/media/main.py

@ -1,5 +1,4 @@
from datetime import timedelta
from operator import itemgetter
import time
import traceback
from string import ascii_lowercase
@ -313,7 +312,8 @@ class MediaPlugin(MediaBase):
def addSingleListView(self):
for media_type in fireEvent('media.types', merge = True):
tempList = lambda media_type = media_type, *args, **kwargs : self.listView(type = media_type, **kwargs)
tempList = lambda *args, **kwargs : self.listView(type = media_type, **kwargs)
print tempList
addApiView('%s.list' % media_type, tempList, docs = {
'desc': 'List media',
'params': {
@ -395,7 +395,7 @@ class MediaPlugin(MediaBase):
def addSingleCharView(self):
for media_type in fireEvent('media.types', merge = True):
tempChar = lambda media_type = media_type, *args, **kwargs : self.charView(type = media_type, **kwargs)
tempChar = lambda *args, **kwargs : self.charView(type = media_type, **kwargs)
addApiView('%s.available_chars' % media_type, tempChar)
def delete(self, media_id, delete_from = None):
@ -464,7 +464,7 @@ class MediaPlugin(MediaBase):
def addSingleDeleteView(self):
for media_type in fireEvent('media.types', merge = True):
tempDelete = lambda media_type = media_type, *args, **kwargs : self.deleteView(type = media_type, **kwargs)
tempDelete = lambda *args, **kwargs : self.deleteView(type = media_type, **kwargs)
addApiView('%s.delete' % media_type, tempDelete, docs = {
'desc': 'Delete a ' + media_type + ' from the wanted list',
'params': {

1
couchpotato/core/media/movie/_base/main.py

@ -1,4 +1,3 @@
import os
import traceback
import time

1
couchpotato/core/media/movie/charts/main.py

@ -1,6 +1,5 @@
import time
from couchpotato import tryInt
from couchpotato.core.logger import CPLog
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent,fireEvent

2
couchpotato/core/media/movie/searcher.py

@ -277,7 +277,7 @@ class MovieSearcher(SearcherBase, MovieTypeBase):
# Contains lower quality string
contains_other = fireEvent('searcher.contains_other_quality', nzb, movie_year = media['info']['year'], preferred_quality = preferred_quality, single = True)
if contains_other != False:
if contains_other and isinstance(contains_other, dict):
log.info2('Wrong: %s, looking for %s, found %s', (nzb['name'], quality['label'], [x for x in contains_other] if contains_other else 'no quality'))
return False

1
couchpotato/core/plugins/manage.py

@ -190,6 +190,7 @@ class Manage(Plugin):
delete_me = {}
# noinspection PyTypeChecker
for folder in self.in_progress:
if self.in_progress[folder]['to_go'] <= 0:
delete_me[folder] = True

Loading…
Cancel
Save