Open Insprion80 opened 1 year ago
I was unable to remove the seasons.
Even the help of my friend KiddaC didn't give me a chance
searchtitle = title.lower()
# if title ends in "the", move "the" to the beginning
if searchtitle.endswith("the"):
searchtitle.rsplit(" ", 1)[0]
searchtitle = searchtitle.rsplit(" ", 1)[0]
searchtitle = "the " + str(searchtitle)
# remove xx: at start
searchtitle = re.sub(r'^\w{2}:', '', searchtitle)
# remove xx|xx at start
searchtitle = re.sub(r'^\w{2}\|\w{2}\s', '', searchtitle)
# remove || content at start
searchtitle = re.sub(r'^\|[\w\-\|]*\|', '', searchtitle)
# remove () content
n = 1 # run at least once
while n:
searchtitle, n = re.subn(r'\([^\(\)]*\)', '', searchtitle)
# remove [] content
n = 1 # run at least once
while n:
searchtitle, n = re.subn(r'\[[^\[\]]*\]', '', searchtitle)
bad_chars = ["1080p-dual-lat-cinecalidad.mx", "1080p-lat-cinecalidad.mx", "1080p-dual-lat-cine-calidad.com-1", "1080p-dual-lat-cine-calidad.com", "1080p-lat-cine-calidad.com-1", "1080p-lat-cine-calidad.com",
"1080p.dual.lat.cine-calidad.com",
"sd", "hd", "fhd", "uhd", "4k", "vod", "1080p", "720p", "blueray", "x264", "aac", "ozlem", "hindi", "hdrip", "imdb", "top250", "multi-audio",
"multi-subs", "multi-sub", "multisub",
"ex-yu:",
"-ae-", "-al-", "-ar-", "-at-", "-ba-", "-be-", "-bg-", "-br-", "-cg-", "-ch-", "-cz-", "-da-", "-de-", "-dk-", "-ee-", "-en-", "-es-", "-ex-yu-", "-fi-", "-fr-", "-gr-", "-hr-", "-hu-", "-in-", "-ir-", "-it-", "-lt-", "-mk-",
"-mx-", "-nl-", "-no-", "-pl-", "-pt-", "-ro-", "-rs-", "-ru-", "-se-", "-si-", "-sk-", "-tr-", "-uk-", "-us-", "-yu-",
"|ae|", "|al|", "|ar|", "|at|", "|ba|", "|be|", "|bg|", "|br|", "|cg|", "|ch|", "|cz|", "|da|", "|de|", "|dk|", "|ee|", "|en|", "|es|", "|eu|", "|ex-yu|", "|fi|", "|fr|", "|gr|", "|hr|", "|hu|", "|in|", "|ir|", "|it|", "|lt|", "|mk|",
"|mx|", "|nl|", "|no|", "|pl|", "|pt|", "|ro|", "|rs|", "|ru|", "|se|", "|si|", "|sk|", "|tr|", "|uk|", "|us|", "|yu|",
"(", ")", "[", "]", "u-", "3d", "'", "#", "/"]
for j in range(1900, 2025):
bad_chars.append(str(j))
for i in bad_chars:
searchtitle = searchtitle.replace(i, "")
bad_suffix = [" de", " al", " nl", " pt", " pl", " ru", " ar", " ro", " gr", " fi", " no", " rs", " ba", " si", " mk", " ex-yu", " hr", " yu", " fr", " da", " es", " sw", " swe", " tr", " en", " uk", "eu"]
for i in bad_suffix:
if searchtitle.endswith(i):
suffixlength = len(i)
searchtitle = searchtitle[:-suffixlength]
searchtitle = searchtitle.replace("multi:", "").replace(".", " ").replace("_", " ").replace(" ", " ").replace("'", "")
searchtitle = searchtitle.strip("-")
searchtitle = searchtitle.strip()
searchtitle = quote(searchtitle, safe="")
This system is leaner, the xtravent plugins system is better, aims to download everything in the background, maybe a little heavy on memory. Unfortunately, you can't have everything. Maybe if you have ideas you can share them with me and treasure them. Thank you
I think the root cause of the problem is Regex design itself, it is not cover all non standard character comes with epg data, such as (), -,!,? as well as strange order of EPG data.
Below is the last working regex I had tested and working good so far
REGEX = re.compile(
r'([([]).?([)]])|' # Match text within brackets or parentheses
r'(: odc.\d+)|' # Match ": odc.
I was trying to add some additions to cover the rest but unfortunately something wrong continue to happen. May be you have better chance than me, I am not a programmer, I am just trying to tune it by trials
I think we should add option like this to the current regex but may be it is not match with enigma2
r'[a-zA-Z0-9\s()[].,:!"*+-]+|([a-zA-Z0-9]+\s:\s[a-zA-Z]+)',
This is example but not working
REGEX = re.compile( r'[([][^)]][)]]|: odc.\d+|\d+: odc.\d+|\d+ odc.\d+|:| -(.?)\w|,|!|/.||\s\d++|\d++|\s*\d{4}\Z|[([][^)]][)]]|\"|:|Премьера.\s|(х|Х|м|М|т|Т|д|Д)/[фс]\s|\s(с|С)(езон|ерия|-н|-я)\s.+\d{1,3}(-я|-й|\sс-н).|\d+: odc.\s?\d+|\d+\s(odc.\s?\d+)|\d+\s-\s\d+|[A-Za-z]+: Episode \d+|[A-Za-z]+\s[A-Z][a-z]\s(\w+.\s\d+)|[A-Z][a-z]\s[A-Z][a-z]\s[1-9]\s(odc.\s\d+)|[A-Z][a-z]\s[A-Z][a-z]:\s[A-Z][a-z]*\s\d+\s-\s\d+|[A-Z]+\s[A-Z]+|[A-Z][a-z]+' re.DOTALL)
Please give it a look and may be you can tune it better than me.
Regards
hello try if work now
Merry Christmas to you and your family with my best wishes for happy holidays,
I tried the updated version of ozeta skin which work perfect from skin side but for zposterx still the problem persist, I used two images openatv 7.4 Devel and egami 10.4 r15 for test.
Events name with (), -, : facing same issue no posters found. As per images below,
However, this version of zposterx is very fast in search and posters downland, for the first time I have the following it downloading posters in background without the needs to zap to each service.
Actually, it work in amazing way especially on level of speed, poster accuracy and integrity.
However, there are some notices I would like to share it with you. I attached the posterx version to check if it the most updated one or not.
In the image above, you can see the first two posters from the left side, represent same event but different seasons, adding season no. In that way cause problem in poster download process. Moreover ; presence of ( ) beside the event name cause failure in poster download, another example below
Also in the above example, change letters case (upper or lower) make incorrect poster selection,
I am not sure, which criteria used to pickup a spacific poster for a specific event, but I think you can tune it to eliminate such conflicts.
Finally again even view screen not showing when you call it by info button, I am not sure if this a problem in my side or you already plan to fix it.
Thanks a lot for your efforts. ![Uploading screenshot_AMC_20231102_094023.jpg…]()
Regards