abbi031892 / periscope

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

problem with addic7ed #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Using revision 150

What steps will reproduce the problem?
1. uncomment "from Addic7ed import Addic7ed" in plugins/__init__.py
2. Use this script to download subtitles :
#!/opt/bin/python2.6
# -*- coding: utf-8 -*-
import periscope
import sys
import logging
logging.basicConfig(level=logging.DEBUG)
subdl = periscope.Periscope("cache")
filepath = sys.argv[1]
subtitle = subdl.downloadSubtitle(filepath, ['en','fr']) # English, and if not 
available try French
if subtitle :
    print "Found a sub from %s in language %s, downloaded to %s" % ( subtitle['plugin'], subtitle['lang'], subtitle['subtitlepath'])

Problem is :

NAS> ./downloadSub.py /volume1/nas/SERIES/LOST/S06E12.LOST.VOST.720p.mkv
INFO:periscope:Searching subtitles for 
/volume1/nas/SERIES/LOST/S06E12.LOST.VOST.720p.mkv with langs ['en', 'fr']
INFO:periscope:Searching on Addic7ed
DEBUG:root:dl'ing http://www.addic7ed.com/serie//6/12/
INFO:root:Error : http://www.addic7ed.com/serie//6/12/ - HTTP Error 404: Not 
Found
INFO:plugins.SubtitleDatabase:Addic7ed writing 0 items to queue

Original issue reported on code.google.com by bobby.dj...@gmail.com on 12 Sep 2011 at 7:10

GoogleCodeExporter commented 8 years ago
Yes!!!
Looking at Addic7ed.py and doing some debugging, i found out what was going 
wrong.

Replace line 118 status = statusTD.find("strong").string.strip() by
status = statusTD.find("b").string.strip()

Addic7ed works again ;o)

Original comment by bobby.dj...@gmail.com on 15 Sep 2011 at 9:21

GoogleCodeExporter commented 8 years ago
I've made another modification to Addic7ed.py so that it finds matching 
subtitles.

Exemple : subteams returned from the web site being set(['web-dl', '720p', 
'pilaf']), and teams returned from the file being set([u'web', u'dl', u'h', 
u'720p', u'dd5', u'1', u'264', u'wounded', u'pilaf']), there is no match.

So i modified line 108 of Addic7ed.py
            subteams = self.listTeams([subteams], [".", "_", " "])
by
            subteams = self.listTeams([subteams], [".", "_", " ", "-"])

Now web site returns set(['web', 'dl', '720p', 'pilaf']); and it's a match, so 
i get the subtitles at last!

Original comment by bobby.dj...@gmail.com on 17 Sep 2011 at 4:39

GoogleCodeExporter commented 8 years ago

Original comment by patrick....@gmail.com on 21 Sep 2011 at 8:25

GoogleCodeExporter commented 8 years ago
I can't get the addic7ed to work. I made the three changes described but 
periscope won't find a subtitle for a file named 
doctor_who_2005.6x12.closing_time.720p_hdtv_x264-fov.mkv
even though there is a subtitle for this episode. Is it because of the 720p 
specification in the title (the subtitle is for a lower definition) ?

Original comment by j.cubizo...@gmail.com on 26 Sep 2011 at 2:12

GoogleCodeExporter commented 8 years ago
Please, put periscope on debug logging and post the logs

Original comment by bobby.dj...@gmail.com on 26 Sep 2011 at 3:58

GoogleCodeExporter commented 8 years ago
Here is the logfile.

Original comment by j.cubizo...@gmail.com on 26 Sep 2011 at 5:35

Attachments:

GoogleCodeExporter commented 8 years ago
Your issue is the serie naming.
You have to name it "doctor_who " and not "doctor_who_2005"

Indeed :
http://www.addic7ed.com/serie/doctor_who_2005/6/12/doctor_who_2005 is an 
invalid request (try it in your browser)

Now if you try http://www.addic7ed.com/serie/doctor_who/6/12/doctor_who, it 
works.

Original comment by bobby.dj...@gmail.com on 27 Sep 2011 at 10:44

GoogleCodeExporter commented 8 years ago
Thanks, it works.

Original comment by j.cubizo...@gmail.com on 28 Sep 2011 at 6:21

GoogleCodeExporter commented 8 years ago
The subtitles of certain SD versions match the HD version. Can you change the 
script so that it automatically also searches for the SD version if the search 
is for the HD version and zero matches are in the queue?. The release groups 
match as follows:

HD "CTU" version matches SD "2HD" version
HD "DIMENSION" version matches SD "LOL" version
HD "IMMERSE" version matches SD "FQM" version
HD "ORENJI" version matches SD "POW" version

It should be a matter of replacing these strings in the filename of the HD 
version.

Original comment by Peter.Ra...@gmail.com on 15 Oct 2011 at 10:42

GoogleCodeExporter commented 8 years ago
>HD "CTU" version matches SD "2HD" version
>HD "DIMENSION" version matches SD "LOL" version
>HD "IMMERSE" version matches SD "FQM" version
>HD "ORENJI" version matches SD "POW" version
>

is this always true?

Original comment by bobby.dj...@gmail.com on 15 Oct 2011 at 10:53

GoogleCodeExporter commented 8 years ago
It seems to be. I have downloaded subs manually for years (before I started 
using periscope) and this is how I found subs for my HD versions. Some time ago 
addic7ed even twittered that it worked like this.

Original comment by Peter.Ra...@gmail.com on 15 Oct 2011 at 7:59

GoogleCodeExporter commented 8 years ago
addic7ed seems broken again. It did not match 
American.Horror.Story.S01E01.720p.WEB.DL.DD5.1.H.264-CtrlHD for example.

Original comment by Peter.Ra...@gmail.com on 20 Oct 2011 at 5:20

GoogleCodeExporter commented 8 years ago
Looks like addic7ed works, but it will be very useful to add definitions like 
described in comments 9 and 10

Original comment by dima...@gmail.com on 30 Nov 2011 at 7:35

GoogleCodeExporter commented 8 years ago
I just modified with your changes bobby, and it did indeed make addic7ed work 
awesome!
I can btw confirm that the version matches in comment #9 is always true.

They have provided a list here:
https://www.facebook.com/notes/addic7ed-subtitles/same-subs/421757901435

Original comment by strit...@gmail.com on 13 Jul 2013 at 8:43

GoogleCodeExporter commented 8 years ago
Could you make a pull request on github ?

I'll add it if the change fixes it.

Original comment by patrick....@gmail.com on 13 Jul 2013 at 6:15

GoogleCodeExporter commented 8 years ago
Sorry, I don't know how to make a pull request.

I have another problem, with years.
Ex : file reign.2013.s01e01
Serie known on Addic7ed as "reign", not "reign 2013"
Periscope fails at finding the serie on addic7ed.
So i made some changes in order to delete 2013 from the serie name, but 
eventually this change will cause problems (on series where 2013 is in the 
name).

Best would be that periscope try on "serie 2013" then "serie".

Original comment by bobby.dj...@gmail.com on 22 Oct 2013 at 10:36

GoogleCodeExporter commented 8 years ago
Hi, just to let anyone know that i managed to report all the mods i made to 
Github and made pull requests for Patrick :)

I even put some code so that "same sub" translation is effective 
(https://www.facebook.com/notes/addic7ed-subtitles/same-subs/421757901435)

Original comment by bobby.dj...@gmail.com on 28 Oct 2013 at 8:17

GoogleCodeExporter commented 8 years ago
Cool. I won't be home for a few days so I won't be able to test this but I'll 
try to pull the changes and test this this week-end or the next.

Thanks

Original comment by patrick....@gmail.com on 28 Oct 2013 at 9:15