Writing /home/myplugin/public_html/activewinamp/data/cache/c/c97a6972a622628661cf2bb0c4945ebf.i failed
Writing /home/myplugin/public_html/activewinamp/data/cache/c/c97a6972a622628661cf2bb0c4945ebf.i failed
Writing /home/myplugin/public_html/activewinamp/data/cache/c/c97a6972a622628661cf2bb0c4945ebf.xhtml failed
' +-------------------------------------------------------+
' | playlist_Auto Party PlayList.vbs 3/01/2007 (15 track) |
' +-------------------------------------------------------+
' This Script has been Remanufactured  by Morris Hanson, mrrrhanson yahoo.com
' From the Script called "Party Shuffle v2.8"
'
' Automatically enqueues a random song, from Search Query or "all audio"
'
'1) Default: Use all audio files from Media List
'	Can Use the Search Arguments passed from a Calling Script.
'
'2) If Playlist is populated, Script leaves those items in playlist,
'	then adds new items as the list is shortened to less than 15
'   Loads 15 items if playlist is empty, then replaces removed items to keep total at 15.
'
'3) Extra or Repeats are easyly added by user (for the great songs)
'	User added tracks are not considered, so may be played again by the script later.
'
'4) Activated via the Script menu.
'	If You run many scripts at the same session, all will quit when stopped.
'	Each Script quits when all selections have been played.
'	If you clear the playlist, The Script Quits After the item playng is done.
'
'5) On track change, maintains PL item total if any have been removed, skipped, etc.
'
'6) Starts play at #1 or current position, plays till #5 then shifts playlist till selections are used up. 
'	Starts Play OR Continues playing when loaded.
'
'7) Use a Scripting Dictionary keeps track of unplayed items.
'	The Items are randomly pulled out of the Dictionary.
'
'8) Shows Status and Result Messages on line 1.
'
'Issues: 1) Removeing/Moveing/Editing a Song FileName on your Disk, before it is played, would be a problem.
'
'===============
 option explicit
 Dim mlq, i, Dict1, KeyList, Track, tmp, SearchData
 Set Dict1 = CreateObject("Scripting.dictionary")
'---------------------
 If len(ARGuments) < 5 then
	SearchData = "type=0 and rating > 2"	'Edit This Line for your Custom Default Search Pattern
 Else
	SearchData = Arguments
 End If
'---------------------
 mlq = MediaLibrary.RunQueryArray(SearchData)
'---------------------
 If ubound(mlq) > 0 Then
	i = 0
	For each track in mlq
	 Dict1.add i,track.filename
	 i = i + 1
	Next
 
	Call Application_ChangedTrack
 
 Else
	LoadItem("~~ Auto Party PlayList Found ~> NO <~ Matching Files For ~> " &SearchData &" <~ Try Again! ~~").enqueue
	Set Dict1 = Nothing
	Quit
 End If
'------
	If PlayState<>1 then play
 
 
'============================
 Sub Application_ChangedTrack
'============================
 Do while playlist.position>5	'Delete lower play.position to 6 to keep balanced 
	playlist.deleteindex(1)
 Loop
 
 Do while (playlist.count<15)	'fill the PL if needed (up to 15)
  If Dict1.count >0 Then 
	Randomize
	KeyList  = Dict1.Keys
	tmp = KeyList(int(Dict1.count*Rnd))
	LoadItem(Dict1.Item(tmp)).enqueue
	Dict1.Remove(tmp)
  End If
  If Dict1.count =0 Then 
	LoadItem("~~ Auto Party PlayList ~~> Last Of ~> " &ubound(mlq) &" <~ Selections ~~> " &SearchData &" <~~").enqueue
	Set Dict1 = Nothing
	Quit
  End If
 Loop
 
 PlayList.deleteindex(1)
 LoadItem("~~ Party PlayList At Work! ~> "&SearchData&" <~ With ~> " &Dict1.count &" Of "  &ubound(mlq) &" <~ Items Left ~~").Insert 0
 
'=======
 End Sub
'=======
 
 
'=============================
 Sub Application_ChangedStatus
'=============================
 If PlayState=0 Then		'Exit if state has changed to stopped
	PlayList.deleteindex(1)
	LoadItem("~~ Party PlayList Cancelled! ~> " &SearchData &" <~ Leaving ~> " &Dict1.count &" Of " &ubound(mlq) &" <~ Items ~~").enqueue
	Set Dict1 = Nothing
	Quit
 End If
'=======
 End Sub
'=======
 
examples/playlist/auto_party_playlist.txt · Last modified: 2007/03/02 07:54 by 24.111.253.64
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Music Plugins