NextPVR Forums

Full Version: AutoSync DynSources with Windows Scheduler
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ubu...

Is there a way in UbuStream2 to use Windows Scheduler to autosynch dynsources?

Rather than have to wait for the the AutoSynch option within GBPVR to complete (being impatient as I am), I'd like to have the latest clips available 'on demand', having been updated at scheduled times throughout the day with Windows Scheduler.

If not, perhaps this is something you may like to consider in a future version.

Oh, and while I'm on my wish lists, have you considered displaying a jpg file that may be associated with the clip? Presumably, this may need to be cached having been downloading during a synch. And is it possible to display the 'description' of the clip as the clip is selected, rather than having to select 'details'? (Is this a simple skin update - something I've zero experience with)

Thanks again!
ralphy Wrote:Ubu...

Is there a way in UbuStream2 to use Windows Scheduler to autosynch dynsources?

Rather than have to wait for the the AutoSynch option within GBPVR to complete (being impatient as I am), I'd like to have the latest clips available 'on demand', having been updated at scheduled times throughout the day with Windows Scheduler.

If not, perhaps this is something you may like to consider in a future version.
Not a bad idea. I'd have to write a wrapper to encapsulate the Dynamic Source downloads and the importing of the PLX files so it could be run as a standalone executable. Then you could use the Windows Scheduler or, even easier, just add it to your PostUpdateEPG.bat file so it would get run once a day when your EPG update was triggered by GB-PVR.

Quote:Oh, and while I'm on my wish lists, have you considered displaying a jpg file that may be associated with the clip? Presumably, this may need to be cached having been downloading during a synch.
I've thought about this. Two things have stopped me. How many people actually have a jpg they want to associate with a stream they put in the station database? Dynamic Source apps are probably an exception since they may have access to an image for each item they scrape from a web page (or at least a link to one). The other problem is real estate. If I change the skin to allow an image to be displayed in the station list that means you can fit less stations on the page. It might be better to put them on the station pop-up dialog (see next item).

Quote:And is it possible to display the 'description' of the clip as the clip is selected, rather than having to select 'details'? (Is this a simple skin update - something I've zero experience with)
In v2.1, selecting the station in the list will cause a pop-up dialog to appear (somewhat like UbuRadio). This will contain buttons for playing the station with Preview, Timeshift or External players and also one to bring up the Web schedule for the station. It will also contain the description text along with the player type, default playback mode and the URL. So the old Description button is now gone from the menu. (You will still be able to play the currently highlighted station by using the Play button on your remote control or the Play button on the menu. That will simply play the station using its default playback mode without having to use the pop-up.)
ubu Wrote:Then you could use the Windows Scheduler or, even easier, just add it to your PostUpdateEPG.bat file so it would get run once a day when your EPG update was triggered by GB-PVR.

Since new streams are typically updated regularly throughout the day, I'd be using the wrapper solution that allows several updates during the day with scheduler.

ubu Wrote:Dynamic Source apps are probably an exception since they may have access to an image for each item they scrape from a web page (or at least a link to one). The other problem is real estate.

My concept is that the image would display as each clip is selected, rather than permanently display with the title. A good spot could be loc="13,340" size="150,110". This should be out of the way of any of the version 2.0 text, and although small, should be acceptable.
ralphy Wrote:My concept is that the image would display as each clip is selected, rather than permanently display with the title. A good spot could be loc="13,340" size="150,110". This should be out of the way of any of the version 2.0 text, and although small, should be acceptable.
You're thinking more of a pop-up image, then. And it would only "pop up" if an image was available. So for UbuStream users who just use manually entered stations (for which they don't have an image), it would be transparent. That could work.

If you want to go ahead and write a little prototype for what you have in mind, I'll look into incorporating it.
Thanks Ubu for this wrapper. [ATTACHMENT NOT FOUND]. Extract this file into the Plugins folder containing UbuStreamPlugin.dll (refer to http://forums.nextpvr.com/showthread.php?t=24713)

I like to update my dynsource three time a day, to coincide with when the daily news streams are updated so I don't have to wait for the latest clip URL's to be downloaded and put into the playlists when I want to watch.

Here's what I do to get this to work with Windows Scheduler. The trick is to get the program to run minimised - my solution may not be the most elegant, but it seems to work
  1. If you want to have a log file, create a batch file in the plugins directory
    Code:
    UbuDynSourceUpdate.exe > UbuDynSourceUpdate.log
  2. Create a shortcut to this batch file, or to UbuDynSourceUpdate.exe if you don't need the log file.
  3. select the properties of the shortcut/link file, and choose to run "minimised"
  4. Create a new task in Windows Scheduler. (Accessories, System Tools, Scheduled Tasks, or through the control panel in XP). There are many sites to show how to do this (example). NB: You have to 'manually' enter the path and file name of the link file. If you click browse to search for the link file, it won't work, since the batch file will be selected instead.
Ubu,

This wrapper has been working well on my system in conjunction with Windows Scheduler to automatically update my dynamic sources.

The only problem is that sometimes the dynsource app's are throwing expections, and as a result, UbuDynSourceUpdate doesn't seem to complete updating the remaining dynamic sources.

Is it possible to catch these errors and skip the offending dynsource and move on to the next dynamic source?
ralphy Wrote:Ubu,

This wrapper has been working well on my system in conjunction with Windows Scheduler to automatically update my dynamic sources.

The only problem is that sometimes the dynsource app's are throwing expections, and as a result, UbuDynSourceUpdate doesn't seem to complete updating the remaining dynamic sources.

Is it possible to catch these errors and skip the offending dynsource and move on to the next dynamic source?
Good point! I've added error trapping code to the DynSource download step so it should write the error to the log (stdout) and then continue with the next DynSource app. I've also changed it so that it will import each plx file as it is created. (The old version ran all the downloads before starting the imports).

I haven't had a chance to test the new version. It will be included in the new installer which I'll put together today. If you wouldn't mind testing it for me, I'd be grateful.
Thanks Ubu,

ubu Wrote:It will be included in the new installer which I'll put together today. If you wouldn't mind testing it for me, I'd be grateful.


I'm not sure if the wiki includes the new wrapper - I tried testing it and the update comes up with an exception error on BBC (no surprise), but doesn't continue with the rest of the dynsources.
ralphy Wrote:I'm not sure if the wiki includes the new wrapper - I tried testing it and the update comes up with an exception error on BBC (no surprise), but doesn't continue with the rest of the dynsources.
My bad. I was trapping errors from the download step (running the DynSource app) but not from the import step (which is where the BBC one is having a problem - the app must be creating a bad plx file). I've fixed that and updated the wiki install app so, if you reinstall, you should find that it will continue with the other dyn sources after printing the error message.

BTW - forgot to mention that your NineMSN DynSource is looking good. You seem to be writing quite a bit of code these days. Maybe I should harness your skills and persuade you to help me out with working on the UbuStream code. Smile