I kept doing it your way but it wouldnt work, I didn't understand why and I tried so many times. Now I see your changes in the elements file. That's what I was missing! I made those changes and it works beautifully now. That zip file saved me.
And thank you for taking the time to look at the code. I understand all your advice and you help me to better understand Lua. You were right, there was alot of extra garbage code in there.
Update: In this last week I've added a few things.
- I have a variable now in the skin file to define picture and movie file extensions. By default it says .avi .mpg .mp4 .flv for movies but a person can add .mov .divx .mkv or anything to that and the new extension will be used. I separate the string by "." and put the extensions into a table, then compare to the filename. If it matches its used, if not its ignored. So now no other file extension will be taken by accident to use as picture or movie.
- I added a search button for pictures. If you start with just movies the search button will take you to www.imdb.com
and search the name of your movie file and show you dvd covers or posters you can save. It makes finding pictures alot faster.
- I added a tv show window. This will take the name of the folder to use as the title, not the filename. So if you have a path like "C:\My Documents\tv shows\I Love Lucy\1x01 - Pilot.mpg" it will use "I Love Lucy" as the title and show a submenu for the episodes, even when "tv shows" is your selected folder to look in. (I have not finished this, I still need to learn more about ipairs. )
I have a few more ideas I want to put in but its slow because I have to google every new command I want to write. I'm learning so much more about Lua than I ever wanted to.