Changed "media.with_identifiers" to remove "No media found with..." messages

This commit is contained in:
Dean Gardiner
2014-08-07 14:05:05 +12:00
parent e2df3a4dfd
commit 81d4d9a4e2

View File

@@ -185,17 +185,15 @@ class MediaPlugin(MediaBase):
yield ms
def withIdentifiers(self, identifiers, with_doc = False):
db = get_db()
for x in identifiers:
try:
media = db.get('media', '%s-%s' % (x, identifiers[x]), with_doc = with_doc)
return media
return db.get('media', '%s-%s' % (x, identifiers[x]), with_doc = with_doc)
except:
pass
log.debug('No media found with identifiers: %s', identifiers)
return False
def list(self, types = None, status = None, release_status = None, status_or = False, limit_offset = None, with_tags = None, starts_with = None, search = None):