NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) UbuStream, Web Radio and Universe v
« Previous 1 … 4 5 6 7 8 Next »
M3U or PLS Files with UbuStream

 
  • 0 Vote(s) - 0 Average
M3U or PLS Files with UbuStream
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#11
2007-05-03, 12:06 AM
Captain-DJ Wrote:It works !!!

I have now the Ubustream V2.1
I used the "Podcast" plugin !!!
Cool. Cool

Quote:I have add an large text directly in the ubustream setup, but i can not scroll the text in gbpvr, is this correctly ?
Sorry. You can't scroll the description text currently. I'd like to add that capability for UbuStream v2.2.

Quote: Can i put an image (jpg) or an link to an image on my HD in the PLX file so that i see the text and the image ???
I am looking into how to add the ability to display an image for each station. Probably in v2.2

Quote:EDIT: Now i know why the description is not displayed....argh !... the Station name is now xxxxx.plx !
So no description and no website will be add to ubustream !
:-(
The Podcasts DynSource gets the Title and Description fields from the ID3 tag in the file (it assumes a podcast will be an mp3 file). It doesn't populate the Website field. If it can't find the ID3 tag, it uses the file name for the Title field (probably why you're getting funny station names).

So the Podcasts DynSource will get you so far but to get the results you really want, you'll need to write a DynSource app that does exactly what you want. For how to do this, read on.

Captain-DJ Wrote:I have read all docs, but i dont know what is to do ! I can write an program to convert an existing file to the plx format. Can i used an existing DynaSource plugin (with switches?) to only transmit this plx file to a Ubustream group...i only need this, the rest i make it myself
It's actually pretty simple (although probably not quite as simple as you'd like it to be Smile ). Lets assume your program will be called "PlaylistsDynSource.exe".

First, your program needs to check if it has been passed the "-sections" argument. If so, you will write out a PlaylistsSections.plx file, in the format described in the wiki docs. This will include an entry for each group you want UbuStream to create for you. So you could have one section per playlist file or one section for each folder of playlist files. You can either hard code the names or read them from some sort of config file. If you use a config file, it could also contain the path to the playlist file (or folder) associated with each section, which you'll need in the next step.

If your program is called with no arguments (without a -sections argument), you will write a PlaylistsPlaylist.plx file containing all the items you want to import. So you'll need to read each pls file, convert its entries to plx format and add them to the plx file. You'll use the same section names as the ones you wrote to the PlaylistsSections.plx file for the "Section1='' field for each item. (When UbuStream imports the plx file, it will create new stations for each item and will place the stations into the groups with the same name as the item's section entry.)

btw - the naming standard for the program and the files is important. UbuStream will not recognize them if they don't conform to the naming standard (ie. they are not naming "conventions").

If you really want to get ambitious, you could write a Windows form application to allow users to maintain the config file (to add/change sections and file/folder paths). I will be adding a Setup button to the UbuStream config app to support invoking this kind of app in the near future.

Once your DynSource app is working, you can run it automatically by using UbuStream's built in "autosynch at startup" feature which runs it each time you load the plugin or manually by using the AutoSynch button on the UbuStream menu. UbuStream v2.1 includes a separate app, UbuDynSourceUpdate.exe, which you can run from your PostUpdateEPG.bat, if you want to run your program daily, or you can use Windows Scheduler to run it more frequently (see this thread).

As I said, you can use any language to write a DynSource program as long as it does the things I described above. If you are familar with Visual Basic, you can use VB .Net which should allow you to use the common library, DynamicSource.dll, I've provided which takes care of a lot of the heavy lifting (including formatting and writing the plx files). I've attached a copy of the source code for the Podcasts DynSource app (it's written in C# but you should be able to see how you could do a similar thing in VB) to show you how simple this can be.
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
Captain-DJ
Offline

Member

Posts: 69
Threads: 17
Joined: Jul 2006
#12
2007-05-04, 10:31 AM (This post was last modified: 2007-05-04, 11:25 AM by Captain-DJ.)
Hello!
Now i have VB .net
Its really new for me but i wrote an program that converts my files.

When i start the exe with -sections it makes a "DJSections.plx" !!!!

In the folder are: DJDynSource.exe , DJSections.plx and a DJPlaylist.plx

UbuStream will not find my exe !
The "DJDynSource.Sections.log" is empty.
And wenn i start the Ubu Setup the DJSections.plx is deleted !

My Program do only convert a file and write the DJPlaylist.plx
Or must i include the dll ???

* Get_Sections()
* Get_Section_Items(SiteSection section)

Whats this ?
I don't want "to look" on a web page to import anything...so need the dll ???
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#13
2007-05-04, 10:42 PM
Captain-DJ Wrote:Hello!
Now i have VB .net
Its really new for me but i wrote an program that converts my files.

When i start the exe with -sections it makes a "DJSections.plx" !!!!
Great! Sounds like you're on the right track.

Quote: In the folder are: DJDynSource.exe , DJSections.plx and a DJPlaylist.plx
That looks right. You only need DJDynSource.exe in the Plugins\UbuStream\DynSource directory to start with because it will be generating the other two files.

Quote: UbuStream will not find my exe !
The "DJDynSource.Sections.log" is empty.
And wenn i start the Ubu Setup the DJSections.plx is deleted !
Do you get a message explicitly saying that UbuStream can't find your app? If it deleted your sections file, that implies that it at least "found" your app. Sounds like it ran your app but that it didn't generate a sections.plx file for some reason. Here's what should be happening:
  1. When you start the UbuStream config app, it will look for new DynSource apps and, if it finds one, invoke it with the -sections argument.
  2. Before it runs your app it will delete the old sections file (if it exists) in order to replace it with the new one.
  3. It then reads the DJSections.plx file that has been generated by your app and adds the new DynSource and its sections to the database.
  4. Any output from the DJDynSource.exe app that would normally (when run stand alone from the command line) be written to the console (standard output and standard error) will be written to the DJDynSource.Sections.log file.
  5. At this point, the new "DJ" DynSource should show up in the config app tree and the sections should show up in its DynSource panel.
Once you've got this far:
  • Pressing the Refresh Sections button will cause UbuStream to execute step 1, 2 and 3 again.
  • Pressing the Execute button will run your app without the -sections argument so it produces a DJPlaylist.plx file which UbuStream will then import into its database.
Quote:My Program do only convert a file and write the DJPlaylist.plx
Or must i include the dll ???

* Get_Sections()
* Get_Section_Items(SiteSection section)

Whats this ?
I don't want "to look" on a web page to import anything...so need the dll ???
You shouldn't need to use the dll if your app is already creating the two plx files correctly. The dll does a few things for you. You're right, you don't need its web page scraping functions. The only thing you could use it for (if you wanted to) is that, instead of writing the files yourself, you can simply populate an array of "section" and "section item" objects and the dll will take care of writing the files for you (eg. you add your sections to the array in Get_Sections() and then when you call Publish_Section_Names() in the Main method, the dll will call your Get_Sections() method and write the sections.plx file. Same thing with Get_Section_Items() and Publish_Site_Items() for writing the playlist.plx file. The source for the Podcasts DynSource app is a pretty good example of how this works.) But, as I said, you don't need to use it if your app is already taking care of creating the files.

Not sure why your app isn't working from UbuStream (You didn't include the exact error message you're getting). If you put your exe (and maybe your source code too) in a zip file and attach it, I'll take a look and see if I can figure out what the problem is. I'm going out of town for the weekend so I might not be able to get to it until Sunday night.
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
Captain-DJ
Offline

Member

Posts: 69
Threads: 17
Joined: Jul 2006
#14
2007-05-06, 03:30 PM
ubu Wrote:Great! Sounds like you're on the right track.

That looks right. You only need DJDynSource.exe in the Plugins\UbuStream\DynSource directory to start with because it will be generating the other two files.

Do you get a message explicitly saying that UbuStream can't find your app? If it deleted your sections file, that implies that it at least "found" your app. Sounds like it ran your app but that it didn't generate a sections.plx file for some reason. Here's what should be happening:
  1. When you start the UbuStream config app, it will look for new DynSource apps and, if it finds one, invoke it with the -sections argument.
  2. Before it runs your app it will delete the old sections file (if it exists) in order to replace it with the new one.
  3. It then reads the DJSections.plx file that has been generated by your app and adds the new DynSource and its sections to the database.
  4. Any output from the DJDynSource.exe app that would normally (when run stand alone from the command line) be written to the console (standard output and standard error) will be written to the DJDynSource.Sections.log file.
  5. At this point, the new "DJ" DynSource should show up in the config app tree and the sections should show up in its DynSource panel.
Once you've got this far:
  • Pressing the Refresh Sections button will cause UbuStream to execute step 1, 2 and 3 again.
  • Pressing the Execute button will run your app without the -sections argument so it produces a DJPlaylist.plx file which UbuStream will then import into its database.
You shouldn't need to use the dll if your app is already creating the two plx files correctly. The dll does a few things for you. You're right, you don't need its web page scraping functions. The only thing you could use it for (if you wanted to) is that, instead of writing the files yourself, you can simply populate an array of "section" and "section item" objects and the dll will take care of writing the files for you (eg. you add your sections to the array in Get_Sections() and then when you call Publish_Section_Names() in the Main method, the dll will call your Get_Sections() method and write the sections.plx file. Same thing with Get_Section_Items() and Publish_Site_Items() for writing the playlist.plx file. The source for the Podcasts DynSource app is a pretty good example of how this works.) But, as I said, you don't need to use it if your app is already taking care of creating the files.

Not sure why your app isn't working from UbuStream (You didn't include the exact error message you're getting). If you put your exe (and maybe your source code too) in a zip file and attach it, I'll take a look and see if I can figure out what the problem is. I'm going out of town for the weekend so I might not be able to get to it until Sunday night.

Hello!

I get no error message. I tested with "-sections" and my program generates an sections.plx.
Now i hav add an text output to the Programm, the text "Write Section" and "Write playlist" will now generate. In the log i see the "Write section" entry but my DynaSource program will not be found.
I add all files in a zip file. The "myKino.my" have a "bug", so there are no URL´s , but this is a other problem. When i add a Station manually with the data of the myKino.my it works, in the file are " / , . and other letter, but its no problem for UbuStream.

First the plx file were written in UTF-8 , i correct this and now it will make ASCII files...but the same problem: UbuStream will not find my Program.
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#15
2007-05-07, 07:57 AM
Captain-DJ Wrote:I get no error message. I tested with "-sections" and my program generates an sections.plx.
Now i hav add an text output to the Programm, the text "Write Section" and "Write playlist" will now generate. In the log i see the "Write section" entry but my DynaSource program will not be found.
Your program is running fine. Unfortunately you are writing your plx files to the "current" directory (which, when UbuStream executes your program, will be "gbpvr\Plugins") whereas UbuStream is expecting to read them from the "gbpvr\Plugins\UbuStream\Dynsource" directory. I think if you change:

Dim path5 As String = "DJSections.plx"

to

Dim path5 As String = "..\\UbuStream\\DynSource\\DJSections.plx"

(and the same for the playlist plx file), you'll find that UbuStream will run your program OK. I "faked" it into doing this and the DJ DynSource showed up under DynSources with one section, "myKino", displayed in the sections list.

Quote:I add all files in a zip file. The "myKino.my" have a "bug", so there are no URL´s , but this is a other problem. When i add a Station manually with the data of the myKino.my it works, in the file are " / , . and other letter, but its no problem for UbuStream.
Yes, I see that your playlist.plx file is not quite complete. I assume you'll be adding the URLs when you get them.

Quote:First the plx file were written in UTF-8 , i correct this and now it will make ASCII files...but the same problem: UbuStream will not find my Program.
I think that .Net defaults to UTF-8 but ASCII should work OK. Both should work fine (as long as the files are written to the correct location Smile ).
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
Captain-DJ
Offline

Member

Posts: 69
Threads: 17
Joined: Jul 2006
#16
2007-05-07, 10:43 PM
ubu Wrote:Your program is running fine. Unfortunately you are writing your plx files to the "current" directory (which, when UbuStream executes your program, will be "gbpvr\Plugins") whereas UbuStream is expecting to read them from the "gbpvr\Plugins\UbuStream\Dynsource" directory. I think if you change:

Dim path5 As String = "DJSections.plx"

to

Dim path5 As String = "..\\UbuStream\\DynSource\\DJSections.plx"

(and the same for the playlist plx file), you'll find that UbuStream will run your program OK. I "faked" it into doing this and the DJ DynSource showed up under DynSources with one section, "myKino", displayed in the sections list.

Yes, I see that your playlist.plx file is not quite complete. I assume you'll be adding the URLs when you get them.

I think that .Net defaults to UTF-8 but ASCII should work OK. Both should work fine (as long as the files are written to the correct location Smile ).

Cool it works !!!
Thats the problem, i cant believe it :-)

Thanks for your help !!!
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#17
2007-05-07, 11:02 PM
Captain-DJ Wrote:Cool it works !!!
Thats the problem, i cant believe it :-)

