From 244e8ad71c4b4c80bc4cf0127e615c3f81e51bb5 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Mon, 26 Oct 2020 09:09:09 -0400 Subject: [PATCH] unicodedata removal. py3 str used to normalize titles --- fun/playlist_manager.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fun/playlist_manager.py b/fun/playlist_manager.py index 456f624..6f57b44 100644 --- a/fun/playlist_manager.py +++ b/fun/playlist_manager.py @@ -116,7 +116,6 @@ import requests import argparse import operator import datetime -import unicodedata from collections import Counter from plexapi.server import PlexServer, CONFIG @@ -568,13 +567,11 @@ def show_playlist(playlist_title, playlist_keys): plex_obj = plex.fetchItem(key) if plex_obj.type == 'show': for episode in plex_obj.episodes(): - title = u"{}".format(episode._prettyfilename()) - title = unicodedata.normalize('NFKD', title).encode('ascii', 'ignore').translate(None, "'") + title = str("{}".format(episode._prettyfilename())) + playlist_list.append(title) + else: + title = str("{} ({})".format(plex_obj._prettyfilename(), plex_obj.year)) playlist_list.append(title) - else: - title = u"{} ({})".format(plex_obj._prettyfilename(), plex_obj.year) - title = unicodedata.normalize('NFKD', title).encode('ascii', 'ignore').translate(None, "'") - playlist_list.append(title) logger.info(u"Contents of Playlist {title}:\n{playlist}".format( title=playlist_title,