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)
|
exit(1)
|
||||||
else:
|
else:
|
||||||
from .ripper import Ripper
|
from .ripper import Ripper
|
||||||
Ripper # PyLinter reasons
|
Ripper
|
||||||
|
|
|
@ -259,8 +259,8 @@ with init, or in method arguments.")
|
||||||
YdlUtils.clear_line()
|
YdlUtils.clear_line()
|
||||||
|
|
||||||
print(self.args["hook-text"].get("list")
|
print(self.args["hook-text"].get("list")
|
||||||
.format(type.title(), the_list["name"],
|
.format(type.title(), the_list["name"].encode("utf-8"),
|
||||||
the_list["artists"][0]["name"]))
|
the_list["artists"][0]["name"].encode("utf-8")))
|
||||||
|
|
||||||
compilation = ""
|
compilation = ""
|
||||||
if type == "album":
|
if type == "album":
|
||||||
|
|
|
@ -95,9 +95,11 @@ class ObjManip: # Object Manipulation
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def blank(string, downcase=True):
|
def blank(string, downcase=True, remove_and=True):
|
||||||
if downcase:
|
if downcase:
|
||||||
string = string.lower()
|
string = string.lower()
|
||||||
|
if remove_and:
|
||||||
|
string = string.replace("and", "")
|
||||||
import re
|
import re
|
||||||
regex = re.compile('[^a-zA-Z0-9\ ]')
|
regex = re.compile('[^a-zA-Z0-9\ ]')
|
||||||
if sys.version_info == 2:
|
if sys.version_info == 2:
|
||||||
|
|
Loading…
Reference in a new issue