23rd August 2008 - There was an issue with our name caching server at around 08:00AM GMT. It has been fixed.
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
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.
Can you start a DB transaction first?
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.
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
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
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
Return to HA Stuff - Powerhome
Users browsing this forum: No registered users and 1 guest