Last active
October 8, 2023 11:28
-
-
Save selsta/ce3fb37e775dbd15c698 to your computer and use it in GitHub Desktop.
Revisions
-
selsta revised this gist
Jul 31, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ -- requires subliminal, version 1.0 or newer -- default keybinding: b -- add the following to your input.conf to change the default keybinding: -- keyname script_binding auto_load_subs -
selsta revised this gist
Jul 31, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ function load_sub_fn() mp.msg.info("Searching subtitle") mp.osd_message("Searching subtitle") t = {} t.args = {subl, "download", "-s", "-l", "en", mp.get_property("path")} res = utils.subprocess(t) if res.status == 0 then mp.commandv("rescan_external_files", "reselect") -
selsta revised this gist
Mar 19, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ -- default keybinding: b -- add the following to your input.conf to change the default keybinding: -- keyname script_binding auto_load_subs local utils = require 'mp.utils' function load_sub_fn() subl = "/usr/local/bin/subliminal" -- use 'which subliminal' to find the path mp.msg.info("Searching subtitle") mp.osd_message("Searching subtitle") t = {} t.args = {subl, "-q", "-s", "-l", "en", "--", mp.get_property("path")} res = utils.subprocess(t) -
selsta revised this gist
Mar 1, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,14 +5,17 @@ local utils = require 'mp.utils' function load_sub_fn() subl = "/usr/local/bin/subliminal" -- use 'which subliminal' to find the path mp.msg.info("Searching subtitle") mp.osd_message("Subtitle download succeeded") t = {} t.args = {subl, "-q", "-s", "-l", "en", "--", mp.get_property("path")} res = utils.subprocess(t) if res.status == 0 then mp.commandv("rescan_external_files", "reselect") mp.msg.info("Subtitle download succeeded") mp.osd_message("Subtitle download succeeded") else mp.msg.warn("Subtitle download failed") mp.osd_message("Subtitle download failed") end end -
selsta revised this gist
Feb 26, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ -- default keybinding: b -- add this to your input.conf to change the key to download the subtitles -- keyname script_binding auto_load_subs local utils = require 'mp.utils' function load_sub_fn() subl = "/usr/local/bin/subliminal" -- use 'which subliminal' to find the path mp.msg.info("Searching subtitle") t = {} t.args = {subl, "-q", "-s", "-l", "en", "--", mp.get_property("path")} -
selsta created this gist
Feb 26, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ -- add this to your input.conf to change the key to download the subtitles -- keyname script_binding auto_load_subs local utils = require 'mp.utils' function load_sub_fn() subl = "/usr/local/bin/subliminal" --use 'which subliminal' to find the path mp.msg.info("Searching subtitle") t = {} t.args = {subl, "-q", "-s", "-l", "en", "--", mp.get_property("path")} res = utils.subprocess(t) if res.status == 0 then mp.commandv("rescan_external_files", "reselect") mp.msg.info("Subtitle download succeeded") else mp.msg.warn("Subtitle download failed") end end mp.add_key_binding("b", "auto_load_subs", load_sub_fn)