abbi031892 / periscope

Automatically exported from code.google.com/p/periscope
0 stars 0 forks source link

filename Teams are not splitted correctly if plugin uses guessFileData def from SubtitleDatabase.py #128

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Enable subtitulos.es (may fail with others plugins)
2. Scan for file name "Desperate Housewives S08E14 720p WEB-DL DD5.1 
H.264-NFHD.mkv"
3. Enable DEBUG

DEBUG:plugins.Subtitulos:Team from file: set([u'720p web-dl dd5', u'1 h', 
u'264-nfhd'])
Problem is the program don't use spaces nor "-" to split the teams

How to solve this :

Replace line 155 in SubtitleDatabase.py :
            teams = teams.split('.')
by :

            teams = teams.replace(" ", ".").replace("-", ".").split('.')

Same for lines 162 and 168

Original issue reported on code.google.com by bobby.dj...@gmail.com on 5 Mar 2012 at 11:11

GoogleCodeExporter commented 8 years ago
After this mod, some teams list results are DD5, 1, H, 264, 720p
In order to avoid a wrong sub download i added this lines :

            if "h264" in teams :
                teams.remove('h264')
            if "h" in teams :
                teams.remove('h')
            if "x" in teams :
                teams.remove('x')
            if "264" in teams :
                teams.remove('264')
            if "dd5" in teams :
                teams.remove('dd5')
            if "1" in teams :
                teams.remove('1')
            if "720p" in teams :
                teams.remove('720p')

After the 3 lines modified above.

I'm sure there is a better way to do this, but i'm no coder, just doing some 
reverse engineering!

Original comment by bobby.dj...@gmail.com on 5 Mar 2012 at 11:24