mirror of
https://github.com/cooperhammond/irs.git
synced 2024-11-08 18:38:33 +00:00
Merge pull request #37 from kepoorhampond/replace-and-and-&
removing & and 'and' in `ObjManip.blank` order to increase accuracy.
This commit is contained in:
commit
da28e7e9a1
|
@ -18,4 +18,4 @@ ffmpeg binaries.")
|
|||
exit(1)
|
||||
else:
|
||||
from .ripper import Ripper
|
||||
Ripper # PyLinter reasons
|
||||
Ripper
|
||||
|
|
|
@ -259,8 +259,8 @@ with init, or in method arguments.")
|
|||
YdlUtils.clear_line()
|
||||
|
||||
print(self.args["hook-text"].get("list")
|
||||
.format(type.title(), the_list["name"],
|
||||
the_list["artists"][0]["name"]))
|
||||
.format(type.title(), the_list["name"].encode("utf-8"),
|
||||
the_list["artists"][0]["name"].encode("utf-8")))
|
||||
|
||||
compilation = ""
|
||||
if type == "album":
|
||||
|
|
|
@ -95,9 +95,11 @@ class ObjManip: # Object Manipulation
|
|||
return True
|
||||
return False
|
||||
|
||||
def blank(string, downcase=True):
|
||||
def blank(string, downcase=True, remove_and=True):
|
||||
if downcase:
|
||||
string = string.lower()
|
||||
if remove_and:
|
||||
string = string.replace("and", "")
|
||||
import re
|
||||
regex = re.compile('[^a-zA-Z0-9\ ]')
|
||||
if sys.version_info == 2:
|
||||
|
|
Loading…
Reference in a new issue