Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # InternalFieldSeperator_Backup
- IFS_BAK=$IFS
- # splitting with newline
- IFS="
- "
- for line in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do
- # download subtitle for selected line
- subliminal download -l en $line
- basefile="${line%.*}"
- # renaming because vlc player loads subtitle automatically, if it find file_name.mp4 and file_name.srt in same folder
- mv $basefile".en.srt" $basefile".srt"
- # notify-send for sending desktop notification popup
- notify-send "Subtitle for $line downloaded"
- done
- # resetting IFS to its original value
- IFS=$IFS_BAK
Add Comment
Please, Sign In to add comment