Finally I can give my first code-contribution to Mediaportal...
In the past it always annoyed me that for Movies the Videodatabase includes the path in the filenames in order to distinguish between Movies. In my opinion this is absolutely not needed and in most cases also not wanted. Let me first explain you my use-case.
I have two folders on my harddisk called:
S:\Movies
S:\Movies New
I always want to keep the movie information of both folders up to date and thus 'feed' it always immediately with IMDB information.
When files in the 'Movies New' are archived, I move the files to the 'Movies' directory. However up to now I always have to retrieve the information of these files again from IMDB again due to the fact that Mediaportal includes the path in its search in the Videodatabase for the movie. I don't think this is wanted/needed. I don't expect different Movies to have the same filename (including path).
When I check the code I saw the reason for this. It seems like a optimalisation for looking up a Movie which is done in 2 stages: first find all files of a specfied path and then search the filename in the returned list. I don't think this will gain you much performance here. We are not talking here about huge databases with video information which we want to traverse...
The solution is actually quite easy:
\Databases\Video\SqlLite\VideoDatabaseSqlLite.cs
Line 169:
Change
strSQL = String.Format("select * from files where idpath={0}", lPathId);
into
strSQL = String.Format("select * from files");
This way the path will not be included in the search in the Videodatabase.
Now my question to the official MP Development Team:
"What do you think of this change? Do you agree with it. If no, why not and if yes, how can I put this code into the official source-code?"
In the past it always annoyed me that for Movies the Videodatabase includes the path in the filenames in order to distinguish between Movies. In my opinion this is absolutely not needed and in most cases also not wanted. Let me first explain you my use-case.
I have two folders on my harddisk called:
S:\Movies
S:\Movies New
I always want to keep the movie information of both folders up to date and thus 'feed' it always immediately with IMDB information.
When files in the 'Movies New' are archived, I move the files to the 'Movies' directory. However up to now I always have to retrieve the information of these files again from IMDB again due to the fact that Mediaportal includes the path in its search in the Videodatabase for the movie. I don't think this is wanted/needed. I don't expect different Movies to have the same filename (including path).
When I check the code I saw the reason for this. It seems like a optimalisation for looking up a Movie which is done in 2 stages: first find all files of a specfied path and then search the filename in the returned list. I don't think this will gain you much performance here. We are not talking here about huge databases with video information which we want to traverse...
The solution is actually quite easy:
\Databases\Video\SqlLite\VideoDatabaseSqlLite.cs
Line 169:
Change
strSQL = String.Format("select * from files where idpath={0}", lPathId);
into
strSQL = String.Format("select * from files");
This way the path will not be included in the search in the Videodatabase.
Now my question to the official MP Development Team:
"What do you think of this change? Do you agree with it. If no, why not and if yes, how can I put this code into the official source-code?"