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 2
Plugin Development
SQLiteDatabase Plugin for MP2
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="MJGraf" data-source="post: 988767" data-attributes="member: 17886"><p>I can't get my Hands off it <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /></p><p> </p><p>Then Problem seems to be that I get multiple tables in the database for the same MIA.</p><p> </p><p>After freshly starting the MP2-Server, I only have two "double" tables:</p><p>V_GENRES</p><p>NM_GENRES</p><p>and</p><p>V_GENRES_0</p><p>NM_GENRES_0</p><p>That seems to be correct, because the first two are for the Genres from the Audio Aspect, the latter two for the Genres from the Video aspect.</p><p> </p><p>Then I add a share with only one subdirectory with one MP3 Music file in it. The importer runs and suddenly, I have lots of double tables in my database.</p><p> </p><p>In particular i have</p><p>M_AUDIOITEM</p><p>and</p><p>M_AUDIOITEM_0</p><p> </p><p>While the data from my single MP3-file is stored in M_AUDIOITEM, the query, which later on tries to find the Audio items in the MediaLibrary seraches in M_AUDIOITEM_0 and therefore doesn't find anything.</p><p> </p><p>It somehow seems like MP2-server thinks that the table for a certain MIA is still missing although it is already there and as a result, creates a further table for the same MIA.</p><p>Does anyone know how and where MP2-server checks, whether the database table for a MIA is already in the database? I thought it would use the TableExists-Method from ISQLDatabase, but this method is only called once in the whole MP2-project, which is in line 67 of the DatabaseManager:</p><p><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="color: #0000ff"><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="color: #0000ff"><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="color: #0000ff">if</span></span></span></span></span></span></span></span></span><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="font-size: 12px"><span style="font-family: 'Consolas'"> (!database.TableExists(</span></span></span></span><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="color: #2b91af"><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="color: #2b91af"><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="color: #2b91af">MediaPortal_Basis_Schema</span></span></span></span></span></span></span></span></span><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="font-size: 12px"><span style="font-family: 'Consolas'">.MEDIAPORTAL_BASIS_TABLE_NAME))</span></span></span></span></p><p><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="font-size: 12px"><span style="font-family: 'Consolas'">and this has nothing to do with MIAs. So the detection, whether a table for a certain MIA already exists, must work differently.</span></span></span></span></p><p><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="font-size: 12px"><span style="font-family: 'Consolas'">Any help appreciated..</span></span></span></span></p><p> </p><p><span style="font-size: 12px"><span style="font-family: 'Consolas'"><span style="font-size: 12px"><span style="font-family: 'Consolas'">Michael</span></span></span></span></p></blockquote><p></p>
[QUOTE="MJGraf, post: 988767, member: 17886"] I can't get my Hands off it :D Then Problem seems to be that I get multiple tables in the database for the same MIA. After freshly starting the MP2-Server, I only have two "double" tables: V_GENRES NM_GENRES and V_GENRES_0 NM_GENRES_0 That seems to be correct, because the first two are for the Genres from the Audio Aspect, the latter two for the Genres from the Video aspect. Then I add a share with only one subdirectory with one MP3 Music file in it. The importer runs and suddenly, I have lots of double tables in my database. In particular i have M_AUDIOITEM and M_AUDIOITEM_0 While the data from my single MP3-file is stored in M_AUDIOITEM, the query, which later on tries to find the Audio items in the MediaLibrary seraches in M_AUDIOITEM_0 and therefore doesn't find anything. It somehow seems like MP2-server thinks that the table for a certain MIA is still missing although it is already there and as a result, creates a further table for the same MIA. Does anyone know how and where MP2-server checks, whether the database table for a MIA is already in the database? I thought it would use the TableExists-Method from ISQLDatabase, but this method is only called once in the whole MP2-project, which is in line 67 of the DatabaseManager: [SIZE=3][FONT=Consolas][COLOR=#0000ff][SIZE=3][FONT=Consolas][COLOR=#0000ff][SIZE=3][FONT=Consolas][COLOR=#0000ff]if[/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][SIZE=3][FONT=Consolas][SIZE=3][FONT=Consolas] (!database.TableExists([/FONT][/SIZE][/FONT][/SIZE][SIZE=3][FONT=Consolas][COLOR=#2b91af][SIZE=3][FONT=Consolas][COLOR=#2b91af][SIZE=3][FONT=Consolas][COLOR=#2b91af]MediaPortal_Basis_Schema[/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][SIZE=3][FONT=Consolas][SIZE=3][FONT=Consolas].MEDIAPORTAL_BASIS_TABLE_NAME))[/FONT][/SIZE][/FONT][/SIZE] [SIZE=3][FONT=Consolas][SIZE=3][FONT=Consolas]and this has nothing to do with MIAs. So the detection, whether a table for a certain MIA already exists, must work differently.[/FONT][/SIZE][/FONT][/SIZE] [SIZE=3][FONT=Consolas][SIZE=3][FONT=Consolas]Any help appreciated..[/FONT][/SIZE][/FONT][/SIZE] [SIZE=3][FONT=Consolas][SIZE=3][FONT=Consolas]Michael[/FONT][/SIZE][/FONT][/SIZE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
Top
Bottom