Stations V3-2

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

Re: mmStations V1.0

Post by nynaevelan » Fri Nov 07, 2008 2:17 pm

raybeau528 wrote:nyn, 1. when you requested to not include the parent playlist are you referring to not listing it in the pulldown?
If so, I can look into it. Probably wouldn't be too difficult.
Yes the pulldown was what I was referring to, if the playlist doesn't have any tracks it would be nice if it wasn't included in the list. I have over 100 playlists so if I can make the list any smaller that would be great.
raybeau528 wrote: 2. not expanding the playlist - yeah, that isn't very elegant or user friendly. That was kind of what motivated me to
create this in the first place. So that I could quickly invoke a set of playlists without scanning through the list.
At best, I think I could unexpand up to the first level. With this implementation, as you saw, I had to create a
playlist and then set focus to it but as I'm writing this I'm thinking I could probably unexpand it all. It's on the list!
Thanks. :D
raybeau528 wrote: 3. It should be relatively easy to create a playlist and send the tracks from the now playing to it. Tell me a little
more and I could help you with that.

Ray
If possible I would like some way to autosave the now playing list at some given time. Because I test alot of scripts and use many on a daily basis, sometimes my MM will crash or after it closes I get one of those access violation errors which means my mediamonkey.m3u doesn't save. And since I add tracks to the now playing from lots of different playlists, I lose the order/tracks which I was listening to. If I could have it save automatically at the click of a button or on some kind of schedule, hopefully my losses could be minimized. I am currently using Belial's Autosave Playlist script but it will only save if there are changes to the number of tracks and the access violation errors will sometimes overwrite this as well, so I was hoping a playlist within MM would be better for me.

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

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

Re: mmStations V1.0

Post by nynaevelan » Fri Nov 07, 2008 4:34 pm

Ray:

Is there anyway to setup mmStations to resume the state it was in when MM was closed??

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 V1.0

Post by raybeau528 » Fri Nov 07, 2008 7:22 pm

New version available in first post

Major rewrite to accomodate some requests
Added ability to edit a station button in the main tracks window by clicking the button twice
you can still set all buttons in the options panel
Added program title and version to the title bar along with the name of the playlist currently playing
investigating not including playlists with no tracks
investigating unexpanding the playlist after traversing the playlist tree
known issue: playlists with duplicate names - only last one shows in pulldown list

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

Re: mmStations V1.0

Post by raybeau528 » Fri Nov 07, 2008 7:33 pm

Nyn,

Check out new version and let me know what you think about the edit button/station feature. Click the button twice.

I spent some time on two of your requests, namely not expanding the tree and excluding empty playlists. Limited success with at this time. I was able to eliminate empty playlists but it added significant delays. I can unexpand the list but then the tracks in the main tracks window is different form that in the playlist. If that's not a problem then I could probably get it in the next release.

Tell me more about resuming the 'state' mm was in. The station panel and all of its associations with playlists should remain intact when you exit mm and restart. what's not happening?

Regarding saving the NowPlaying list to a playlist - are you looking for some guidance to write the script yourself or are you looking for a turnkey script? An idea would be to right click in the window and click an item there which would save the tracks to a playlist named with a title including date and time stamp to make it unique, or always to the same playlist - so either something like "NowPlaying 20081107 0730" or just "Copy of NowPlaying".

Ray

fuzzynavel

Re: mmStations V1.0

Post by fuzzynavel » Fri Nov 07, 2008 7:47 pm

Hello - Thanks for the work on this script. I was able to install the new version (1.1), and I can get the station buttons to appear. After playing around with it for a few minutes I was getting some weird behavior:

1. The playlists in the explorer tree were opening and closing, seemingly at random. I think this was mentioned already.

2. After I click a station button sometimes a small window appeared with a dropdown and a playlist name. Then you click on that (or change the dropdown) and then nothing happened. If I went back to the orginal station button then it would start playing. I'm not sure what the extra window is all about, but when I push the station button I just want to hear music.

3. Various VBS script errors kept appearing while navigating these pop up windows and drop downs, making the process rather confusing.

I went ahead and uninstalled the script, and maybe I'll come back in a few weeks to see if you have an updated version. Thanks again for working on this - I would love to fire up Mediamonkey, and with one click start a playlist playing.

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

Re: mmStations V1.0

Post by raybeau528 » Fri Nov 07, 2008 8:00 pm

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

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

