MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2006-12-24, 17:35   #1 (permalink)
Portal Member
 
Join Date: May 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts


Default myGadgets plugin (in Development)

I am trying to develop a gadgets plugin that is to be used in my new kitchen. That is, a plugin that shows a summary on one screen from many parts of the MP system which is simple enough to be navigated by a touch screen. It will be some kind of a basic MP setup with all the essential information on one screen. This should be fully configurable to the user which should be able to add, remove and order these "gadgets" (which is small code blocks that retreaves spesific information from the system/plugins). It will also have shortcuts to the plugins shown. For example, if you click the current weather picture the wather plgin should be loaded.

My vision is a kitchen screen that shows today´s agenda from Google Calendar (open API), displays any new emails (myMail plugin?), upcoming TV-sows (bublic methods in mp-core), today´s recordings (should be ok to retreave) and the current wather. Also it would be neat with a scrolling rss feed on the lower end of the screen displaying today´s news and the "Now playing" thing from basic home. Also, more "gadgets" should be easily added.

I am new to C# so i need some help getting started. So I have some questions I hope someone will take time to answer since I think this could be a cool feature which enables MP to be used in other settings than the living room:


1. Is this plugin possible? I have not yet started developing the information retreaval parts which i think is the most complex ones.

2. There are quite a few public metods which can be used to harvest information from the TV-database class, such as "get today´s recordings" and "get the next /current 10 tv-shows". But these return booleans rather than arrays/objects which I find logical. Do any1 know of some code examples describing this sort of information retreaval.

3. The plugins are giving me a headache as these contain no public methods. Take myWeather for example. What is the best way of just extracting the current weather image (the sun/rain/cloudy one) and the temperature without duplicating the code in my plugin? The same with the rss plugin.

4. How do I define scrolling text in the xml file? Need this for the scrolling rss feed

5. I have planned to make a Java config program that just modifies the xml file. This will lead to little extra information retreavlel since the "gadgets" will all run but the user decides who will be visible on the screen. Is there any better way of doing this?

6. Other inputs? How this should be done or what this plugin shold be able to do?


If anyone else with C# experience wants to join my development you are herby invited!
magnuje2 is offline   Reply With Quote
Old 2006-12-28, 03:26   #2 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default

1. Yes its possible. I don't believe there's a common way to grab data from the web, so just use the in-built .NET WebRequest and WebService methods. For website scraping, James has written some code that you can reuse. See Getting Data from the Web

2. Download the MP code, and check out the Databases project.

3. Try see if the weather plugin writes the data to the PropertyManager class. Plugins should do this, but they don't all comply. Otherwise you can get the weather settings from the MediaPortal.xml file using the MP config methods.

4. not sure.

5. I suggest you implement the ISetupForm interface in C# and write it in that. That way it appears in the MP Configuration dialog. If you can write the plugin in C#, you can write the setup form in C#.

6. I'd be interested in how you allow the user to layout the gadgets on the screen...

Sam
samuel337 is offline   Reply With Quote
Old 2006-12-28, 12:25   #3 (permalink)
Portal Member
 
Join Date: May 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Thanks for your help, ill look into it now

Quote:
Originally Posted by samuel337 View Post
6. I'd be interested in how you allow the user to layout the gadgets on the screen...
Sam
I just started looking at xml files a few days ago. But I think it should be possible to have a user custom layout on the screen since every object (button etc) is defined by a ID. So lets say the program guide summary uses objects with ID 1-10, then its just to move those around or not show them at all, giving the user an impression that the plugin is not running.

Then its just to write a program which constructs/alters the xml code someway after the user´s requests. The program needs to know which ID range is assigned to which "gadget".

should work?

If this user config is not possible ill just go for a kitchen plugin with a fixed summary and interface from the MP system. This will be weather, next TV shows, news, today´s recordings, now playing, new mails, radio shortcut, my music shortcut. Agenda from Google calendar and stuff like that which needs information from the web will not be in the first version
magnuje2 is offline   Reply With Quote
Old 2006-12-28, 12:37   #4 (permalink)
Portal Member
 
Join Date: May 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Quote:
Originally Posted by samuel337 View Post
1
3. Try see if the weather plugin writes the data to the PropertyManager class. Plugins should do this, but they don't all comply. Otherwise you can get the weather settings from the MediaPortal.xml file using the MP config methods.
Sam
On os X system so cant look into the property manager class right now. But according to it´s name I am assuming this class holds plugin properties and not the current weather information I am interensted in? I would like to avoid doing the same web calls as the plugins itself since this information allready exists in the system.
magnuje2 is offline   Reply With Quote
Old 2006-12-28, 23:58   #5 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default

For the layout question - maybe taking a look at the on/off MP skin editor code is an option. Its in MP's SVN repository.

For the propertyManager question - nope. This class was designed to hold bits of information that various plugins get so that other plugins can use it too. For example, it holds information about the currently playing song, the next TV recording, the currently selected item on screen etc.

Sam
samuel337 is offline   Reply With Quote
Reply

Bookmarks

Tags
development, mygadgets, plugin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Development of Radio Plugin Poikilotherm Plugins 6 2006-06-26 18:14
Gathering topical infos about plugins (To: authors & use tomtom21000 Plugins 2 2006-02-05 00:20
HTTP remote plugin under development .... hagur Plugins 3 2005-08-13 13:58
Online Content Plugin in development samuel337 Plugins 5 2005-02-28 13:01


All times are GMT +1. The time now is 04:57.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden