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.
Topic: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3 (Read 46507 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #225
I do not know the lock parameters. I have only ever used your script to make the folders. If lock parameters are important they should be integrated into this script?

It's going to be next version as i discovered it's quite easy to do

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #226
I can't see any option for locking/unlocking playlists. Is a seperate plugin required to enable that functionality?


Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #228
It's not obvious - not something I've done as a rule either (except in the definition of an Autoplaylist).

@iangk it's not part of this plugin. If you just right-click on a playlist tab you have the option to lock reordering.
Actually that doesn't seem to be it either. @mark2k3 maybe you do need to enlighten us?

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #229
Playlist locks are a feature provided by foobar itself via the SDK and any component can implement them.

I think foo_utils was the first providing a "read only" option from the main Edit menu when installed. This prevents adding/removing/reordering items from standard playlists.

Then I think foo_playlist_attributes was the first to offer full customisation options via a dialog.

Then JScript Panel and Spider Monkey Panel were updated to provide the same functionality. I don't think SMP has a nice dialog like my component for toggling the options on/off.



The included Smooth Playlist Manager and JS Playlist scripts provide access to this dialog from the right click menu on any selected playlist. Once a lock is enabled, it "belongs" to the component that enabled it and it cannot be removed by anything else. Locks persist as a permanent property of the playlist until you remove it (or delete the playlist).

It looks like etip is intending to provide this functionality in the next release of this script.

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #230
Ah I see, cool. I do have foo_playlist_attributes, so I must have forgotten that functionality came from that component.
Nice. I will use it to disable removing my key playlists!

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #231
@frogworth : Thank you. Since people were talking about existing playlists being locked and the next release of this plugin not yet being available I thought the functionality had to be somewhere else.
It'll be nice to see this added here.

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #232
Playlist Organizer (Jscript Panel 3)
v1.8.6
1-6-2023

Version changes :
- Menu has been rearranged and improved (a big thank you to @metal_termite !!!)
- Added an option to edit a playlist lock options (works only on regular playlists and not on autoplaylists)

X

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #233
Once a lock is enabled, it "belongs" to the component that enabled it and it cannot be removed by anything else. Locks persist as a permanent property of the playlist until you remove it (or delete the playlist).


I havent done that yet, but i intend to do it on friday.

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #234
You should look at smooth playlist manager for a reference.

https://github.com/jscript-panel/component/blob/19c48a16cb2ed9a308543ac34f938010fcc1629e/samples/smooth/jsspm.js#L693-L708

It's better to completely hide autoplaylist options for playlists that are not autoplaylists and then you should check if any existing playlist lock is not owned by anyone else before offering the option to edit.


Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #235
Once a lock is enabled, it "belongs" to the component that enabled it and it cannot be removed by anything else. Locks persist as a permanent property of the playlist until you remove it (or delete the playlist).

Thanks a lot for this info @marc2k3!
I did come across the ownership thing after downloading @etip's latest version. It showed the lock symbol but wasn't able to display the playlist lock options. Once I realised the issue, I used the playlist attributes dialog to remove the restrictions and recreate them via the Jscript Panel 3 dialog.

Question for either of you: One of my locked/restricted playlists is an autoplaylist.
It has the lock symbol because it's locked for reordering (through the autoplaylist definition).
But I'd like to also disable deleting the playlist, which is currently unreachable from both components.
Is it not possible to use the playlist lock on a force-sorted autoplaylist?

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #236
@etip One nitpick regarding the context menu.

Change from
Code: [Select]
<Delete> key enabled
Change to
Code: [Select]
Enable <Delete> key

The phrase "<Delete> key enabled" implies it is already enabled even if it is unchecked.

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #237
A few more context menu fixes...

Show/hide delete key keyboard shortcut on context menu
If the delete key keyboard shortcut is disabled it should not appear as a keyboard shortcut on the Delete folder/playlist context menu.

Change this line
Code: [Select]
this.s.AppendMenuItem(EnableMenuIf(selected.index > -1 && selected.pl == 1 ? playlist_can_remove(plman.FindByGUID(this.display[selected.index].id)) : true), 1700, 'Delete ' + (selected.pl == 1 ? 'playlist' : 'folder') + '\tDel');
With this line
Code: [Select]
this.s.AppendMenuItem(EnableMenuIf(selected.index > -1 && selected.pl == 1 ? playlist_can_remove(plman.FindByGUID(this.display[selected.index].id)) : true), 1700, 'Delete ' + (selected.pl == 1 ? 'playlist' : 'folder') + (this.delOption == 1 ? '\tDel' : ''));

Disable active playlist icon color on context menu when icon disabled
If Active playlist iconis disabled then disable the option to select the active playlist icon color.

Change this line
Code: [Select]
this.l7.AppendMenuItem(MF_STRING, 1070, 'Icon color...');
With this line
Code: [Select]
this.l7.AppendMenuItem((this.activeSongOption == 0 ? MF_GRAYED : MF_STRING), 1070, 'Icon color...');

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #238
Is it not possible to use the playlist lock on a force-sorted autoplaylist?

An autoplaylist is essentially a locked playlist owned by fb2k itself. You cannot apply further locks on top.

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #239
An autoplaylist is essentially a locked playlist owned by fb2k itself. You cannot apply further locks on top.
OK, that's a shame but understandable.

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #240
An autoplaylist is essentially a locked playlist owned by fb2k itself. You cannot apply further locks on top.
OK, that's a shame but understandable.
Well adding/sorting/removing items, i understand as it should be the autoplaylist parameters. But protecting it against deletion or renaming should be allowed in my opinion.

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #241
Playlist Organizer (Jscript Panel 3)
v1.8.7
1-6-2023

Version changes :
- Menu arrangements (again, thanks @metal_termite this is looking so much neater)
- Added an option to edit or remove a (regular) playlist lock, only if the lock was applied by the component (thanks @marc2k3, yeah the smooth playlist manager is a great source for me)

X

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #242
@etip How do you feel about making the single-click folder behavior applicable only to the folder icon and not the folder text? It mirrors Windows native behavior that way, as well as the other stock foobar2000 components that have collapsible nodes like the album list.

- single-click folder icon = expand or collapse
- single-click folder text = just select item, but no expand or collapse

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #243
Playlist Organizer (Jscript Panel 3)
v1.8.8
4-6-2023

Version change :
- Change in behavior of the single click on a folder : If the folder icon is clicked, the folder will collapse or expand. If the text of the folder is clicked, then the folder is selected. The double click will always collapse or expand if used on the icon or on the text.
X

 

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #244
😍

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #245
Playlist Organizer (Jscript Panel 3)
v1.8.9
11-6-2023

Version changes :
- rename function has a shortcut : F2
- Fixed a bug when the input box asking a new name was canceled.
- Fixed the indentation of the playlists to be right below the folder name.
following thanks to @metal_termite  :
- Added ability to show/hide the "Move Up/Move Down" context menu items. It should be enabled by default. The new setting is located in Settings > Appearance > Context menu
- More reorganizing of context menu Appearance items. Hopefully this iteration is the most intuitive

X

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #246
@etip This looks like a bug with the bottom margin? The playlist gets cut off at the bottom with this huge margin. Shouldn't the margin be the same size at the bottom as it is on the top?



EDIT: I think the issue might be these lines?
Code: [Select]
this.rows = Math.floor((this.h - _scale(18)) / this.row_height);

I changed every occurrence to
Code: [Select]
[code]this.rows = Math.floor((this.h - _scale(1)) / this.row_height);
and now it is perfect

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #247
@metal_termite
good work. thanks. :)

SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself)

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #248
thanks @metal_termite, i'm modifying the code for next release :)

Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3

Reply #249
Love the addition of F2 for rename, that was something I missed! I think at this point my only request left is creating a new playlist if you drag and drop files into a blank area (also, double click in a blank area to create a new playlist, I think I saw someone in the thread mention that, very useful as well). But overall, fantastic work on the polish here!