.cache files moved from system tmp dir next to it's source
This commit is contained in:
parent
678a7f7503
commit
f7313075db
1 changed files with 4 additions and 2 deletions
6
meta.py
6
meta.py
|
@ -9,7 +9,6 @@ import subprocess
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import requests
|
|
||||||
import keys
|
import keys
|
||||||
import settings
|
import settings
|
||||||
|
|
||||||
|
@ -22,6 +21,7 @@ EXIFDATE = re.compile(
|
||||||
class CachedMeta(dict):
|
class CachedMeta(dict):
|
||||||
def __init__(self, fpath):
|
def __init__(self, fpath):
|
||||||
self.fpath = fpath
|
self.fpath = fpath
|
||||||
|
self.suffix = "cache"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cfile(self):
|
def cfile(self):
|
||||||
|
@ -30,7 +30,8 @@ class CachedMeta(dict):
|
||||||
fname = os.path.basename(os.path.dirname(self.fpath))
|
fname = os.path.basename(os.path.dirname(self.fpath))
|
||||||
|
|
||||||
return os.path.join(
|
return os.path.join(
|
||||||
settings.tmpdir, "%s.%s.json" % (fname, self.__class__.__name__)
|
os.path.dirname(self.fpath),
|
||||||
|
"%s.%s.%s" % (fname, self.__class__.__name__, self.suffix),
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -66,6 +67,7 @@ class CachedMeta(dict):
|
||||||
class Exif(CachedMeta):
|
class Exif(CachedMeta):
|
||||||
def __init__(self, fpath):
|
def __init__(self, fpath):
|
||||||
self.fpath = fpath
|
self.fpath = fpath
|
||||||
|
self.suffix = "json.cache"
|
||||||
self._read()
|
self._read()
|
||||||
|
|
||||||
def _call_tool(self):
|
def _call_tool(self):
|
||||||
|
|
Loading…
Reference in a new issue