Skip to content

Commit

Permalink
Merge branch 'develop' into log
Browse files Browse the repository at this point in the history
  • Loading branch information
medariox committed Feb 28, 2016
2 parents 2abe25f + e1a1687 commit 6fdf299
Show file tree
Hide file tree
Showing 68 changed files with 818 additions and 569 deletions.
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ trim_trailing_whitespace = true
[*.{js,py}]
charset = utf-8

# 4 space indentation
# Python styling
[*.py]
indent_style = space
indent_size = 4

# Mako styling
[*.mako]
indent_style = space
indent_size = 4

# Indentation override for all JS under lib directory
[*.js]
indent_style = space
Expand Down
Binary file added gui/slick/images/network/ocs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui/slick/images/providers/french-adn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui/slick/images/providers/french-adn_com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui/slick/images/providers/torrentshack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gui/slick/images/providers/torrentshack_me.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions gui/slick/views/config_postProcessing.mako
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@
</tr>
<tr class="even">
<td class="align-right"><b>XEM Season Number:</b></td>
<td>%XMS</td>
<td>%XS</td>
<td>2</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0XMS</td>
<td>%0XS</td>
<td>02</td>
</tr>
<tr class="even">
Expand All @@ -336,12 +336,12 @@
</tr>
<tr class="even">
<td class="align-right"><b>XEM Episode Number:</b></td>
<td>%XME</td>
<td>%XE</td>
<td>3</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0XME</td>
<td>%0XE</td>
<td>03</td>
</tr>
<tr class="even">
Expand Down Expand Up @@ -919,12 +919,12 @@
</tr>
<tr class="even">
<td class="align-right"><b>XEM Season Number:</b></td>
<td>%XMS</td>
<td>%XS</td>
<td>2</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0XMS</td>
<td>%0XS</td>
<td>02</td>
</tr>
<tr class="even">
Expand All @@ -939,12 +939,12 @@
</tr>
<tr class="even">
<td class="align-right"><b>XEM Episode Number:</b></td>
<td>%XME</td>
<td>%XE</td>
<td>3</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>%0XME</td>
<td>%0XE</td>
<td>03</td>
</tr>
<tr class="even">
Expand Down
24 changes: 24 additions & 0 deletions gui/slick/views/config_search.mako
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,30 @@
</label>
</div>
<div class="field-pair">
<label>
<span class="component-title">Preferred words</span>
<span class="component-desc">
<input type="text" name="preferred_words" value="${sickbeard.PREFERRED_WORDS}" class="form-control input-sm input350" autocapitalize="off" />
<div class="clear-left">results with one or more word from this list will be chosen over others<br>
separate words with a comma, e.g. "word1,word2,word3"
</div>
</span>
</label>
</div>
<div class="field-pair">
<label>
<span class="component-title">Undesired words</span>
<span class="component-desc">
<input type="text" name="undesired_words" value="${sickbeard.UNDESIRED_WORDS}" class="form-control input-sm input350" autocapitalize="off" />
<div class="clear-left">results withouth words from this list will be preferred<br>
separate words with a comma, e.g. "word1,word2,word3"
</div>
</span>
</label>
</div>
<div class="field-pair">
<label>
<span class="component-title">Trackers list</span>
Expand Down
11 changes: 11 additions & 0 deletions gui/slick/views/config_subtitles.mako
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ $('#subtitles_dir').fileBrowser({ title: 'Select Subtitles Download Directory' }
</span>
</label>
</div>
<div class="field-pair">
<label>
<span class="component-title">Pre-Scripts</span>
<input type="text" name="subtitles_pre_scripts" value="${'|'.join(sickbeard.SUBTITLES_PRE_SCRIPTS)}" class="form-control input-sm input350" autocapitalize="off" />
</label>
<label>
<span class="component-desc">
<p>Show's media filename is passed as argument for the pre-scripts. Pre-scripts are executed before trying to find subtitles from usual sources.</p>
</span>
</label>
</div>
<div class="field-pair">
<label>
<span class="component-title">Extra Scripts</span>
Expand Down
9 changes: 5 additions & 4 deletions lib/subliminal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
import logging

from .core import (AsyncProviderPool, ProviderPool, check_video, download_best_subtitles, download_subtitles,
list_subtitles, provider_manager, refiner_manager, save_subtitles)
list_subtitles, save_subtitles, scan_video, scan_videos)
from .cache import region
from .exceptions import Error, ProviderError
from .extensions import provider_manager, refiner_manager
from .providers import Provider
from .score import compute_score
from .subtitle import Subtitle
from .video import SUBTITLE_EXTENSIONS, VIDEO_EXTENSIONS, Episode, Movie, Video, scan_video, scan_videos
from .score import compute_score, get_scores
from .subtitle import SUBTITLE_EXTENSIONS, Subtitle
from .video import VIDEO_EXTENSIONS, Episode, Movie, Video

logging.getLogger(__name__).addHandler(logging.NullHandler())
9 changes: 5 additions & 4 deletions lib/subliminal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
from dogpile.core import ReadWriteMutex
from six.moves import configparser

from subliminal import (AsyncProviderPool, Episode, Movie, Video, __version__, check_video, provider_manager, region,
save_subtitles, scan_video, scan_videos)
from subliminal.score import compute_score, get_scores
from subliminal import (AsyncProviderPool, Episode, Movie, Video, __version__, check_video, compute_score, get_scores,
provider_manager, region, save_subtitles, scan_video, scan_videos)

logger = logging.getLogger(__name__)

Expand All @@ -46,7 +45,7 @@ def release_write_lock(self):


class Config(object):
"""A :class:`~configparser.SafeConfigParser` wrapper to store configuration.
"""A :class:`~configparser.ConfigParser` wrapper to store configuration.
Interaction with the configuration is done with the properties.
Expand Down Expand Up @@ -229,6 +228,7 @@ def subliminal(ctx, addic7ed, legendastv, opensubtitles, subscenter, cache_dir,
# configure logging
if debug:
handler = logging.StreamHandler()
# TODO: change format to something nicer (use colorlogs + funcName)
handler.setFormatter(logging.Formatter(logging.BASIC_FORMAT))
logging.getLogger('subliminal').addHandler(handler)
logging.getLogger('subliminal').setLevel(logging.DEBUG)
Expand Down Expand Up @@ -378,6 +378,7 @@ def download(obj, provider, language, age, directory, encoding, single, force, h
hearing_impaired=hearing_impaired, only_one=single)
downloaded_subtitles[v] = subtitles

# TODO: warn about discarded providers
# save subtitles
total_subtitles = 0
for v, subtitles in downloaded_subtitles.items():
Expand Down
3 changes: 2 additions & 1 deletion lib/subliminal/converters/thesubdb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from babelfish import LanguageReverseConverter
from subliminal.exceptions import ConfigurationError

from ..exceptions import ConfigurationError


class TheSubDBConverter(LanguageReverseConverter):
Expand Down
Loading

0 comments on commit 6fdf299

Please sign in to comment.