If you have a movie collection on your My Book then you need to install Simple Movie Catalog which will only take a few minutes to do.
Go to
https://sourceforge.net/projects/smoviecat/
and check it out. If you like what it can do and you have need for it download the zip file and lets get started.
On a PC extract the .zip contents. You will get the following:
SimpleMovieCatalog
demo
doc
imdb_cache
lib
report
config.txt
interactive.cmd
moviecat.pl
readme.txt
run_scan.cmd
scan.log
Now to save space on our My Book and because SMC is written for Windows and Linux we can delete these components:
demo
report
interactive.cmd
run_scan.cmd
Now we need to edit the config.txt file and add the path to our movies.
Open config.txt in a text editor and add the path(s) to the video on your My Book.
So if you have all you videos in the default '/shares/Public/Shared Video' directory the line you need to add to the config would look like this:
# Specify directories to scan, 1 per line, example: # /shares/Public /shares/Public/Shared Video
In my case I used the default '/shares/Public/Shared Video' location but I have my movies and TV shows in two separate folders so my config looks like this.
# Specify directories to scan, 1 per line, example: # /shares/Public /shares/Public/Shared Video/Movies /shares/Public/Shared Video/TV_Shows
*Note: Remember Linux is case sensitive so get your path spelled out right the first time.
Save your edits.
Now I created this custom script to make it easy to run a scan and send the report to a Public share that you can easily find. The 'runit.sh' script will use the default '/shares/Public' directory to send the report to when the scan completes.
If you want the report sent to another location you will need to change line 11 of the script from:
PUBLIC=/shares/Public
to
PUBLIC=<your preferred location>
Otherwise you do not need to change anything.
In the text editor open a new document and paste the runit.sh script from below.
#!/bin/bash # Name: runit.sh # A script to run a SimpleMovieCatalog scan and send the report to a /shares/Public location. # Customized for the MBWE by mdmihelich 'mdm0962@gmail.com' # 2013-11-01 # Version 2.0 # Notes - Added clean_up function # Script variables. PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin:/opt/bin:/opt/sbin DATE="$(date +"%Y-%m-%d")" # 2013-04-05 Date format: YYYY-MM-DD # PUBLIC=/shares/Public # Location of the share the scan 'report' will be sent.# REPORT=SMC-Report-$DATE # Scan report name.# SMC=/home/SimpleMovieCatalog # Simple Movie Catalog location.# MOVIECAT=moviecat.pl # Simple Movie Catalog perl script.# CONFIG=config.txt # Simple Movie Catalog config document.# PS3="Select [ 1-2-3-4 ] ? " # Choice QA prompt.# # Simple scan command with NO scan options selected. simple_scan(){ perl moviecat.pl -c config.txt } # Advanced scan command with scan options selected. advanced_scan(){ perl moviecat.pl -mfn -my -as -origtitle -c config.txt } # Deletes a previous scan report clean_up(){ if [ -e $SMC/report ]; then rm -r $SMC/report; echo "The last report was deleted."; sleep 1 else echo "No reports were found, nothing to delete."; sleep 1 fi } #---------Script starts--------------# # Start the script and clear the display clear # Check for all needed components. if [ -e $SMC ] && [ -e $PUBLIC ] && [ -e $SMC/$MOVIECAT ] && [ -e $SMC/$CONFIG ]; then echo else echo "There are missing components; the scan can not complete. Check your directories."; sleep 2; exit 1 fi # Start the scan. echo "Starting the Simple Movie Catalog scan."; echo # Choose simple or advanced scan echo "Choose a 'simple' or 'advanced' scan?" select QA in "Simple" "Advanced" "Clear_Report" "Exit"; do case $QA in Simple ) echo "Simple scan started."; simple_scan; break;; Advanced ) echo "Advanced scan started."; advanced_scan; break;; Clear_Report ) echo "Deleting old report."; clean_up;; Exit ) break; exit 0;; * ) echo "That is not a vaild choice, try again.";; esac done # Wait for all processes to complete wait; echo "Scan complete."; sleep 1 # Copy and rename the scan 'report' to a '/shares/Public' share if [ ! -e $PUBLIC/$REPORT ]; then cd $SMC | cp -r report $PUBLIC/$REPORT echo "$REPORT has been copied to $PUBLIC."; sleep 1 elif [ -e $PUBLIC/$REPORT ]; then rm -r $PUBLIC/$REPORT; cd $SMC | cp -r report $PUBLIC/$REPORT echo "A updated $REPORT has been copied to $PUBLIC."; sleep 1 else echo "$REPORT did not copy to $PUBLIC share!" fi # Exit script echo "Exiting." exit 0 #---------Script ends-----------------# # User notes: # Navigate to the /shares/Public/Documents and locate the 'SMC-Report-<current date>' folder on your PC. # Open 'SMC-Report-<current date>' folder and located the 'movies.html' file. # 2X click on the file to auto open or run the below command in a terminal. # xdg-open movies.html # This command will open the 'movies.html' file using the users default web browser.#
Save it as runit.sh and put it in the SimpleMovieCatalog.
This script needs to be in the SimpleMovieCatalog directory along with the other contents from the .zip folder that are left.
The updated SimpleMovieCatalog directory needs to include:
doc
imdb_cache
lib
config.txt
moviecat.pl
readme.txt
scan.log
runit.sh
Time to install/upload SMC to the the My Book.
Use Filezilla to send the SimpleMovieCatalog directory from your PC to the My Book's /home directory.
Now ssh to the My Book.
ssh root@<ip of your My Book>
Enter your password.
welc0me
Navigate to the /home folder that has the SimpleMovieCatalog directory. Make the script executable.
cd /home/SimpleMovieCatalog chmod +x runit.sh
Now run your scan…
sh runit.sh
…follow the on screen script prompts…..
"Choose a 'simple' or 'advanced' scan?"
1. Simple
2. Advanced
3. Clear_Report
4. Exit
Select 2 then <Enter>
Now the scan will begin. Depending on how large your movie collection is this can take some time just be patient and watch the scan work its magic.
Once the scan is complete you can close the ssh session.
Exit
On your PC navigate to your /shares/Public and locate the 'SMC-Report-<current date>' folder and open. Locate the 'movies.html' file and 2X click to open. A new tab or browser window will open and display the contents and of the scan along with a description and thumbnail.
Enjoy and send thanks back to the developer of Simple Movie Catalog.