Skip to content

Commit

Permalink
Remove possible path separators from patterns
Browse files Browse the repository at this point in the history
Close #264
  • Loading branch information
Toilal committed Jan 30, 2016
1 parent 3f7284a commit 27bc2b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions guessit/rules/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"""
Common module
"""
seps = r' [](){}+*|=§-_~#/\.,;:' # list of tags/words separators
import re

seps = r' [](){}+*|=-_~#/\\.,;:' # list of tags/words separators
seps_no_fs = seps.replace('/', '').replace('\\', '')

title_seps = r'-+/\|' # separators for title

dash = (r'-', r'[\W_]') # abbreviation used by many rebulk objects.
alt_dash = (r'@', r'[\W_]') # abbreviation used by many rebulk objects.
dash = (r'-', r'['+re.escape(seps_no_fs)+']') # abbreviation used by many rebulk objects.
alt_dash = (r'@', r'['+re.escape(seps_no_fs)+']') # abbreviation used by many rebulk objects.
6 changes: 6 additions & 0 deletions guessit/test/rules/episodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,9 @@
? A very special episode
: options: -t episode
episode_details: Special

? 12 Monkeys\Season 01\Episode 05\12 Monkeys - S01E05 - The Night Room.mkv
: container: mkv
title: 12 Monkeys
episode: 5
season: 1

0 comments on commit 27bc2b3

Please sign in to comment.