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
Improvement Suggestions
PowerScheduler: Ability to call programm with the next wakeup time as argument
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="myscha" data-source="post: 1083653" data-attributes="member: 74181"><p>Thanks for the link.</p><p></p><p>What I did up to now:</p><p>- I installed VC# 2010 Express and MePo 1.7.1</p><p>- I created a new class library and added referencs as desribed <a href="http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/18_Contribute/4_Development/TV-Server/TV-Server_Plugins" target="_blank">here</a></p><p>- I created a skeleton as a starting point that looks like</p><p>[CODE=C#]using System;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Text;</p><p></p><p>using MediaPortal;</p><p>using TvControl;</p><p>using TvDatabase;</p><p>using TvEngine;</p><p>using TvEngine.Events;</p><p>using TvLibrary;</p><p>using SetupControls;</p><p>using SetupTv;</p><p></p><p>namespace TvEngine</p><p>{</p><p> /// <summary></p><p> /// base class for tv-server plugins</p><p> /// </summary></p><p> public class test_plugin : ITvServerPlugin</p><p> {</p><p>// ITvServerEvent events = null;</p><p></p><p> #region ITvServerPlugin implementation</p><p></p><p> /// <summary></p><p> /// returns the name of the plugin</p><p> /// </summary></p><p> public string Name</p><p> {</p><p> get { return "test-plugin"; }</p><p> }</p><p></p><p> /// <summary></p><p> /// returns the version of the plugin</p><p> /// </summary></p><p> public string Version</p><p> {</p><p> get { return "0.1"; }</p><p> }</p><p></p><p> /// <summary></p><p> /// returns the author of the plugin</p><p> /// </summary></p><p> public string Author</p><p> {</p><p> get { return "myscha"; }</p><p> }</p><p></p><p> /// <summary></p><p> /// returns if the plugin should only run on the master server</p><p> /// or also on slave servers</p><p> /// </summary></p><p> public bool MasterOnly</p><p> {</p><p> get { return true; }</p><p> }</p><p> </p><p> /// <summary></p><p> /// Starts the plugin</p><p> /// </summary></p><p> public void Start(IController controller)</p><p> {</p><p>// events = GlobalServiceProvider.Instance.Get<ITvServerEvent>();</p><p>// events.OnTvServerEvent += new TvServerEventHandler(events_OnTvServerEvent);</p><p> }</p><p></p><p> /// <summary></p><p> /// Stops the plugin</p><p> /// </summary></p><p> public void Stop()</p><p> {</p><p>// events.OnTvServerEvent -= new TvServerEventHandler(events_OnTvServerEvent);</p><p> }</p><p></p><p> /// <summary></p><p> /// returns the setup sections for display in SetupTv</p><p> /// </summary></p><p> public SetupTv.SectionSettings Setup</p><p> {</p><p> get</p><p> {</p><p> return new SetupTv.SectionSettings();</p><p> }</p><p> }</p><p></p><p>// void events_OnTvServerEvent(object sender, EventArgs eventArgs)</p><p>// {</p><p>// }</p><p></p><p> #endregion</p><p> }</p><p>}[/CODE]</p><p></p><p>After building this I copy the resulting dll to the plugin folder of the TV server and it shows up in the TV server configuration dialog, but it is listed as "incompatible plugin" and therefore cannot be activated. The plugin name shows up correct, but the author shows "Unknown" and the version "1.0.0.0". Why does that happen and how do I fix it?</p><p></p><p>I only created a file with the above content and didn't touch all other project files and settings.</p></blockquote><p></p>
[QUOTE="myscha, post: 1083653, member: 74181"] Thanks for the link. What I did up to now: - I installed VC# 2010 Express and MePo 1.7.1 - I created a new class library and added referencs as desribed [URL='http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/18_Contribute/4_Development/TV-Server/TV-Server_Plugins']here[/URL] - I created a skeleton as a starting point that looks like [CODE=C#]using System; using System.Collections.Generic; using System.Linq; using System.Text; using MediaPortal; using TvControl; using TvDatabase; using TvEngine; using TvEngine.Events; using TvLibrary; using SetupControls; using SetupTv; namespace TvEngine { /// <summary> /// base class for tv-server plugins /// </summary> public class test_plugin : ITvServerPlugin { // ITvServerEvent events = null; #region ITvServerPlugin implementation /// <summary> /// returns the name of the plugin /// </summary> public string Name { get { return "test-plugin"; } } /// <summary> /// returns the version of the plugin /// </summary> public string Version { get { return "0.1"; } } /// <summary> /// returns the author of the plugin /// </summary> public string Author { get { return "myscha"; } } /// <summary> /// returns if the plugin should only run on the master server /// or also on slave servers /// </summary> public bool MasterOnly { get { return true; } } /// <summary> /// Starts the plugin /// </summary> public void Start(IController controller) { // events = GlobalServiceProvider.Instance.Get<ITvServerEvent>(); // events.OnTvServerEvent += new TvServerEventHandler(events_OnTvServerEvent); } /// <summary> /// Stops the plugin /// </summary> public void Stop() { // events.OnTvServerEvent -= new TvServerEventHandler(events_OnTvServerEvent); } /// <summary> /// returns the setup sections for display in SetupTv /// </summary> public SetupTv.SectionSettings Setup { get { return new SetupTv.SectionSettings(); } } // void events_OnTvServerEvent(object sender, EventArgs eventArgs) // { // } #endregion } }[/CODE] After building this I copy the resulting dll to the plugin folder of the TV server and it shows up in the TV server configuration dialog, but it is listed as "incompatible plugin" and therefore cannot be activated. The plugin name shows up correct, but the author shows "Unknown" and the version "1.0.0.0". Why does that happen and how do I fix it? I only created a file with the above content and didn't touch all other project files and settings. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
Improvement Suggestions
PowerScheduler: Ability to call programm with the next wakeup time as argument
Contact us
RSS
Top
Bottom