-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
3,049 additions
and
937 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# coding=utf-8 | ||
|
||
from time import time | ||
|
||
from autosubliminal.parsers.guessit import default_api | ||
|
||
|
||
def guessit(string, options=None): | ||
""" | ||
Retrieves all matches from string as a dict | ||
:param string: the filename or release name | ||
:type string: str | ||
:param options: | ||
:type options: str|dict | ||
:return: | ||
:rtype: | ||
""" | ||
start_time = time() | ||
custom_options = dict(options) if options else dict() | ||
result = default_api.guessit(string, options=custom_options) | ||
result['parsing_time'] = time() - start_time | ||
|
||
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# coding=utf-8 | ||
|
||
from guessit.api import default_api | ||
|
||
from autosubliminal.parsers.guessit.rules import rules | ||
|
||
# Add our custom rules to the default guessit api | ||
default_api.configure({}) | ||
default_api.rebulk.rebulk(rules()) |
Oops, something went wrong.