Closed abjdiat closed 5 years ago
@abjdiat this did the trick for me:
find . -type f -name '*.mkv' -exec osd {} \;
p.s. osd is a symlink to OpenSubtitlesDownload.py
@panosl Hi!
Noob here, how do I use that? Should I replace some code in the script with that? Sorry I really have no experience scripting, but i really need this function in the script.
p.s. I also have other video extensions, not just .mkv
Thanks!
@armyanov
Examples to copy/paste into terminal (,possibly amend) and run:
find video -type f \( -name '*.mkv' -o -name '*.mp4' -o -name '*.avi' \) -exec OpenSubtitlesDownload.py {} \;
Change 'video' to the name/path of your video-dir, and add extra options if needed after OpenSubtitlesDownload.py, e.g. for other than english subs('-l dan' for danish subs for example).
You could also instead of 'find' use e.g.:
shopt s globstar extglob; OpenSubtitlesDownload.py video/**/*(*.mkv|*.mp4|*.avi)
OpenSubtitlesDownload also checks mimetypes by itself and excludes non-video files, so it's also possible to just:
shopt s globstar; OpenSubtitlesDownload.py video/**/*
Ok guys looks like that feature will become the v4.0. I won't be starting right away but it's probably the most requested feature so, I'll do it :)
See #40 :D
Merged on master, thanks to @thiagoalz ! We can finally close this one :+1:
thank you for the amazing software. I would like to ask for a new feature . the script takes ( file name/s ) as input in the same directory. i know it is possible for the feature im requesting to be done with some bash scripting but if it built-in would much easier to use. is it possible to add -d (directory path ) argument to the options so the script will look for movies within the directory and sub-directories . i think the feature will be very handy for any one with big movies collection with lots of folders and sub-folders.
Thank you