It is currently May 23rd, 2013, 7:36 am Advanced search

SRJG Movie Jukebox for the AIOS

Product usage Guides and Tips.. see what you are missing!

Re: SRJG Movie Jukebox for the AIOS

Postby jsmiddleton4 » July 27th, 2012, 5:33 pm

Snappy is going to look at it. He can't see anything that should be a problem. He is going on a 2 week vacation and will look at it when he gets back.

If I point to the nfs directory when it has the NAS drives AND the hdd listed, SRJG won't build jukebox. Point to each device separately, works fine. Take the HDD out of the link commands and leave the 2 NAS drives, SRJG works fine. Point to just the HDD, works fine.

Why would adding the HDD goof it up?
jsmiddleton4
Hardcore
 
Posts: 720
Joined: May 21st, 2012, 7:25 pm

Re: SRJG Movie Jukebox for the AIOS

Postby jsmiddleton4 » July 27th, 2012, 5:38 pm

I wonder.......

My hard drive is NTFS.......

EXT3 did not help.
jsmiddleton4
Hardcore
 
Posts: 720
Joined: May 21st, 2012, 7:25 pm

Re: SRJG Movie Jukebox for the AIOS

Postby jsmiddleton4 » July 27th, 2012, 9:41 pm

Given some of the problems I've found with the AIOS and resolving names, etc., like folder.jpg I am going to check and see if by naming the folders HDD.... was being picked up internally in the AIOS. Waiting for the TV coverage of opening ceremony to finish....
jsmiddleton4
Hardcore
 
Posts: 720
Joined: May 21st, 2012, 7:25 pm

Re: SRJG Movie Jukebox for the AIOS

Postby jsmiddleton4 » July 27th, 2012, 11:42 pm

Tried everything I could think of. No matter what if I set SRJG to scan the NAS drive and the internal HDD for the AIOS, SRJG won't build a proper movie.db. Movie.db is empty. If I point to the NAS drive or the internal HDD, SRJG works great.

If I point to the two NAS drives I have, works great.

Something isn't letting SRJG collect the data for building the juke box when trying to scan the internal HDD and a NAS device.

NFS file shares work perfectly for all drives.
jsmiddleton4
Hardcore
 
Posts: 720
Joined: May 21st, 2012, 7:25 pm

Re: SRJG Movie Jukebox for the AIOS

Postby jsmiddleton4 » July 28th, 2012, 12:21 am

I have no idea if I'm right or not but it appears to me the symptom I'm seeing is somehow related to these lines of code from SRJG.cgi. Again it appears to me, and I could be 100% off base, something in the MOVIEPATH, MOVIEFILE, MOVIENAME and MOVIEEXT is the problem. SRJG doesn't know how to find the list of movies and where nfo's, etc., live to both the NAS and the Internal HDD. If I knew what the grammar was the first thing I'd look at is the MOVIEPATH line. Something about Shell builtins instead of dirname raises an eyebrow. If the AIOS can't keep track of the two drives, NAS and HDD, with its builtin shell (again whatever that is) then SRJG is setting itself up to fail by relying on the Shell.

GenerateMovieList()
# Find the movies based on movie extension and path provided. Remove movies
# that contains the string(s) specified in $Movie_Filter
{
# Replace the comma in Movie_Filter to pipes |
Movie_Filter=`echo $Movie_Filter | sed 's/,/|/ g'`

find "$Movies_Path" \
| egrep -i '\.(asf|avi|dat|divx|flv|img|iso|m1v|m2p|m2t|m2ts|m2v|m4v|mkv|mov|mp4|mpg|mts|qt|rm|rmp4|rmvb|tp|trp|ts|vob|wmv)$' \
| egrep -iv "$Movie_Filter" > $MoviesList
}

GenerateInsDelFiles()
# Generate insertion and deletion files
{
sed -i -e 's/\[/\[/g' -e 's/\]/\]/g' $MoviesList # Conversion of [] for grep
if [ -s "${PreviousMovieList}" ] ; then # because the grep -f don't work with empty file
grep -vf $MoviesList "${PreviousMovieList}" | sed -e 's/\[/\[/g' -e 's/\]/\]/g' > $DeleteList
grep -vf "${PreviousMovieList}" $MoviesList | sed -e 's/\[/\[/g' -e 's/\]/\]/g' > $InsertList
else
cat $MoviesList | sed -e 's/\[/\[/g' -e 's/\]/\]/g' > $InsertList
fi
mv $MoviesList "${PreviousMovieList}"
}

DBMovieDelete()
# Delete records from the movies.db database.
{
echo "Removing movies from the Database ...."
while read LINE
do
MOVIEPATH="${LINE%/*}" # Shell builtins instead of dirname
MOVIEFILE="${LINE##*/}" # Shell builtins instead of basename
MOVIEEXT="${MOVIEFILE##*.}" # only ext
MOVIEFILE="${MOVIEFILE%.*}" # Strip off .ext

${Sqlite} "${Database}" "DELETE from t1 WHERE file='<file>${MOVIEFILE}</file>' AND path='<path>${MOVIEPATH}</path>' AND ext='<ext>${MOVIEEXT}</ext>'";
done < $DeleteList
${Sqlite} "${Database}" "VACUUM";
}

