Closed dr-dialup closed 3 years ago
I'll try to take a look, but I'm no python expert, so feel free to suggest a solution if you find one.
My Python is near non-existent, but I was able to get it to render properly by referring to this StackOverflow page.
from datetime import datetime
from providers import get_anime, get_episodes
import certifi
from utils import requests_retry_session
import re
import base64
try:
# Python 2.6-2.7
from HTMLParser import HTMLParser
except ImportError:
# Python 3
from html.parser import HTMLParser
# Summary
if metadata.summary is None or force:
try:
h = HTMLParser()
cleanr = re.compile('<.*?>')
metadata.summary = re.sub(cleanr, '', h.unescape(anime['description']))
except:
Log.Error('Error: Show has no summary: ' + metadata.id)
Seems like if there are HTML escaped characters in a description on AniList, they don't get unescaped when put into the summary on Plex. Not sure why some descriptions have them to begin with, but it's kind of annoying.
Example:
From Aoi Hana AniList page
From Aoi Hana AniList edit page:
From Aoi Hana summary from Plex: