Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Recent Posts
22
3rd Party Plugins - (fb2k) / Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Last post by marc2k3 -
I don't think that's good enough. Deleting autoplaylists/locked playlists should be fine except when there is a lock in place that prevents removal. You can check the type of lock with plman.GetPlaylistLockFilterMask - I use these helper functions in jsplaylist/smooth playlist manager...

Code: [Select]
function playlist_can_rename(playlistIndex) {
return !(plman.GetPlaylistLockFilterMask(playlistIndex) & PlaylistLockFilterMask.filter_rename);
}

function playlist_can_remove(playlistIndex) {
return !(plman.GetPlaylistLockFilterMask(playlistIndex) & PlaylistLockFilterMask.filter_remove_playlist);
}

https://jscript-panel.github.io/docs/namespaces/plman/#plmangetplaylistlockfiltermaskplaylistindex

PlaylistLockFilterMask is defined in helpers.txt and also here...

https://jscript-panel.github.io/docs/flags/#playlistlockfiltermask

I don't think there should be popup messages either. It should silently fail when using the delete key and menu items should be greyed out when certain actions are not permissable. See here for example...

https://github.com/jscript-panel/component/blob/66c096863ee57acfc4d24312627cd2e292c5692f/samples/smooth/jsspm.js#L696-L697

EnabledMenuIf is a simple function inside helpers.txt..

https://github.com/jscript-panel/component/blob/66c096863ee57acfc4d24312627cd2e292c5692f/helpers.txt#L220





24
3rd Party Plugins - (fb2k) / Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Last post by zeremy -
@etip
Feedback:
Crashing when trying to delete a locked playlist.
Adding the following at line 1147 in the this.delete = function ()  stops the process.

Code: [Select]
			if (plman.GetPlaylistLockName(plman.FindByGUID(this.display[selected.index].id))){
var message = "Unable to delete. Playlist is locked by " + plman.GetPlaylistLockName(plman.FindByGUID(this.display[selected.index].id));
utils.ShowPopupMessage(message, "pl_organizer")
console.log(message);
return;
}

And similar validation is required also for "Rename playlist" if such restriction is already applied to the playlist.  
25
3rd Party Plugins - (fb2k) / Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Last post by hexenszene -
You can stick them all in the same folder.

Three of them are now needed there. The Main.js file is the one that gets loaded into the actual JScript panel - when you configure it (or go to Settings -> Configure if it's alreads setup), you can either paste in the contents of Main.js or go Tools -> Import and load the file (annoyingly the file dialog is looking for *.txt but you can easily change that).
 

That worked great.  Thanks!  The fact that the JSP import tool was looking for txts was really throwing me off.
26
3rd Party Plugins - (fb2k) / Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Last post by frogworth -
You can stick them all in the same folder.

Three of them are now needed there. The Main.js file is the one that gets loaded into the actual JScript panel - when you configure it (or go to Settings -> Configure if it's alreads setup), you can either paste in the contents of Main.js or go Tools -> Import and load the file (annoyingly the file dialog is looking for *.txt but you can easily change that).