Thanks for your help !!!
No problem.

Will you be sharing this with the rest of us when you get it working to your satisfaction? (ie. myKinoDynSource.exe or something). Maybe you could add code to download the myKino playlist file as well, so the whole process is automated?

Glad you got it working. (I told you it was pretty simple to write a DynSource app Wink ).
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
Captain-DJ
Offline

Member

Posts: 69
Threads: 17
Joined: Jul 2006
#18
2007-05-08, 09:54 AM
ubu Wrote:No problem.

Will you be sharing this with the rest of us when you get it working to your satisfaction? (ie. myKinoDynSource.exe or something). Maybe you could add code to download the myKino playlist file as well, so the whole process is automated?

Glad you got it working. (I told you it was pretty simple to write a DynSource app Wink ).

Yes, i can share my Program, but the program from http://www.myKino.info is not a program from me. I have wrote the programmer that is an bug in the program (http://www.kino.de has change the webpage) but i don´t get any answer. So i must wait ....
myKino grab the url of cinema trailer and the cinemas in your city with starttimes from this webpage, my program only converts the files. I don´t find any other program for germany that do this.
So i must wait ... there is an sourcecode from an older version on his webside...but i don´t can make this !
ubu
Offline

Posting Freak

Posts: 792
Threads: 54
Joined: Jan 2006
#19
2007-05-08, 10:11 AM
Captain-DJ Wrote:Yes, i can share my Program, but the program from www.myKino.info is not a program from me. I have wrote the programmer that is an bug in the program (www.kino.de has change the webpage) but i don´t get any answer. So i must wait ....
myKino grab the url of cinema trailer and the cinemas in your city with starttimes from this webpage, my program only converts the files. I don´t find any other program for germany that do this.
So i must wait ... there is an sourcecode from an older version on his webside...but i don´t can make this !
Hopefully, he'll fix the program to reflect the new format of the www.kino.de web site. If not, you could write your own "HTML scraper". It's not too difficult. That's where the DynamicSource dll comes in handy. Take a look at the source code for the sample apps in the DynSource Application Development Kit. They're in C# but you should be able to figure out how to do the same things using VB (especially since they use .Net framework functions which are common between both languages).
[SIZE=1]GBPVR v1.3.11 [/SIZE][SIZE=1]HVR-1250, [/SIZE][SIZE=1]ES7300[/SIZE][SIZE=1], 4GB, GeForce 9300, LianLi, Vista.[/SIZE]
[SIZE=1]GBPVR v1.0.08 [/SIZE][SIZE=1]PVR-150, [/SIZE][SIZE=1]P4 2.26GHz, [/SIZE][SIZE=1]1GB,[/SIZE][SIZE=1] GeForce 6200, [/SIZE]Coupden, XP[SIZE=1]
[/SIZE]

