Picture of the Day for MP1 (1 Viewer)

J-B-N

Portal Pro
December 29, 2005
196
20
Sweden
Home Country
Sweden Sweden
Hi, I had a few moments over so I decided to write a small plugin for Mediaportal 1, mostly for fun and keeping my coding skills fresh. I am no longer an active programmer and have never professionally coded in C#. Using the template plugin from the Wiki made the start really simple!

Anyhow, I decided to write a plugin that download Bings daily image. I also noticed there is one for Mediaportal 2. The idea is simple – I want a new background image every day.

I now have a few questions:
  1. I opted for a solution that downloads the Bing image to a theme directory in the Titan skin folder. Is there a smarter way?
  2. The most important issue is that I want to be able to refresh the background image from a background/separate thread. I simply start a background worker in the plugin Init and download a fresh image if needed. When the download has completed I want to refresh the background – how do I do that? I found code on how to do a skin refresh from the GUI (for the manual download).
  3. Lastly, is the recommended way to run code periodically to start a new thread and have it called after a while? I am thinking about checking for a new image every 3 hours or something.
Any help is appreciated!
 

Users who are viewing this thread

Top Bottom