Compare commits

..

2 Commits

Author SHA1 Message Date
Antoine Bertin 12443b5d78 Release 2.0.3 2016-06-10 20:38:23 +02:00
Antoine Bertin 1f246d8c03 Fix clearing cache in CLI 2016-06-10 20:37:52 +02:00
3 changed files with 11 additions and 2 deletions
+7
View File
@@ -1,6 +1,13 @@
Changelog
---------
2.0.3
^^^^^
**release date:** 2016-06-10
* Fix clearing cache in CLI
2.0.2
^^^^^
**release date:** 2016-06-06
+1 -1
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
__title__ = 'subliminal'
__version__ = '2.0.2'
__version__ = '2.0.3'
__short_version__ = '.'.join(__version__.split('.')[:2])
__author__ = 'Antoine Bertin'
__license__ = 'MIT'
+3 -1
View File
@@ -6,6 +6,7 @@ Subliminal uses `click <http://click.pocoo.org>`_ to provide a powerful :abbr:`C
from __future__ import division
from collections import defaultdict
from datetime import timedelta
import glob
import json
import logging
import os
@@ -263,7 +264,8 @@ def subliminal(ctx, addic7ed, legendastv, opensubtitles, subscenter, cache_dir,
def cache(ctx, clear_subliminal):
"""Cache management."""
if clear_subliminal:
os.remove(os.path.join(ctx.parent.params['cache_dir'], cache_file))
for file in glob.glob(os.path.join(ctx.parent.params['cache_dir'], cache_file) + '*'):
os.remove(file)
click.echo('Subliminal\'s cache cleared.')
else:
click.echo('Nothing done.')