DBMovieInsert()
# Add movies to the Database and extract movies posters/folders
{
rm "${UpdateLog}" 2>/dev/null
while read LINE
do
MOVIEPATH="${LINE%/*}" # Shell builtins instead of dirname
MOVIEFILE="${LINE##*/}" # Shell builtins instead of basename
MOVIENAME="${MOVIEFILE%.*}" # Strip off .ext
MOVIEEXT="${MOVIEFILE##*.}" # only ext

if [ "${Nfo_Path}" = "MoviesPath" ]; then NFOPATH="${MOVIEPATH}";
elif [ "${Nfo_Path}" = "SRJG" ]; then NFOPATH="${FSrjg_Path}"
else NFOPATH="${Nfo_Path}"; fi

# Initialize defaults, replace later
MOVIETITLE="$MOVIENAME</title>"
GENRE="<name>Unknown</name>"
MovieYear=""

if [ -e "$NFOPATH/MovieInfo.nfo" ]; then INFONAME=MovieInfo.nfo;
else INFONAME=$MOVIENAME.nfo; fi

[ -e "$NFOPATH/$INFONAME" ] && Infoparsing

if [ -z "$GENRE" ]; then dbgenre="<name>Unknown</name>"; else dbgenre="$GENRE"; fi
dbtitle=`echo "<title>$MOVIETITLE" | sed "s/'/''/g"`
dbpath=`echo "<path>$MOVIEPATH</path>" | sed "s/'/''/g"`
dbfile=`echo "<file>$MOVIENAME</file>" | sed "s/'/''/g"`
dbext=`echo "<ext>$MOVIEEXT</ext>" | sed "s/'/''/g"`
dbYear=$MovieYear

if [ "$Force_DB_Update" = "y" ]; then
dbdateStamp=`date -r "$MOVIEPATH/$MOVIENAME.$MOVIEEXT" '+%Y-%m-%d %H:%M:%S'`
${Sqlite} "${Database}" \
"insert into t1 (genre,title,year,path,file,ext,dateStamp) \
values ('$dbgenre','$dbtitle','$dbYear','$dbpath','$dbfile','$dbext','$dbdateStamp');";
else
${Sqlite} "${Database}" \
"insert into t1 (genre,title,year,path,file,ext) \
values ('$dbgenre','$dbtitle','$dbYear','$dbpath','$dbfile','$dbext');";
fi
done < $InsertList
}
jsmiddleton4
Hardcore
 
Posts: 720
Joined: May 21st, 2012, 7:25 pm

Re: SRJG Movie Jukebox for the AIOS

Postby jsmiddleton4 » July 28th, 2012, 8:36 am

Here is where my script ended up. Everything works except as noted building the SRJG jukebox when pointing to the common directory, JukeBox. I have a NAS with Television shows on it. I only want to access it and the simple wall mode it provides via NFS options. Can set the Television shows up for SRJG. Its a lot of work however. Also use NFS for picking movies not exclusively SRJG. So want the internal hard drive listed in NFS as well.

#!/bin/sh
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")

# Create nfs mount folder if not present
mkdir -p /tmp/nfs
mkdir -p /tmp/JukeBox

######################################################
TIMEOUT=20
mkdir -p /tmp/ramfs/volumes/NAS1
while [ $TIMEOUT -gt 0 ]; do
if ping 192.168.2.21; then
mount -t cifs //192.168.2.21/Television_Shows -o ro,username= /tmp/ramfs/volumes/NAS1
ln -s /tmp/ramfs/volumes/NAS1 /tmp/nfs/Television_Shows
TIMEOUT=0
else
TIMEOUT=$((TIMEOUT - 1))
fi
done

##########################################################

##########################################################
TIMEOUT=20
mkdir -p /tmp/ramfs/volumes/NAS2
while [ $TIMEOUT -gt 0 ]; do
if ping 192.168.2.20; then
mount -t cifs //192.168.2.20/Movies -o ro,username= /tmp/ramfs/volumes/NAS2
ln -s /tmp/ramfs/volumes/NAS2 /tmp/nfs/NASMovies
TIMEOUT=0
else
TIMEOUT=$((TIMEOUT - 1))
fi
done
##########################################################

ln -s /tmp/usbmounts/sda1/AIOSMovies /tmp/nfs/AIOSMovies
ln -s /tmp/ramfs/volumes/NAS2 /tmp/JukeBox/NASMovies
ln -s /tmp/usbmounts/sda1/AIOSMovies /tmp/JukeBox/AIOSMovies

IFS=$SAVEIFS
jsmiddleton4
Hardcore
 
Posts: 720
Joined: May 21st, 2012, 7:25 pm