Re: mmStations V1.0

Post by raybeau528 » Fri Nov 07, 2008 8:12 pm

Fuzzynavel,

1. The playlists in the explorer tree were opening and closing, seemingly at random. I think this was mentioned already.
Yes, this seems to be some unfortunate side effect of traversing the tree via a script which I have to do to get a list of all the playlists. Still working on this.
2. After I click a station button sometimes a small window appeared with a dropdown and a playlist name. Then you click on that (or change the dropdown) and then nothing happened. If I went back to the orginal station button then it would start playing. I'm not sure what the extra window is all about, but when I push the station button I just want to hear music.
Per requests from another user (Nyn) in this topic, I added the ability to edit individual buttons within the context of the main tracks window. The popup occurs if you click the same button twice in a row. You can then edit the button name and assign a playlist. You can still assign all the button/station names and playlists in the tools/options/mmstations options panel. Would help to have a choice to enable /disable station editing?
3. Various VBS script errors kept appearing while navigating these pop up windows and drop downs, making the process rather confusing.
Can you tell me more about these errors ? what precipitated the error? what exactly was the error(s)? etc.

Did you start with tools/options/mmstations to assign station names and playlists? Were they all assigned or were some unassigned. Any info you can provide will help me figure it out. If you're inclined to do so, could you edit the mediamonkey.ini file and remove the [mmStations] section and retry? Just in case there's something from the previous version that is causing a problem. You can find it here:

Windows XP: C:\Documents and Settings\<USERNAME>\Local Settings\Application Data\MediaMonkey

or

Windows Vista: C:\Users\<USERNAME>\AppData\Local\Mediamonkey

Ray

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

Re: mmStations V1.0

Post by nynaevelan » Sat Nov 08, 2008 12:27 am