Author: UbuStream plugin, UbuRadio plugin, EPGExtra utility.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  Ubustream not working preview neither timeshitf play Toni 2 3,041 2009-05-27, 07:59 PM
Last Post: Toni
  Imposible to start ubustream Toni 3 3,087 2009-05-27, 12:02 PM
Last Post: Toni
  UbuStream plugin - support ubu 42 44,830 2009-03-26, 12:41 AM
Last Post: am2pgs
  UBUStream and version 1.3.11 seansco 10 6,487 2009-03-11, 01:07 PM
Last Post: seansco
  Using Ubustream with MediaMVPs jbyram2 33 39,716 2008-12-12, 04:50 PM
Last Post: jbyram2
  No mouse in web pages from Ubustream 2.2 aa7 0 2,361 2008-03-21, 04:13 AM
Last Post: aa7
  Run external app before UbuStream playback? sgilani 9 4,206 2008-03-16, 05:09 AM
Last Post: sgilani
  YouTube not working via VLC/Ubustream gazoo 4 4,884 2008-03-10, 03:16 PM
Last Post: gazoo
  uefa futsal in ubustream? sglebs 0 2,138 2008-03-02, 03:14 AM
Last Post: sglebs
  Ubustream in PVRX2 markfarey 4 3,759 2008-02-27, 02:42 AM
Last Post: markfarey

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode