From 73ae545949de9032d6198a07c1f972bfd0d9650a Mon Sep 17 00:00:00 2001 From: Kepoor Hampond Date: Wed, 9 Aug 2017 01:11:58 -0700 Subject: [PATCH] test --- irs/__init__.py | 2 +- irs/ripper.py | 4 ++-- irs/utils.py | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/irs/__init__.py b/irs/__init__.py index 2956eee..d97e88c 100644 --- a/irs/__init__.py +++ b/irs/__init__.py @@ -18,4 +18,4 @@ ffmpeg binaries.") exit(1) else: from .ripper import Ripper - Ripper # PyLinter reasons + Ripper diff --git a/irs/ripper.py b/irs/ripper.py index 14417a9..8dd73fa 100644 --- a/irs/ripper.py +++ b/irs/ripper.py @@ -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": diff --git a/irs/utils.py b/irs/utils.py index f1c7277..ff13995 100644 --- a/irs/utils.py +++ b/irs/utils.py @@ -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: