Stations V3-2

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: mmStations V2.3

Post by raybeau528 » Fri Nov 14, 2008 2:26 pm

The section looks fine, thanks. I found the problem and will update the install package shortly.

Ray

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: mmStations V2.3

Post by raybeau528 » Fri Nov 14, 2008 2:36 pm

Nyn, found the problem - new version is available in post 1.

Ray

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: mmStations V2.3

Post by nynaevelan » Fri Nov 14, 2008 2:42 pm

Betcha didn't think you would spend so much time developing this. :wink: BTW, the CopytoPlaylists is VERY handy when I am evaluating new tracks, makes it much easier to assign them to the appropriate playlist later. Thanks for both.... :D :D

Nyn
Last edited by nynaevelan on Sat Nov 15, 2008 9:38 pm, edited 1 time in total.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: mmStations V2.3

Post by nynaevelan » Fri Nov 14, 2008 3:05 pm

raybeau528 wrote:Nyn, found the problem - new version is available in post 1.

Ray
Thanks, that fixed it. :D

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: mmStations V2.3

Post by raybeau528 » Sat Nov 15, 2008 8:35 pm

Nyn, glad you liked that little copytoplaylist feature. The few scripts I've written I've done so because they support how I like to use MM. Suggestions such as yours help make it better. And speaking of suggestions, I'm thinking of adding a couple small buttons to the mmstation panel and was looking for inputs - perhaps randomize the selected playlist or something else related to the theme of mmStations. Space is limited in the horizontal layout but I could probably squeeze two buttons in the space of a station button - these would be in addition to the ten station buttons. Any thoughts?

Ray

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: mmStations V2.3

Post by nynaevelan » Sat Nov 15, 2008 10:44 pm

Ok:

I've had some time to think about it and I like the randomize option. Also, maybe an option that would take you to the last selected playlist but not sure how you would get that to work if you haven't selected a playlist within that session. I really cannot think of anything else in the theme of mmStations that would help. Of course as soon as I stop thinking about it, I'll probably have more ideas. :-?

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

fuzzynavel

Re: mmStations V2.3

Post by fuzzynavel » Mon Nov 17, 2008 2:27 am

Your 2.3 fix did it for me - everything is working very smoothly. Thanks so much!

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: mmStations V1.0

Post by nynaevelan » Sat Dec 20, 2008 9:08 pm

raybeau528 wrote:Nyn,

Here's a quick a dirty script to copy the Now Playing.

Code: Select all

'
' MediaMonkey Script
'
' NAME:  SaveNowPlaying
'
'
' [SaveNowPlaying]
' FileName=SaveNowPlaying.vbs
' ProcName=SaveNowPlaying
' Order=210
' DisplayName=Save NowPlaying
' Description=Save NowPlaying List to a PlayList
' Language=VBScript
' ScriptType=0
'
'

Option Explicit

Sub OnStartup	'Create Save NowPlaying Menu Item

  Dim itm1

  Set itm1 = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP,0,0)
  itm1.Caption = "Save NowPlaying"
  itm1.OnClickFunc = "SaveNowPlaying"
  itm1.UseScript = Script.ScriptPath
  itm1.IconIndex = 18
  itm1.Visible = True

End Sub 'OnStartup


Sub SaveNowPlaying(arg)

	Dim tree 				: Set tree = SDB.MainTree
	Dim SelectedPlayList	: Set SelectedPlayList = sdb.playlistbytitle( SDB.MainTree.CurrentNode.caption )	
	Dim SelectedSongList 	: Set SelectedSongList = SDB.CurrentSongList
	Dim NewSongList			: Set NewSongList = SDB.NewSongList


	Dim TopPlayList	: Set TopPlaylist = SDB.PlaylistByTitle("")
	Dim NewPlayList
	Set NewPlayList = TopPlayList.CreateChildPlaylist("Copy of NowPlaying "&dtnum)
	If not (NewPlayList is Nothing) Then
		NewPlayList.Clear
	End If
			
	NewPlayList.AddTracks(SDB.Player.CurrentSongList)

End Sub

' Returns a 14 char string which changes every second - should be unique for this application
function dtNum()
	
	dim y,m,d,h,n,s
	
	y = Cstr(DatePart("YYYY",Date))
	m = zfill(Cstr(DatePart("m",Date)),2)
	d = zfill(Cstr(DatePart("d",Date)),2)
	h = zfill(Cstr(DatePart("h",now)),2)
	n = zfill(Cstr(DatePart("n",now)),2)
	s = zfill(Cstr(DatePart("s",Now)),2)
	
	dtNum = y & m & d & h & n & s
	
