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
Products
TV-Server
TV Server Plugin: TvWishList
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="huha" data-source="post: 790632" data-attributes="member: 63847"><p>elliottmc,</p><p>as i see that you are in the test group i am asking you for help to get in contact with an experienced programmer who understands the Tvserver database in detail.</p><p>I have reused a very nice and simple code piece from the Ipimp source code to make the connection to the Tvserver database as listed below. i suspect that this is conflicting with the Tv plugin in Mediaportal for a multiseat configuration. I am also not closing the connection after leaving the plugin (I do not know how). Is there a better way to do this? I need a connection to the Tvserver database to use the </p><p>TvBusinessLayer layer = new TvBusinessLayer();</p><p> Setting setting;</p><p>in my plugin. Any help here would be very much appreciated. I do not know any other MP plugin, which is using the Tvserver database. If someone knows a source code here, please post.</p><p></p><p><span style="color: Red">Update: I believe i found the bug. I did open the connection although it was open already. I changed the following line</span></p><p><span style="color: Red"></span></p><p>Source Code:</p><p>using System;</p><p>using System.Collections;</p><p>using System.ComponentModel;</p><p>using System.Data;</p><p>using System.Web;</p><p>using System.Web.Services;</p><p>using System.Web.Services.Protocols;</p><p>using System.Collections.Generic;</p><p></p><p>using TvDatabase;</p><p>using Gentle.Framework;</p><p>using TvControl;</p><p>using MediaPortal.GUI.Library;</p><p></p><p>namespace TvWishList</p><p>{ </p><p> public class ServiceInterface : System.Web.Services.WebService</p><p> {</p><p> private static bool isDBConnected = false;</p><p> public string gentleConfig;</p><p> public string connStr;</p><p> </p><p> public bool ConnectToDatabase()</p><p> {</p><p> //if (isDBConnected) bug!!!</p><p> <span style="color: Red"> if (RemoteControl.IsConnected)</span></p><p> return true;</p><p></p><p> string provider = "";</p><p> RemoteControl.HostName = Environment.MachineName; </p><p> try</p><p> {</p><p> RemoteControl.Instance.GetDatabaseConnectionString(out connStr, out provider);</p><p> Gentle.Framework.ProviderFactory.SetDefaultProviderConnectionString(connStr);</p><p> }</p><p> catch (Exception)</p><p> {</p><p> return false;</p><p> }</p><p> isDBConnected = true;</p><p> return true;</p><p> }</p><p> }</p><p>}</p></blockquote><p></p>
[QUOTE="huha, post: 790632, member: 63847"] elliottmc, as i see that you are in the test group i am asking you for help to get in contact with an experienced programmer who understands the Tvserver database in detail. I have reused a very nice and simple code piece from the Ipimp source code to make the connection to the Tvserver database as listed below. i suspect that this is conflicting with the Tv plugin in Mediaportal for a multiseat configuration. I am also not closing the connection after leaving the plugin (I do not know how). Is there a better way to do this? I need a connection to the Tvserver database to use the TvBusinessLayer layer = new TvBusinessLayer(); Setting setting; in my plugin. Any help here would be very much appreciated. I do not know any other MP plugin, which is using the Tvserver database. If someone knows a source code here, please post. [COLOR="Red"]Update: I believe i found the bug. I did open the connection although it was open already. I changed the following line [/COLOR] Source Code: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Collections.Generic; using TvDatabase; using Gentle.Framework; using TvControl; using MediaPortal.GUI.Library; namespace TvWishList { public class ServiceInterface : System.Web.Services.WebService { private static bool isDBConnected = false; public string gentleConfig; public string connStr; public bool ConnectToDatabase() { //if (isDBConnected) bug!!! [COLOR="Red"] if (RemoteControl.IsConnected)[/COLOR] return true; string provider = ""; RemoteControl.HostName = Environment.MachineName; try { RemoteControl.Instance.GetDatabaseConnectionString(out connStr, out provider); Gentle.Framework.ProviderFactory.SetDefaultProviderConnectionString(connStr); } catch (Exception) { return false; } isDBConnected = true; return true; } } } [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
TV-Server
TV Server Plugin: TvWishList
Contact us
RSS
Top
Bottom