To a proper random string when no IMDB is found

This commit is contained in:
Ruud
2012-05-19 01:01:09 +02:00
parent 082af9a307
commit 0b034eb0fa
2 changed files with 10 additions and 2 deletions
+5
View File
@@ -2,7 +2,9 @@ from couchpotato.core.logger import CPLog
import hashlib
import os.path
import platform
import random
import re
import string
log = CPLog(__name__)
@@ -117,3 +119,6 @@ def getTitle(library_dict):
log.error('Could not get title for library item: %s' % library_dict)
return None
def randomString(size = 8, chars = string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for x in range(size))