mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Fix typos
This commit is contained in:
parent
86aa21a8bb
commit
4921458782
1 changed files with 4 additions and 4 deletions
|
@ -570,7 +570,7 @@ def uploadToImgur(imgPath, imgTitle=''):
|
||||||
def cache_image(url, image=None):
|
def cache_image(url, image=None):
|
||||||
"""
|
"""
|
||||||
Saves an image to the cache directory.
|
Saves an image to the cache directory.
|
||||||
If no image is provided, tries to return the image from the cach directory.
|
If no image is provided, tries to return the image from the cache directory.
|
||||||
"""
|
"""
|
||||||
from plexpy import logger
|
from plexpy import logger
|
||||||
|
|
||||||
|
@ -580,11 +580,11 @@ def cache_image(url, image=None):
|
||||||
logger.debug(u"PlexPy Helpers :: Creating image cache directory at %s" % imgdir)
|
logger.debug(u"PlexPy Helpers :: Creating image cache directory at %s" % imgdir)
|
||||||
os.makedirs(imgdir)
|
os.makedirs(imgdir)
|
||||||
|
|
||||||
# Create a hash of the path to use as filename
|
# Create a hash of the url to use as the filename
|
||||||
imghash = hashlib.md5(url).hexdigest()
|
imghash = hashlib.md5(url).hexdigest()
|
||||||
imagefile = os.path.join(imgdir, imghash)
|
imagefile = os.path.join(imgdir, imghash)
|
||||||
|
|
||||||
# If an image was provided, save it to the cache directory
|
# If an image is provided, save it to the cache directory
|
||||||
if image:
|
if image:
|
||||||
try:
|
try:
|
||||||
with open(imagefile, 'wb') as cache_file:
|
with open(imagefile, 'wb') as cache_file:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue