23rd August 2008 - There was an issue with our name caching server at around 08:00AM GMT. It has been fixed.

Song List

HA... VIA Powerhome

Re: Song List

Postby TonyNo on Thu Aug 21, 2008 12:13 am

INI? You mean VBS?
TonyNo
 
Posts: 351
Joined: Sat Mar 17, 2007 3:53 pm
Location: Illinois USA

Re: Song List

Postby TonyNo on Thu Aug 21, 2008 12:21 am

Works fine.

Also need a Home button (centered on current track). :D
TonyNo
 
Posts: 351
Joined: Sat Mar 17, 2007 3:53 pm
Location: Illinois USA

Re: Song List

Postby JakeBullet on Thu Aug 21, 2008 8:12 am

Add this to your CASE statement


Code: Select all


Case "HOME"
    Dim vLst, sCurrentSong, nNewPage
    '--- this is the current playing song - get from PH
    sCurrentSong = .Cargo_Item("LST_CURR_SEL")  '---- NOTE HERE!!!!!!!!!!!!!!
    '--- store the lst items in a tmp var
    vLst = .Cargo_Item("LST_ITEMS")
    '--- now search
    For xx = 0 To UBound(vLst)
        If sCurrentSong = vLst(xx) Then
            '--- we found it!   Calc the new page
            nNewPage = (Int(xx / .Cargo_Item("LST_PAGE_SIZE")) + 1)
            SongListManage "SHOW_PAGE", nNewPage '--- show the new page
            .Cargo_Add nNewPage, "LST_CURR_PAGE" '--- store the current page
            Exit For
        End If
    Next




In the above code...
Look at the NOTE HERE
That needs to have the name of the current playing song, you can change the var name but it needs to contain the current song.


and


Create your new home button and add this code
SongListManage "HOME",0
JakeBullet
Site Admin
 
Posts: 1102
Joined: Thu Mar 23, 2006 8:13 am

Re: Song List

Postby JakeBullet on Thu Aug 21, 2008 8:16 am

And when you ready... did you have a speed issue on the PH end?
JakeBullet
Site Admin
 
Posts: 1102
Joined: Thu Mar 23, 2006 8:13 am

Re: Song List

Postby TonyNo on Thu Aug 21, 2008 11:51 am

My Home routine just jumped to the current playlist position since I know its track number ( ph_winampinfo("listpos", 0, 0) ). I'll play with implementing that.

Yes, PH took 2-3 minutes to read and store a 2,000 element list. :D This is where my paging scheme came from.
TonyNo
 
Posts: 351
Joined: Sat Mar 17, 2007 3:53 pm
Location: Illinois USA

Re: Song List

Postby JakeBullet on Thu Aug 21, 2008 1:08 pm

So the time issue is adding all the songs into a global var?

How about in PH putting the playlist in a tmp table and from EH

And do something like this???

"ph_rtne (ph_sqlselect(10, 'select * from tmp_table')) + ph_gethtmldata(10) + ph_rtne(ph_sqldestroy(10))"

hhhmmmmm...
JakeBullet
Site Admin
 
Posts: 1102
Joined: Thu Mar 23, 2006 8:13 am

Re: Song List

Postby TonyNo on Thu Aug 21, 2008 5:31 pm

No, the time issue was loading the playlist into a table in PH's DB. Also, it's too big for a Global.
TonyNo
 
Posts: 351
Joined: Sat Mar 17, 2007 3:53 pm
Location: Illinois USA

Re: Song List

Postby JakeBullet on Thu Aug 21, 2008 7:42 pm

More then 1 way to skin this cat. (sorry Simba) :D
I will get you something you can run from PH that will grab the winamp list, clean it up and write a text file.
JakeBullet
Site Admin
 
Posts: 1102
Joined: Thu Mar 23, 2006 8:13 am

Re: Song List

Postby JakeBullet on Thu Aug 21, 2008 7:54 pm

TonyNo wrote:No, the time issue was loading the playlist into a table in PH's DB. Also, it's too big for a Global.


aaaaaaaaaaahhhhhhhhhhhh...
Can you start a DB transaction first?
JakeBullet
Site Admin
 
Posts: 1102
Joined: Thu Mar 23, 2006 8:13 am

Re: Song List

Postby TonyNo on Thu Aug 21, 2008 9:57 pm

Can you start a DB transaction first?

Huh? :?

Saving the playlist to a file is kind of redundant as there is an M3U playlist already, which is almost plain-text.

This is why I was only looking at 7 songs at a time. Keep it simple. :lol:
TonyNo
 
Posts: 351
Joined: Sat Mar 17, 2007 3:53 pm
Location: Illinois USA

Re: Song List

Postby JakeBullet on Fri Aug 22, 2008 6:23 am

TonyNo wrote:
Can you start a DB transaction first?

Huh? :?

Saving the playlist to a file is kind of redundant as there is an M3U playlist already, which is almost plain-text.

This is why I was only looking at 7 songs at a time. Keep it simple. :lol:


Keep it simple? LOL Come on! hehehehe We live in the age of giga-ram, giga-hard drives, giga-hertz and giga-fast food!
And you want to keep it simple? :P :P :P :P :P

send me your M3U playlist. I pull together some code to just read it into EH

Your 2 to 3 minutes in PH is disk access time. A transaction puts everything in memory and when done then commits it to disk. Basically 1 disk write as opposed to 2000.
JakeBullet
Site Admin
 
Posts: 1102
Joined: Thu Mar 23, 2006 8:13 am

Re: Song List

Postby JakeBullet on Sat Aug 23, 2008 10:50 am

New init code for your VBS file...

Code: Select all
Case "INIT"
        '--- initing! just a flag to let us know
            .Cargo_Add "1", "LST_INIT"
   
            .Cargo_Add sVars, "LST_PAGE_SIZE"
            .Cargo_Add UBound(Cargo_Item("LST_ITEMS")), "LST_ITEM_TTL"

            '--- calc total pages
            Dim nTotalPage, nAddOne
       nAddOne = IIf(((.Cargo_Item("LST_ITEM_TTL") + 1) Mod (sVars)), 1, 0)
       nTotalPage = Int(cInt(.Cargo_Item("LST_ITEM_TTL") + 1) / (sVars)) + nAddOne

        '--- store total pages   
            .Cargo_Add nTotalPage, "LST_PAGES_TTL"

             '--- store current page
             .Cargo_Add 1, "LST_CURR_PAGE"

            '--- show the 1st page
       SongListManage "SHOW_PAGE",1



New code for the init in the screen designer.

Code: Select all
       
      dim v, o
       Set o = CreateObject("eHomeWinampHelper.clsStart")
       v = o.BuildListTonyNo("e:\tony.m3u") '--- point to YOUR playlist file
       g_oGbl.Cargo_Add v,"LST_ITEMS"
                                   
       SongListManage "INIT","5"  '--- 5 is the total labels


I sent you that DLL. Remember to register it. Speed is no problems as this is real fast!
Questions?
JakeBullet
Site Admin
 
Posts: 1102
Joined: Thu Mar 23, 2006 8:13 am

Re: Song List

Postby TonyNo on Sat Aug 23, 2008 4:49 pm

Ha! Yeah, it's fast enough! :D

I think there is a problem with the Home function (mismatch between what eH uses and what PH uses for the track name). I'll try to just load the index directly...

Yup! Works!

Code: Select all
      Case "HOME"
         Dim vLst, sCurrentSong, nNewPage
         xx = ehCleanUpCRLF(g_oGbl.EH_PH_CALL_RETVAR("ph_winampinfo( 'listpos', 0, 0)")) + 2
         nNewPage = (Int(xx / .Cargo_Item("LST_PAGE_SIZE")) + 1)
              SongListManage "SHOW_PAGE", nNewPage '--- show the new page
              .Cargo_Add nNewPage, "LST_CURR_PAGE" '--- store the current page


Now to figure out if I can center the current track in the list when I hit Home...
Last edited by TonyNo on Sat Aug 23, 2008 5:00 pm, edited 1 time in total.
TonyNo
 
Posts: 351
Joined: Sat Mar 17, 2007 3:53 pm
Location: Illinois USA

Re: Song List

Postby JakeBullet on Sat Aug 23, 2008 4:59 pm

Thought you would like the speed... :)
Anything else?
JakeBullet
Site Admin
 
Posts: 1102
Joined: Thu Mar 23, 2006 8:13 am

Re: Song List

Postby TonyNo on Sat Aug 23, 2008 5:01 pm

Oops! That's what I get for editing a post! :oops:

I'm playing with the paging and such per the last line of my previous post.
TonyNo
 
Posts: 351
Joined: Sat Mar 17, 2007 3:53 pm
Location: Illinois USA

PreviousNext

Return to HA Stuff - Powerhome

Who is online

Users browsing this forum: No registered users and 1 guest



FREE FORUM Hosting by AtFreeForum. Create your Free WEB FORUM Hosting now!
GROUP DISCUSSION Features - Free FORUM HOSTING Directory Listing - DISCUSSION FORUM Terms of Service - FREE PHPBB Hosting Privacy
- FASHION ACCESSORIES
cron