ah, die optie had ik idd niet gezien. Dan wordt het al iets makkelijker, maar of het nuttig is (gezien het meestal nog niet aanwezig zijn van subs direct na airen)
Edit: ok, in dat geval kan je zoiets gebruiken :
- Maak de file 'sabToPeriscopeToSickBeard.py' aan in de sickbeard/autoProcessTV directory (in zelfde directory waar ook sabToSickBeard.py staat)
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
| #!/opt/bin/python2.6
import sys
sys.path.append("/volume1/@appstore/periscope/periscope")
import autoProcessTV
import periscope
import os
import glob
import logging
logging.basicConfig(level=logging.ERROR)
if len(sys.argv) < 2:
print "No folder supplied - is this being called from SABnzbd?"
sys.exit()
DOWNLOADPATH=sys.argv[1]
filelist=glob.glob(DOWNLOADPATH+"/*.avi")+glob.glob(DOWNLOADPATH+"/*.mkv")
for file in filelist:
print "Trying to find subs for %s" % (file)
subdl = periscope.Periscope()
subtitle = subdl.downloadSubtitle(file, ['nl','en']) # Dutch, and if not available try English
if subtitle :
print "----------------------------------------------------------------------------------------------------------------"
print "Found a sub in language %s, downloaded to %s" % ( subtitle['lang'], subtitle['subtitlepath'])
print "----------------------------------------------------------------------------------------------------------------"
print "Now handing over postprocessing to SickBeard.."
if len(sys.argv) >= 3:
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2])
else:
autoProcessTV.processEpisode(sys.argv[1]) |
(pad naar python aanpassen en pad achter sys.path.append aanpassen naar waar je periscope hebt geinstalleerd)
- (Indien unix, chmod +x sabToPeriscopeToSickBeard.py)
- Zorg ervoor dat je 'Move Associated Files' hebt aanstaan in SB onder Config -> Episode Downloads
- in SAB wijzig je in de user defined category (die je in SB hebt opgegeven) het script 'SabToSickBeard.py' naar 'SabToPeriscopeToSickBeard.py' (via dropdown menu)
That's it, voor alle nieuwe downloads zal nu worden geprobeerd de subs ervoor te downloaden.
Net even getest met een oude aflevering van Family Guy, en dat werkte prima :
SAB log:
=====
Trying to find subs for movie files in /volume1/video/Series/_SABDownload/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION
INFO:root:Searching subtitles for /volume1/video/Series/_SABDownload/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION.mkv with langs ['nl', 'en']
Found a sub from <plugins.BierDopje.BierDopje object at 0xf704dd2c> in language en, downloaded to /volume1/video/Series/_SABDownload/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION.srt
Now handing over postprocessing to SickBeard
<..>
Destination folder for this episode: /volume1/video/Series/Family Guy/
Copying file from /volume1/video/Series/_SABDownload/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION.mkv to /volume1/video/Series/Family Guy/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION.mkv
Copying file from /volume1/video/Series/_SABDownload/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION.srt to /volume1/video/Series/Family Guy/Family.Guy.S09E06.720p.HDTV.X264-DIMENSION.srt
=====
edit:
Unix script vervangen door Python script zodat het op alle platformen zou moeten werken
[
Voor 124% gewijzigd door
sverzijl op 14-01-2011 17:28
]