raybeau528 wrote: Added ability to edit a station button in the main tracks window by clicking the button twice
I like this feature because it makes it easier to change a button, unfortunately when you click on the button it starts it playing in the now playing, not good for me. :(
raybeau528 wrote: Added program title and version to the title bar along with the name of the playlist currently playing
I know I asked for this and I LOVE the option to show which playlist is playing. But you cannot see the title in the horizontal view. Not a major problem, I will just switch to vertical view and find a new spot for the panel because I want to see the playlist feature.

BTW: I opened and closed MM now the playlist name doesn't show. :-? Also, the title says v1.2, is this the version number I thought it was 1.1?
raybeau528 wrote: investigating not including playlists with no tracks
If this is causing too many problems don't worry about it, my laziness is not worth that much work. :wink:
raybeau528 wrote: known issue: playlists with duplicate names - only last one shows in pulldown list
I do not know about this issue, I do not have more than one playlist with the same name, I have too much trouble keeping up with unique names. :-?
raybeau528 wrote: Tell me more about resuming the 'state' mm was in. The station panel and all of its associations with playlists should remain intact when you exit mm and restart. what's not happening?
The panel is closed when I reopen MM and with this latest update when I restarted it after reopening MM it was in a vertical position in a new location then the horizontal position and location it was in when I closed MM. If I have it open when I close MM I would like to have it in the same location when I reopen MM.

PS: The change in location only seemed to happen the first time I opened MM after installing the updated version, but it is closed each time I open MM.

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

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

Re: mmStations V1.0

Post by nynaevelan » Sat Nov 08, 2008 12:39 am

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
I am getting the following error because of info which is being added to the script from Onenonymous' RIght Click for Scripts script, I am not sure how to fix this but here is the data that is being entered in the script:

Code: Select all

'####################################################################
' Added by C:\Program Files\MediaMonkey\Scripts\Auto\RightClickForScripts.vbs
Sub RightClickForScripts_SaveNowPlaying(o)
    SaveNowPlaying
End Sub
'####################################################################
Here is the error message:

Image

EDIT: Ok, I figure it out, once I removed the (arg) the error went away. I also had to tweak the name of the playlist and the location and it is working exactly like I wanted. THANK YOU!!!! :D :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 V1.0

Post by raybeau528 » Sat Nov 08, 2008 1:23 am

Nyn,

To answer some of your questions, probably out of order..

1. like I said, quick and dirty, I'm not aware of what some other scripts my do to my own script.
2. Click twice to edit - yes, first click plays the playlist. New version I'm working on has an option to enable/disable that feature. Any suggestions on how to make it more user friendly?
3. Title doesn't display in horizontal layout? I would think it wouldn't show in a vertical layout mode. Can you show me an image?
4. Playlists with same name. I actually have several with the same name. I sometimes create a playlist which I then divide up into individual child playlists wth names like disc 1, disc 2, disc 3, etc from which I burn CDs. Of course, I don't burn many cd's today with Ipods and such.
5. Stations position changing. Do you have autostart enabled? If so, it 'should' be displayed when you start mm. Sounds like you might have many more 'extensions'/scripts running on your system. I use very few to keep things uncluttered. Some have heavy performance hits. It may be interacting with other scripts, like the SaveNowPlaying - worked fine for me from the get go but you had issues. I'll keep working on it though!

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

Re: mmStations V1.0

Post by nynaevelan » Sat Nov 08, 2008 1:43 am

raybeau528 wrote:
1. like I said, quick and dirty, I'm not aware of what some other scripts my do to my own script.
Not a problem I got it up and running and that is what counts. :wink:
raybeau528 wrote:2. Click twice to edit - yes, first click plays the playlist. New version I'm working on has an option to enable/disable that feature. Any suggestions on how to make it more user friendly?
Maybe I just wasn't clicking fast enough between the two clicks. I'll play with it some more to see if I keep running into the problem. But once you implement an option to enable/disable this feature, I think that should make it more user-friendly. I'm sure not alot of people will probably want this feature.
raybeau528 wrote:3. Title doesn't display in horizontal layout? I would think it wouldn't show in a vertical layout mode. Can you show me an image?
It shows in the horizontal position but I moved it out of a horizontal position because I want to see it. Now I understand the playlist name not showing when restarting MM, but shouldn't it always display the script name and version? Here is an image, this is what it looks like when I first open MM:

Image
raybeau528 wrote: 5. Stations position changing. Do you have autostart enabled? If so, it 'should' be displayed when you start mm. Sounds like you might have many more 'extensions'/scripts running on your system. I use very few to keep things uncluttered. Some have heavy performance hits. It may be interacting with other scripts, like the SaveNowPlaying - worked fine for me from the get go but you had issues. I'll keep working on it though!
That might explain the problem I wasn't sure what autostart did so I never enabled it. :( I meant to ask but never got around to it.

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 V1.0

Post by raybeau528 » Sun Nov 09, 2008 7:14 pm

Verstion 2.0 is available in the first post.

9-Nov-2008 Introducing V2.0, a major rewrite with several improvements and requests
The structure in the MediaMonkey.ini file has changed and this version will update
the file to work with this version.
The annoying expanding of the playlist tree has been eliminated.
The list of playlists in the pulldown field is now indented to reflect position in the tree
Resolved issue with duplicate playlist names not being recognized, duplicate playlists
will display a count, (n) after the name.
Expanded the button size in the vertical layout to support longer station names.
It may not be feasible to omit empty playlists. The performance hit is unacceptable

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

Re: mmStations V1.0

Post by nynaevelan » Sun Nov 09, 2008 7:45 pm

raybeau528 wrote: The structure in the MediaMonkey.ini file has changed and this version will update
the file to work with this version.
Installation was very smooth. :D
raybeau528 wrote:The annoying expanding of the playlist tree has been eliminated.
The list of playlists in the pulldown field is now indented to reflect position in the tree
This is great, that was very annoying. :D
raybeau528 wrote: It may not be feasible to omit empty playlists. The performance hit is unacceptable
This is acceptable because with the addition of the dashes it makes it easier to identify which are actually playlists. And you also fixed the name of the script not showing until a station was selected. Thanks for the updates and considering my requests. :D :wink:

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 V1.0

Post by raybeau528 » Sun Nov 09, 2008 9:12 pm

I think the performance is a little better as well - a by product of traversing the playlists rather than the nodes and not expanding everything.

Beware I discovered a bug that occurs when you have duplicate playlists and delete one of the duplicates. I'm working on a solution.

Ray

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

Re: mmStations V1.0

Post by raybeau528 » Mon Nov 10, 2008 12:10 am

10-Nov-2008 Uploaded minor version 2.1. Fixed problem with duplicate playlists. If you're running V2.0
already, when you install this version, the first thing to do is go to
tools/options/mmStations and click OK. Let me know if you discover any problems.

Post Reply