Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

QuickSubs Function - Subtitle Finder for opensubtitles.org


  • Please log in to reply
6 replies to this topic
Delusion
  • Members
  • 272 posts
  • Last active: Jul 13 2014 09:04 PM
  • Joined: 16 Jul 2008
QuickSubs v1.1 by Alex Sotirakis (Delusion)
Fast and Small Subtitle Finder for opensubtitles.org

Usage : Simply select a video file on windows explorer and hit Ctrl+Shift+S

#NoEnv
#SingleInstance Force

~^+s::QuickSubs()

QuickSubs($SubtitleLanguage = "all") {
  ;QuickSubs v1.1 by Alex Sotirakis (Delusion)
  ;Created on : 21/04/2012 Last Modified : 23/04/2012
  $ClipBack := ClipboardAll, Clipboard := ""
  Send ^c
  ClipWait 2
  StringSplit $VideoFile, Clipboard, `n, `r
  IF ($VideoFile0 != 1) {
    TrayTip, QuickSubs, Error : Incorrect number of files passed. Please select one video file!, 5, 2
    RETURN
  } ELSE SplitPath, $VideoFile1, $VideoFile1Name, , $VideoFile1Ext, ,
  IF InStr(",avi,mkv,mp4,mpg,wmv,divx,mov,mpeg,wmp,flv,vob,", "," $VideoFile1Ext ",") {
    FileGetSize, $VideoSize, % $VideoFile1
    Run % "http://www.opensubtitles.org/en/search/sublanguageid-" . $SubtitleLanguage . "/moviebytesize-" . $VideoSize,, UseErrorLevel
    TrayTip, QuickSubs, % ErrorLevel ? "Error : There was a problem with the subtitle search!" : "Searching [" . $SubtitleLanguage . "] subtitles for the video file : [" . $VideoFile1Name . "]", 5, % ErrorLevel ? 3 : 1
  } ELSE {
    TrayTip, QuickSubs, Error : You have passed incorrect file types. Please select one video file!, 5, 2
    RETURN
  }
  Clipboard := $ClipBack 
}

/*
Supported ISO639 Language Codes

all All Languages
alb	Albanian
ara	Arabic
arm	Armenian
baq	Basque 
ben	Bengali
bos	Bosnian
bre	Breton
bul	Bulgarian
cat	Catalan
chi	Chinese
cze	Czech
dan	Danish
dut	Dutch
eng	English
epo	Esperanto
est	Estonian
fin	Finnish
fre	French
geo	Georgian
ger	German
glg	Galician
ell	Greek
heb	Hebrew
hin Hindi
hrv	Croatian
hun	Hungarian
ice	Icelandic
ind	Indonesian
ita	Italian
jpn	Japanese
kaz	Kazakh
khm	Khmer
kor	Korean
lav	Latvian
lit	Lithuanian
ltz	Luxembourgish
mac	Macedonian
may Malay
nor	Norwegian
oci	Occitan
per	Persian
pol	Polish
por	Portuguese
rus	Russian
scc	Serbian
sin	Sinhalese
slo	Slovak
slv	Slovenian
spa	Spanish
swa	Swahili
swe	Swedish
syr	Syriac
tgl	Tagalog
tha	Thai
tur	Turkish
ukr	Ukrainian
urd	Urdu
vie	Vietnamese
rum	Romanian
pob	Brazilian
*/


Nothing special.But i use it alot lately and i thought i will share it.Maybe someone will find it usefull :D
QuickSubs | Popcorn Movie Catalog
All my scripts are just in AutoHotkey v1.0.48.05

Cragaha
  • Members
  • 265 posts
  • Last active: Jan 04 2016 02:24 AM
  • Joined: 19 Nov 2010
Thanks for the idea Delusion, here is my version, simple and short..

FindSub(Language = "All") {
	SavedClip:= Clipboard, Clipboard:= ""
	Send ^c
	ClipWait, 4
	SplitPath, Clipboard, OutFileName, , Ext
	If !Instr(",avi,mkv,mp4,mpg,wmv,divx,mov,mpeg,wmp,flv,vob,", "," Ext ",")
		Return
	FileGetSize, Size, %Clipboard%
	Run % "http://www.opensubtitles.org/en/search/sublanguageid-" Language "/moviebytesize-" Size,, UseErrorLevel
	TrayTip, OpenSubtitles, % ErrorLevel ? "Error running search link!" : "`nLanguage:`t" Language "`nFile:`t`t" OutFileName, 5, % ErrorLevel ? 3 : 1
	Clipboard := SavedClip
	}


Delusion
  • Members
  • 272 posts
  • Last active: Jul 13 2014 09:04 PM
  • Joined: 16 Jul 2008
thanks for your idea! i striped down my code a little also using some things from your version
QuickSubs | Popcorn Movie Catalog
All my scripts are just in AutoHotkey v1.0.48.05

  • Guests
  • Last active:
  • Joined: --
