home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
VideoDatabase Optimalisation (don't use path in lookup)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="HenriM" data-source="post: 81683" data-attributes="member: 10451"><p>Finally I can give my first code-contribution to Mediaportal...</p><p></p><p>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. </p><p></p><p>I have two folders on my harddisk called:</p><p></p><p>S:\Movies</p><p>S:\Movies New</p><p></p><p>I always want to keep the movie information of both folders up to date and thus 'feed' it always immediately with IMDB information.</p><p></p><p>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).</p><p></p><p>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...</p><p></p><p>The solution is actually quite easy:</p><p></p><p>\Databases\Video\SqlLite\VideoDatabaseSqlLite.cs</p><p>Line 169:</p><p></p><p>Change</p><p> strSQL = String.Format("select * from files where idpath={0}", lPathId);</p><p>into </p><p> strSQL = String.Format("select * from files");</p><p></p><p>This way the path will not be included in the search in the Videodatabase.</p><p></p><p>Now my question to the official MP Development Team:</p><p>"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?"</p></blockquote><p></p>
[QUOTE="HenriM, post: 81683, member: 10451"] 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?" [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
VideoDatabase Optimalisation (don't use path in lookup)
Contact us
RSS
Top
Bottom