Skip to content

Commit c9a7eb9

Browse files
DirtyRacer13374c0d3r
authored andcommitted
Minor changes
1 parent fcaa3b7 commit c9a7eb9

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

namer/fileutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def write_log_file(movie_file: Optional[Path], match_attempts: Optional[List[Com
4949
if movie_file is not None:
5050
log_name = movie_file.with_name(movie_file.stem + "_namer.log")
5151
logger.info("Writing log to {}", log_name)
52-
with open(log_name, "wt", encoding="utf-8") as log_file:
52+
with open(log_name, "wt", encoding="UTF-8") as log_file:
5353
if match_attempts is None or len(match_attempts) == 0:
5454
log_file.write("No search results returned.\n")
5555
else:

namer/moviexml.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def parse_movie_xml_file(xml_file: Path) -> LookedUpFileInfo:
1616
"""
1717
Parse an Emby/Jellyfin xml file and creates a LookedUpFileInfo from the data.
1818
"""
19-
content = xml_file.read_text(encoding="utf8")
19+
content = xml_file.read_text(encoding="UTF-8")
2020

21-
movie: Any = objectify.fromstring(bytes(content, encoding="utf8"), parser=None)
21+
movie: Any = objectify.fromstring(bytes(content, encoding="UTF-8"), parser=None)
2222
info = LookedUpFileInfo()
2323
info.name = str(movie.title)
2424
info.site = str(movie.studio[0])
@@ -109,7 +109,7 @@ def write_nfo(video_file: Path,
109109
"""
110110
if video_file is not None and new_metadata is not None and namer_config.write_nfo is True:
111111
target = video_file.parent / (video_file.stem + ".nfo")
112-
with open(target, "wt", encoding="utf-8") as nfo_file:
112+
with open(target, "wt", encoding="UTF-8") as nfo_file:
113113
towrite = write_movie_xml_file(new_metadata, namer_config, trailer, poster, background)
114114
nfo_file.write(towrite)
115115
set_permissions(target, namer_config)

namer/web/api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def get_web_api(config: NamerConfig, command_queue: Queue) -> Blueprint:
1818
Builds a blueprint for flask with passed in context, the NamerConfig.
1919
"""
2020
blueprint = Blueprint('api', __name__, static_url_path='/', static_folder='public', template_folder='templates')
21-
command_queue = command_queue
2221

2322
@blueprint.route('/api/v1/render', methods=['POST'])
2423
def render() -> Response:

namer/web/routes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ def get_web_routes(config: NamerConfig, command_queue: Queue) -> Blueprint:
1515
Builds a blueprint for flask with passed in context, the NamerConfig.
1616
"""
1717
blueprint = Blueprint('web', __name__, static_url_path='/', static_folder='public', template_folder='templates')
18-
command_queue = command_queue
1918

2019
"""
2120
@blueprint.route('/')
@@ -27,7 +26,7 @@ def index() -> str:
2726
data.append((url, rule.endpoint))
2827
2928
return render_template('pages/index.html', links=data)
30-
"""
29+
"""
3130

3231
@blueprint.route('/')
3332
def index() -> Response:

0 commit comments

Comments
 (0)