end function


' Left fills with zeros
function zfill(s,n)

	dim i,t
	t=s
	while len(t) < n
		t = "0" & t
	wend
	zfill = t

end function
Ray:

Is it possible to add some kind of timer to this or better yet a way for it to save the NP list either or startup or shutdown??

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

rogerr
Posts: 106
Joined: Sat Nov 15, 2003 8:02 pm

Re: mmStations V2.3

Post by rogerr » Sun Dec 21, 2008 11:33 am

Nice script. Any chance you can enhance to be able to add MegaDJ playlists?

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: mmStations V2.3

Post by raybeau528 » Sun Dec 21, 2008 11:41 am

Nyn,

By timer, do you mean automatically save the nowplaying list every x minutes/seconds ? I can look at saving at startup or shutdown as well.

Rogerr,
Let me look into it. I believe a MegaDJ playlist is quite different than the MM playlists but almost anything's possible.


Ray

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: mmStations V2.3

Post by nynaevelan » Sun Dec 21, 2008 11:52 am

raybeau528 wrote:Nyn,

By timer, do you mean automatically save the nowplaying list every x minutes/seconds ? I can look at saving at startup or shutdown as well.


Ray
I would be content with a startup or shutdown autosave but if you could get it to save every hour or so that would be fantastic.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: mmStations V2.3

Post by raybeau528 » Sun Dec 21, 2008 12:15 pm

Nyn,

Your preference then would be to have it save the current playing song to the favorites playlist every hour? That should be doable.

Ray

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: mmStations V2.3

Post by nynaevelan » Sun Dec 21, 2008 12:18 pm

Ray:

No, not that one, the script you created to save the now playling list to a particular saved list. I'm ok with the favorites being a manual process.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: mmStations V2.3

Post by raybeau528 » Sun Dec 21, 2008 12:37 pm

Ah! That makes much more sense!

Ray

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: mmStations V2.3

Post by raybeau528 » Sun Dec 21, 2008 4:16 pm

Nyn,

This will trigger a copy every 1 hour. If you want to change the frequency, change the 1000*60*60 in this line:

Code: Select all

  Dim Tmr : Set Tmr = SDB.CreateTimer( 1000*60*60 )   ' 1 hour Timer Enabled
Where 1000 is for 1 second.


Code: Select all

'
' MediaMonkey Script
'
' NAME:  SaveNowPlaying
'
'
' [SaveNowPlaying]
' FileName=SaveNowPlaying.vbs
' ProcName=SaveNowPlaying
' Order=210
' DisplayName=Save NowPlaying
' Description=Save NowPlaying List to a PlayList
' Language=VBScript
' ScriptType=0
'
'

Option Explicit

Sub OnStartup	'Create Save NowPlaying Menu Item

  Dim itm1

  Set itm1 = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP,0,0)
  itm1.Caption = "Save NowPlaying"
  itm1.OnClickFunc = "SaveNowPlaying"
  itm1.UseScript = Script.ScriptPath
  itm1.IconIndex = 18
  itm1.Visible = True
  
  Dim Tmr : Set Tmr = SDB.CreateTimer( 1000*60*60 )   ' 1 hour Timer Enabled
  Tmr.Enabled=true
  Script.RegisterEvent Tmr, "OnTimer", "SaveNowPlaying"

End Sub 'OnStartup


Sub SaveNowPlaying(arg)

	Dim TopPlayList	: Set TopPlaylist = SDB.PlaylistByTitle("")
	Dim NewPlayList
	Set NewPlayList = TopPlayList.CreateChildPlaylist("Copy of NowPlaying "&dtnum)
	If not (NewPlayList is Nothing) Then
		NewPlayList.Clear
	End If
		
	NewPlayList.AddTracks(SDB.Player.CurrentSongList)

End Sub

' Returns a 14 char string which changes every second - should be unique for this application
function dtNum()
	
	dim y,m,d,h,n,s
	
	y = Cstr(DatePart("YYYY",Date))
	m = zfill(Cstr(DatePart("m",Date)),2)
	d = zfill(Cstr(DatePart("d",Date)),2)
	h = zfill(Cstr(DatePart("h",now)),2)
	n = zfill(Cstr(DatePart("n",now)),2)
	s = zfill(Cstr(DatePart("s",Now)),2)
	
	dtNum = y & m & d & h & n & s
	
end function


' Left fills with zeros
function zfill(s,n)

	dim i,t
	t=s
	while len(t) < n
		t = "0" & t
	wend
	zfill = t

end function

Post Reply