Or
Simply use replace. This is what Ive added to mine.
def cleanFile(text):
cutlist = ['x264','720p','1080p','1080i','PAL','GERMAN','ENGLiSH','WS','DVDRiP','UNRATED','RETAIL','Web-DL','DL','LD','MiC','MD','DVDR','BDRiP','BLURAY','DTS','UNCUT','ANiME',
'AC3MD','AC3','AC3D','TS','DVDSCR','COMPLETE','INTERNAL','DTSD','XViD','DIVX','DUBBED','LINE.DUBBED','DD51','DVDR9','DVDR5','h264','AVC',
'WEBHDTVRiP','WEBHDRiP','WEBRiP','WEBHDTV','WebHD','HDTVRiP','HDRiP','HDTV','ITUNESHD','REPACK','SYNC']
text = text.replace('.wmv','').replace('.flv','').replace('.ts','').replace('.m2ts','').replace('.mkv','').replace('.avi','').replace('.mpeg','').replace('.mpg','').replace('.iso','')
for word in cutlist:
text = re.sub('(\_|\-|\.|\+)'+word+'(\_|\-|\.|\+)','+', text, flags=re.I)
text = text.replace('.',' ').replace('-',' ').replace('_',' ').replace('+','')
return text
def cleanEnd(text):
text = text.replace('.wmv','').replace('.flv','').replace('.ts','').replace('.m2ts','').replace('.mkv','').replace('.avi','').replace('.mpeg','').replace('.mpg','').replace('.iso','').replace('.mp4','')
return text
Display More
That's for use in Streaming plugins
For Sat channels from the Yellow button you need to add an else to the class tmdbscreen
else:
self.text = service.replace("Cine:","")
The above example will remove the word Cine from the EPG for the Spanish Digital + Channels.
Without removing words such as Cine ( and many others too ) TMDB will always return no results. It a pain, but I think Ive now managed to get it to work on every Sat channel available. It just takes time and patience.
I might when I get time add a def to enable it to read a text file located in the plugin folder itself, and then its a simple matter of just adding any word or character to this text file and it will be ignored.