Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11

Thread: pls file

  1. #1
    Join Date
    Feb 2005
    Location
    Mn
    Posts
    770

    pls file

    How could you use a pls file with ams like shoutcast uses.
    Code:
    [playlist]
    numberofentries=3
    File1=http://209.51.162.170:9002
    Title1=(#1 - 47/700) [9412] 9412 - The Rock Station. More Live DJs than any other station on the Internet!
    Length1=-1
    File2=http://216.110.12.110:8100
    Title2=(#2 - 9/100) [9412] 9412 - The Rock Station. More Live DJs than any other station on the Internet!
    Length2=-1
    File3=http://195.225.46.202:9000
    Title3=(#3 - 111/1000) [9412] 9412 - The Rock Station. More Live DJs than any other station on the Internet!
    Length3=-1
    Version=2
    Thats a pls file .

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    One idea would be to convert it to an .m3u file on the fly and serve it in the Windows Media Player...

    http://www.scvi.net/pls.htm

  3. #3
    Join Date
    Feb 2005
    Location
    Mn
    Posts
    770
    How would you convert it?

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Based upon what that link says they are both just plain text files with a slightly different format so I'd just figure it out the long way personally.

  5. #5
    Join Date
    Feb 2005
    Location
    Mn
    Posts
    770
    Thanks Corey, I'm looking for some converter right now but if I can't find one I may try to do one in autohotkey.

  6. #6
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Quote Originally Posted by bobbie
    Thanks Corey, I'm looking for some converter right now but if I can't find one I may try to do one in autohotkey.
    Bobbie,

    I think you can use http.download for the PLS file somewhere to a Temp folder, and then parse the data to your ListBox, Tree or Combo.
    Newbie Examples
    ------> AMS 7.5 : amstudio.azman.info
    ----> AMS 6 & 5: www.azman.info/ams/
    ----> FB: facebook.com/GuideToWealth

    ----> Content Development Blog: www.AZMAN.asia

  7. #7
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    INI Actions use time on that file?
    Intrigued

  8. #8
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Here is a very basic (but working) example using the Debug ('ger) object for output.

    http://www.amsuser.com/ams/examples/...-Intrigued.apz

    What I did:

    I copied the data you posted into a text file and saved it with the .ini extension.

    Then I put that file into a blank AMS 6 project's Docs folder.

    Then I put the following code in the On Show event area:
    Code:
    Debug.ShowWindow(true)
    
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "numberofentries").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "File1").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Title1").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Length1").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "File2").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Title2").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Length2").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "File3").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Title3").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Length3").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Version").."\r\n")
    Intrigued

  9. #9
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Updated!

    I just included the MediaPlayer (no error checking though) to show how to play one of the ('File1') file paths supplied in the config. file you posted.



    (redownload the .apz if needed)

    Updated code:

    Code:
    Debug.ShowWindow(true)
    
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "numberofentries").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "File1").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Title1").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Length1").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "File2").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Title2").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Length2").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "File3").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Title3").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Length3").."\r\n")
    Debug.Print(INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "Version").."\r\n")
    
    MediaPlayer.Load("Plugin1", INIFile.GetValue("AutoPlay\\Docs\\test.ini", "playlist", "File1"))
    
    MediaPlayer.Play("Plugin1")
    Intrigued

  10. #10
    Join Date
    Feb 2005
    Location
    Mn
    Posts
    770
    Thank you, will have a look at this.

  11. #11
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    NP. If you need too... just make a copy of the .pls (?) file and rename it with a .ini extension to use this project's code.

    Intrigued

Similar Threads

  1. Audio Tracks Project
    By Michael in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 03-18-2004, 10:58 PM
  2. HOWTO: Create a Project Template
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-28-2002, 01:49 PM
  3. Can search allow manual browse even if file is found?
    By RichardShaw in forum Setup Factory 5.0
    Replies: 2
    Last Post: 08-28-2000, 06:08 PM
  4. Replies: 0
    Last Post: 08-17-2000, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts