mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-24 23:09:16 +01:00
Merge pull request #177 from deviantfero/master
Use separate versioning for cache files and pywal.
This commit is contained in:
commit
59b42221c1
@ -9,7 +9,7 @@
|
||||
Created by Dylan Araps.
|
||||
"""
|
||||
|
||||
from .settings import __version__
|
||||
from .settings import __version__, __cache_version__
|
||||
from . import colors
|
||||
from . import export
|
||||
from . import image
|
||||
@ -19,6 +19,7 @@ from . import wallpaper
|
||||
|
||||
__all__ = [
|
||||
"__version__",
|
||||
"__cache_version__",
|
||||
"colors",
|
||||
"export",
|
||||
"image",
|
||||
|
@ -7,7 +7,7 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from .settings import CACHE_DIR, COLOR_COUNT, __version__
|
||||
from .settings import CACHE_DIR, COLOR_COUNT, __cache_version__
|
||||
from . import util
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ def get(img, cache_dir=CACHE_DIR,
|
||||
color_type = "light" if light else "dark"
|
||||
cache_file = re.sub("[/|\\|.]", "_", img)
|
||||
cache_file = os.path.join(cache_dir, "schemes", "%s_%s_%s.json"
|
||||
% (cache_file, color_type, __version__))
|
||||
% (cache_file, color_type, __cache_version__))
|
||||
|
||||
if os.path.isfile(cache_file):
|
||||
colors = file(cache_file)
|
||||
|
@ -13,7 +13,8 @@ import os
|
||||
import platform
|
||||
|
||||
|
||||
__version__ = "1.3.0"
|
||||
__version__ = "1.3.1"
|
||||
__cache_version__ = "1.0.0"
|
||||
|
||||
|
||||
HOME = os.getenv("HOME", os.getenv("USERPROFILE"))
|
||||
|
Loading…
Reference in New Issue
Block a user