i was using opensubtitles already to search for subtitles manually so this is very usefull for me and saves alot of time
thanks alot :mrgreen:

  • Guests
  • Last active:
  • Joined: --

Thanks for the idea Delusion, here is my version, simple and short..

FindSub(Language = "All") {
	SavedClip:= Clipboard, Clipboard:= ""
	Send ^c
	ClipWait, 4
	SplitPath, Clipboard, OutFileName, , Ext
	If !Instr(",avi,mkv,mp4,mpg,wmv,divx,mov,mpeg,wmp,flv,vob,", "," Ext ",")
		Return
	FileGetSize, Size, %Clipboard%
	Run % "http://www.opensubtitles.org/en/search/sublanguageid-" Language "/moviebytesize-" Size,, UseErrorLevel
	TrayTip, OpenSubtitles, % ErrorLevel ? "Error running search link!" : "`nLanguage:`t" Language "`nFile:`t`t" OutFileName, 5, % ErrorLevel ? 3 : 1
	Clipboard := SavedClip
	}


hello. i'm not an intelligent man. how would you run this script? whats the hotkey/trigger?

  • Guests
  • Last active:
  • Joined: --
FindSub("DE") ; DE = German

  • Guests
  • Last active:
  • Joined: --

QuickSubs v1.1 by Alex Sotirakis (Delusion)
Fast and Small Subtitle Finder for opensubtitles.org

Usage : Simply select a video file on windows explorer and hit Ctrl+Shift+S

#NoEnv
#SingleInstance Force

~^+s::QuickSubs()

QuickSubs($SubtitleLanguage = "all") {
  ;QuickSubs v1.1 by Alex Sotirakis (Delusion)
  ;Created on : 21/04/2012 Last Modified : 23/04/2012
  $ClipBack := ClipboardAll, Clipboard := ""
  Send ^c
  ClipWait 2
  StringSplit $VideoFile, Clipboard, `n, `r
  IF ($VideoFile0 != 1) {
    TrayTip, QuickSubs, Error : Incorrect number of files passed. Please select one video file!, 5, 2
    RETURN
  } ELSE SplitPath, $VideoFile1, $VideoFile1Name, , $VideoFile1Ext, ,
  IF InStr(",avi,mkv,mp4,mpg,wmv,divx,mov,mpeg,wmp,flv,vob,", "," $VideoFile1Ext ",") {
    FileGetSize, $VideoSize, % $VideoFile1
    Run % "http://www.opensubtitles.org/en/search/sublanguageid-" . $SubtitleLanguage . "/moviebytesize-" . $VideoSize,, UseErrorLevel
    TrayTip, QuickSubs, % ErrorLevel ? "Error : There was a problem with the subtitle search!" : "Searching [" . $SubtitleLanguage . "] subtitles for the video file : [" . $VideoFile1Name . "]", 5, % ErrorLevel ? 3 : 1
  } ELSE {
    TrayTip, QuickSubs, Error : You have passed incorrect file types. Please select one video file!, 5, 2
    RETURN
  }
  Clipboard := $ClipBack 
}

/*
Supported ISO639 Language Codes

all All Languages
alb	Albanian
ara	Arabic
arm	Armenian
baq	Basque 
ben	Bengali
bos	Bosnian
bre	Breton
bul	Bulgarian
cat	Catalan
chi	Chinese
cze	Czech
dan	Danish
dut	Dutch
eng	English
epo	Esperanto
est	Estonian
fin	Finnish
fre	French
geo	Georgian
ger	German
glg	Galician
ell	Greek
heb	Hebrew
hin Hindi
hrv	Croatian
hun	Hungarian
ice	Icelandic
ind	Indonesian
ita	Italian
jpn	Japanese
kaz	Kazakh
khm	Khmer
kor	Korean
lav	Latvian
lit	Lithuanian
ltz	Luxembourgish
mac	Macedonian
may Malay
nor	Norwegian
oci	Occitan
per	Persian
pol	Polish
por	Portuguese
rus	Russian
scc	Serbian
sin	Sinhalese
slo	Slovak
slv	Slovenian
spa	Spanish
swa	Swahili
swe	Swedish
syr	Syriac
tgl	Tagalog
tha	Thai
tur	Turkish
ukr	Ukrainian
urd	Urdu
vie	Vietnamese
rum	Romanian
pob	Brazilian
*/


Nothing special.But i use it alot lately and i thought i will share it.Maybe someone will find it usefull :D


That is just awesome :D I modified it a bit to use my favorite webpage for it, but I'm noob at this so I wanted to know if there's any way to make it ignore (while pasting in the search) dots (so from 21.jump.street.avi it would make the search go 21%20jump%20street in the link). Is it possible to be done in the search? I really like this script and I'll find it so useful if this is possible to be done :D I'd like some other changes aswell, but this is pretty much the main one, because my favorite webpage doesn't recognize titles when the search is Movie.Name.2011.BRRip.HC.ENG.XviD.avi. And is it possible to make it ignore few other words like BRRip XViD etc? :D Thanks in advance.