WARNING: I use the following file-naming convention in Thunar. It must be followed for this App to work! Note that everything after the Movie.Name.Name.Name is dropped for searching IMDB. That includes .[year][genre][source].(or anything you want) and the extension.
Code: Select all
Movie.Name.[year][genre][source].mkv
Install surfraw and surfraw-extra.
Code: Select all
$ sudo apt-get install surfraw surfraw-extra
----------
Create the script (<path to bin>/imdball.sh):
Code: Select all
#!/bin/bash
# imdball.sh
# assigns the variable from Thunar custom action 'IMDB search '
m=$(basename "$1")
# loops through each filename
# renames file so it drops .[ and after, including file extension.
# surfraw does the actual terminal lookup on imdb. Install surfraw, surfraw-extra and configure as needed (https://www.ostechnix.com/surfraw-commandline-interface-popular-search-engines-100-websites/)
for m
do
name="${m%.[*}"
surfraw imdb "$name"
done
----------
Create the Custom Action:
Thunar > Edit > 'Create Custom Action' and click '+' button to create a new custom action.
---Basic TAB---
Name: IMDB search
Description: Searches IMDB for submitted movies
Command: <path to bin>/imdball.sh %N
Icon: up to you, choose one, I used a faded out VLC icon down near the bottom.
---Appearance Conditions TAB---
File Pattern: *
Enable Video Files checkbox
Click OK Button to save/exit
If done correctly, you will now have the 'IMDB search' option available when you right-click any number of selected movie filenames in Thunar.
----------
UR DONE!!! Choose your file(s), right-click and choose the IMDB search option from the menu.