Re: SRJG Movie Jukebox for the AIOS

Postby toddcg » July 28th, 2012, 8:39 pm

I'v tried searching the forum to see if this question has been answered but no luck. So...I shall pose it here and hope for the best. I am in the process of replacing all of my "NTV550" TAG files with the files from thumbgen, but I'm wondering about naming the movies. I know I have to name the film and put the year, but what about movies with "The" or "A" as the first word/letter? I noticed just pulling movies from the file manager it puts all the "The..." movies under "The." Does that mean I have to rename "The Incredible Hulk" to "Incredible Hulk, The" so it sorts it properly?

Thanks so much!
toddcg
Curious
 
Posts: 29
Joined: July 28th, 2012, 8:35 pm

Re: SRJG Movie Jukebox for the AIOS

Postby jsmiddleton4 » July 28th, 2012, 8:45 pm

You might. I've also found that to have movies of a series, like James Bond movies, I've ended up numbering their folder, not renaming the movie. Also if you end up numbering folders and get to double digits like 10, 11, etc., you have to number the single digits as double digits too, 01, 02, 03, etc., so they'll sort properly. I've found sorting by naming directories the best way to go, not renaming movies.
jsmiddleton4
Hardcore
 
Posts: 720
Joined: May 21st, 2012, 7:25 pm

Re: SRJG Movie Jukebox for the AIOS

Postby toddcg » July 29th, 2012, 11:31 am

Thanks so much. I think I understand now...modifying the directory file or folder but not the movie file, itself. So the folder or directory file would read "Incredible Hulk, The" and the movie file would have the same name. So the file is sorted where it should be and when browsing reads "The Incredible Hulk." Did I get that right?

Also, something I liked about the Neotv was that I could have folders in the movie browser that only showed the movie files in them. This was especially useful for movies with special feature discs or television series. I was wondering if anyone had a suggestion for dealing with those kinds of files in the jukebox. Is that considered "Nesting?" I read in here that isn't possible on the simple movie wall. And I'm guessing it doesn't work for the SRJG jukebox. So in the case of special feature discs, they would just be a totally separate folder and file...and with television shows that aren't iso they would be separate in the jukebox, as well, correct?
toddcg
Curious
 
Posts: 29
Joined: July 28th, 2012, 8:35 pm

Re: SRJG Movie Jukebox for the AIOS

Postby jsmiddleton4 » July 29th, 2012, 12:17 pm

"Incredible Hulk, The" and the movie file would have the same name.

No. You can name the folder anything you want. Thumben is going to read the movie name not the directory name. SRJG will show the movie name from the Thumbgen generated nfo files, movie file name, etc. When using SRJG you don't see the names of actual files much. Its all icon driven.

Lets say I name Incredible Hulk "Jimbob and his Invisible Friends". The only problem doing so will create is in Thumbgen when it looks for the movie "Jimbob and his Invisible Friends". I'd have to enter Incredible Hulk in Thumbgen search window to find the right movie information. Thumbgen will generate all the required files all named Jimbob and his Invisible Friends...... because that is what the movie file name is. But in SRJG when I look for the movie I'll see the jpgs, page info jpg, etc., all for The Incredible Hulk because The Incredible Hulk information is what Thumbgen used to generate all its files. SRJG reads the files Thumbgen creates, not the name of the movie file nor the folder name.

That's why in my James Bond directory what SRJG shows is the movie information for the movie Casino Royale but its directory is named 10 Casino Royale AND the movie and relevant files are named XCasino Royale.iso, etc. I have to name the movie and its files XCasino Royale because the AIOS gets confused in displaying the relevant folder.jpg. AIOS will grab sometimes the first jpg it finds to display the folder icon. By naming the movie and its associated files XCasino Royale the AIOS "sees" folder.jpg as the folder icon and properly displays it.

SRJG with Thumbgen is mostly graphics driven and it isn't necessary to do all the file name, folder name, etc., as it is on other products.

aasoror has passed along the whole folder.jpg annoyance. Not sure if its being fixed or not. Naming moves X....... works for now.

And the bug isn't consistent. The way I know which ones need to be renamed X..... is in SRJG the movie icon displayed will be one of the wall page jpg's, etc. and not the folder.jpg.

Think graphics, folder.jpg, thumbgen generated files. Genre's not directory, file name, etc.

Even if I use NFS mode and its ability to show the files as a simple movie wall I can still name The Incredible Hulk "Jimbob and his Invisible Friends". I'll still see the folder.jpg and information for The Incredible Hulk that Thumbgen creates. I will however see as text along the bottom of The Incredible Hulk icon thumbnail "Jimbob and his Invisible Friends. I never see that text in SRJG.

SRJG sorts on genre's not file or movie names per se.
jsmiddleton4
Hardcore
 
Posts: 720
Joined: May 21st, 2012, 7:25 pm

PreviousNext

Return to AIOS Guides & Tips

Who is online

Users browsing this forum: No registered users and 0 guests