View Single Post
Old 2006-04-11, 07:30   #29 (permalink)
gabbe
Portal Member
 
Join Date: Aug 2004
Location: Sweden
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Hi, zebons

I will try to explain what I think can work:
In the setup the user can/should point to the normal dvd-reader that will be used by off-line movies, example:
Path for CD/DVD-reader: d:\ ( StdPath == "d:\" )

The workflow when a path is written in DB (DB=Ant database) should be:
If the file exists ( FileExists(FullPathToMovieToBeViewed) == true ) -> Launch the movie (as now).
If the file don't exists ( FileExists(FullPathToMovieToBeViewed) =! true ) -> Ask for the right disk (as now) and launch that file if it exists.

The workflow when the path in DB is empty (for the lazy ones that don't have the full path in DB (as me ...):
1/ Ask for the right disk and wait for the user to press OK (as now)
2/ Check if its a DVD (and launch it if it is) else try to find other file(s):
if (FileExists(StdPath+"Video_TS\Video_TS.ifo") -> Launch the DVD.
else
Scan the Disk for movie files
if NumberOfMovies == 1 -> Launch that
if NumberOfMovies >1 -> Let the user choose the right file name from a list

The scan should search the StdPath for all movie files (.avi .mp4 .ts .mpg .mpeg more?) and treat movie-cd1.avi and movie-cd2.avi as one movie. It should be able to scan sub-directories on the disk. Example a DVD disk with 5 avi's on it:

D:\Matrix\The Matrix-cd1.avi
D:\Matrix\The Matrix-cd2.avi
D:\Dracula\Dracula.avi
D:\Jurassic Park\JP-cd1.avi
D:\Jurassic Park\JP-cd2.avi

Should give this list for the user to choose from:
The Matrix
Dracula
JP

A better (more complicated) way whould be try to match the wanted movie name to the movie files on the disk. If only one match, then launch that.

I'm sorry for that all MP is written in .net, c#. I could help You with some code if it been c++ !!

This plugin will solve my last problem with MP (even without the above modifications, its only for me to go throught all disks again and write the full path in DB).

/gabbe
gabbe is offline