FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Newbie - add to playlist?

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
pcorpe
Newbie


Joined: 28 Aug 2007
Posts: 1

PostPosted: Tue Aug 28, 2007 7:16 pm    Post subject: Newbie - add to playlist? Reply with quote

OK, so i'm new to this.

I'm trying to add a track to a playlist, but whenever i do it replaces the playlist not adds to it

what i'm trying to achieve is a kinda pass the jukebox controller idea, whereby people can add tunes to the playlist, and it gets bigger as more people add, not stop what currently playing and start a new tune...

any ideas?

thanks
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue Aug 28, 2007 10:44 pm    Post subject: Re: Newbie - add to playlist? Reply with quote

That feature is planned for an update. If you have any more details about how you'd like this to work, please let me know, okay?

Best.
--
Jonas

[quote="pcorpe"]OK, so i'm new to this.

I'm trying to add a track to a playlist, but whenever i do it replaces the playlist not adds to it

what i'm trying to achieve is a kinda pass the jukebox controller idea, whereby people can add tunes to the playlist, and it gets bigger as more people add, not stop what currently playing and start a new tune...

any ideas?

thanks[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gregoryh
Newbie


Joined: 16 Jan 2008
Posts: 7

PostPosted: Wed Jan 16, 2008 12:30 am    Post subject: 'Add to now playing' Reply with quote

No gaurentees but this works for me...

I have edited the 'MediaPlayer Browse by artist' script...

The first problem I found was that you always select the whole album. If you choose a track then you get the whole thing but just start playing at that track. I changed this by adding an "all" item at the start of a list of tracks...

At the bottom of ....

[code:1]function browse_album_ValueUpdated(list, property)[/code:1]

I added one line that adds "All" as well as the tracks...

[code:1]var listItems = new Array();
listItems.push("All"); // I added this (GMH)
for( var i = 0; i < shownTracks.length; i++ ) {
var media = shownTracks[i];
listItems.push( media.name );
}[/code:1]

Then to add to a playlist.... The last function is where it all happens. I commented out the 3 lines that replace the current playlist with the selection and starts playing the selected media.

Instead I check to see if "All" was selected (always index 0). Then add either all the media or the selected track to the playlist.

[code:1]function playTrack_ValueUpdated(list, theProperty)
{
if( setting_track_item != list.selectedItem ) {
setting_track_item = list.selectedItem;
writeSettings();
}

if (savedPlaylist != null)
{
// var media = shownTracks[list.selectedItem];
// wmp.currentPlaylist = savedPlaylist;
// wmp.controls.playItem(media);

if (list.selectedItem == 0)
{
for( var i = 0; i < savedPlaylist.count; i++ )
{
var song = savedPlaylist.item(i);
wmp.currentPlaylist.appendItem(song);
}
}
else
{
var song = shownTracks[list.selectedItem - 1];
wmp.currentPlaylist.appendItem(song);
}

}

theTerminal.PopTo("Windows Media Player");
}[/code:1]

My file is attached - you may want to may a copy of the current one, this is gaurenteed... (but it works for me)

I found that when you start doing this you end up with lots in the playlist (maybe not a problem) so I added a clear playlist function...
[code:1]
var object = new ActiveXObject("SCWMPlayer.WMPlayerHelper");
var player = object.GetMediaPlayer();
var currList = player.currentPlaylist;

var noSongs = currList.count;
while (currList.count>0)
{
currList.removeItem(currList.item(0));
}

theTerminal.Popto( "Windows Media Player" ); [/code:1]

Of course you need to add the line to MediaPlayer.js so that it appears on the list...
[code:1]
var moreMenuItems = new Array();
moreMenuItems[0] = "Current Playlist";
moreMenuItems[1] = "Audio PlayLists";
moreMenuItems[2] = "Video PlayLists";
moreMenuItems[3] = "Browse & add to playing";
moreMenuItems[4] = "Clear Current Playlist"; //this line
moreMenuItems[5] = "Rate Track";
moreMenuItems[6] = "Add to Playlist";
moreMenuItems[7] = "Repeat";
moreMenuItems[8] = "Playlist Shuffle";
moreMenuItems[9] = "Play Random Track";
moreMenuItems[10] = "Set Sound Balance";
moreMenuItems[11] = "Set Artwork Layout";

var moreMenuItemUUIDs = new Array();
moreMenuItemUUIDs[0] = "C178C68E-7D7E-4156-8AD8-DC85C3908D40"; // Current Playlist
moreMenuItemUUIDs[1] = "89719EA5-A1D0-4c7b-899F-5596E9528600"; // Audio PlayLists
moreMenuItemUUIDs[2] = "D75CE4F9-CD37-49e7-A30B-BFCFC62FDA00"; // Video PlayLists
moreMenuItemUUIDs[3] = "38C0D229-D763-4794-8FB3-96E79E153AE0"; // Browse by Artist
moreMenuItemUUIDs[4] = "C178C68E-7D7E-4156-8AD8-DC85C3908040"; // and this one
moreMenuItemUUIDs[5] = "6BB14A6B-EF7D-4c4c-A6A8-E30DDD1765B0"; // Rate Track
moreMenuItemUUIDs[6] = "6649FCDC-C2D5-46ad-8E41-5E5F5E663E30"; // Add to Playlist
moreMenuItemUUIDs[7] = "8A311DD4-1368-4308-8CF0-07CB2AC18490"; // Repeat
moreMenuItemUUIDs[8] = "82CD4015-5C7C-4e9d-9339-65EDA3B77E30"; // Playlist Shuffle
moreMenuItemUUIDs[9] = "2894CEDA-8C25-4efd-B319-366CE7DC8D10"; // Play Random Track
moreMenuItemUUIDs[10] = "A5EAB91F-0FEA-4c23-84A6-62F6D5DBDBA0"; // Set Sound Balance
moreMenuItemUUIDs[11] = ""; // Set Artwork Layout
[/code:1]



MediaPlayer Browse By Artist.js
 Description:
Modified for add to playlist.... (rather than replace)

Download
 Filename:  MediaPlayer Browse By Artist.js
 Filesize:  8.64 KB
 Downloaded:  994 Time(s)

Back to top
View user's profile Send private message
ma7ija
Newbie


Joined: 26 Nov 2007
Posts: 12

PostPosted: Fri Jan 25, 2008 5:21 pm    Post subject: ad to playlist mising Reply with quote

Tell you like this.
I need a script, when i play a playlist, i would like to add a song on the [u]playing[/u] playlist, so i need to browse [u]all[/u] my songs to find one and put it to a playing playlist.
Now i can browse only with my playlists, but not at all my songs!
Maybe i am wrong?

Thanks! Hope you understand my bad english.
Back to top
View user's profile Send private message
gregoryh
Newbie


Joined: 16 Jan 2008
Posts: 7

PostPosted: Fri Jan 25, 2008 10:07 pm    Post subject: add to playlist Reply with quote

I think you will find that this is what it does. You browse for tracks through all of your songs/albums and then pick tracks to add to the current playlist.
Back to top
View user's profile Send private message
smallgreen
Newbie


Joined: 16 Apr 2007
Posts: 4

PostPosted: Sat Jan 26, 2008 7:40 pm    Post subject: Reply with quote

How would you get this to work with iTunes?
Back to top
View user's profile Send private message
ma7ija
Newbie


Joined: 26 Nov 2007
Posts: 12

PostPosted: Sat Jan 26, 2008 9:22 pm    Post subject: ad to playlist.. Reply with quote

But when i start add to playlist script, it opens my playlists not (like browse by artist) my all songs... thanks for reply!
Back to top
View user's profile Send private message
ma7ija
Newbie


Joined: 26 Nov 2007
Posts: 12

PostPosted: Sat Jan 26, 2008 10:02 pm    Post subject: ups Reply with quote

ups, sorry, i replace the script to "ad to playlist" script instead to "browse by artist"
Now everything work fine! Thanks a lot for your work on this script and for replys.
Big thanks!
Back to top
View user's profile Send private message
donster22
Newbie


Joined: 27 Sep 2008
Posts: 1

PostPosted: Sat Sep 27, 2008 5:39 pm    Post subject: Reply with quote

hi.
i have replaced the Media Player Browse By Artist.js with your file and I have cut and paste the MediaPlayer.js amendment into that file but when i now run Salling Clicker I can see the altered menu on my device but none of the menu items work.
any help greatly appreciated.
thanks
don
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group