HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: etip on 2023-03-11 09:53:58

Title: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-11 09:53:58
I was missing too these functionalities under Foobar V2 so i tried to develop a replacement on @marc2k3 Jscript Panel 3.
I'm not a professional developer so there may be bugs, just let me know and i'll try to fix them.

The following zip contains 3 files :
main.js file which is the main panel script
panel_pl_organizer.js
pl_organizer.js which is the main code

The last 2 files are to be copied in the fb.ProfilePath + "\pl_organizer" folder
X
You need to create a JScript 3 panel, its code has to be the main.js file (copy/paste).

Jscript Panel 3 link : https://jscript-panel.github.io/docs/ (https://jscript-panel.github.io/docs/)


Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-11 10:55:57
This is nice!
There are a few features I'd need to be able to use it more easily. I am even less of a professional developer I'd say, but I can see if I can work anything out.
Anyway:


Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-11 11:08:23
Oh, by the way, there's a stray '}' at the bottom of Main.js which causes an error when you first load it :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-11 11:17:44
thanks for the feedback new file with the add. stray corrected :

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-11 11:22:33
No worries! Thanks.
Also, the dragging to re-order is off by 1. It's counterintuitive but this works correctly:

Code: [Select]
if (this.draggedIndex < this.droppedIndex) this.droppedIndex = this.index-1 ; else this.droppedIndex = this.index;

I've also changed the yellow colour to something I preferred (a darkish purple), because I find the yellow hard to read on my screen. Maybe it'd be good to make that configurable.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-11 12:05:46
yes, to be honest, i wanted to implement a color picker for the colors hence my weird yellow colors. I'll do that later :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-12 06:13:14
@etip

Could you please write the script name, version and update date?

for example:
Playlist Organizer (Jscript Panel 3)
v1.0.0
2023-03-11

--------
Main.js
// ==PREPROCESSOR==
// @name "Playlist Manager" ← Can I change my current name?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-12 09:41:18
ok i will from now on.
thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: antares on 2023-03-18 13:48:20
Hi etip,

thank you very much for the new (old) foo_plorg! All of it‘s funktion work flawlessly -  no issues at all. I’m very happy with your plugin!

The only thing I would like to change, are some points of it’s design – of course this is very personal. The overall design looks a little bit „old fashioned“ with the different icons. Below I give you a little wish list what I would like to change. I would really like to do by myself but I don’t know how to realise.

1. Remove all icons.  No bold letter – or optional. Folder should differ from playlists just through their width. All playlists are indented to the right and therefore shorter.

2. Opened folder have a small arrow at their very left side. Closed folder an arrow pointing to the right (see attached pictures). No item count on folder – just plain or optional.

3. No vertical line at the beginning of each playlist.

4. Active playlist in which the current track playing is identified by a different colour which can be set by the user.


https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_6001_728edf665203b74b10fb3531c2c95391;topic=123820

https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_6001_878410b2686ac75d74544db0884172f9;topic=123820
Martin

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-18 14:03:10
I've done a lot of playing with the code to add some features like better navigation with the keyboard, but a drawback that will stop me being able to use the component is that you can't drag tracks into the playlists shown on the panel.
I'd love to know how one could make that work - if so, I'd be really happy with it!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-18 14:38:52
Latest version (2023-03-11)
https://hydrogenaud.io/index.php/topic,123820.msg1023622.html#msg1023622

https://i.imgur.com/kk4FMBD.png Default UI
https://i.imgur.com/oOu6UBT.png Default UI - Dark Mode

Google Japanese (Japanese wiki) → English
Playlist Organizer (Playlist Manager) (JScript Panel 3 Script): by etip (https://foobar2000-xrea-jp.translate.goog/?Default+UI+element+64bit&_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=ja&_x_tr_pto=wapp#f768f44d)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-03-19 09:48:02
I've done a lot of playing with the code to add some features like better navigation with the keyboard, but a drawback that will stop me being able to use the component is that you can't drag tracks into the playlists shown on the panel.
I'd love to know how one could make that work - if so, I'd be really happy with it!

Me too
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-19 11:13:32
@Air KEN thank you.
@DJ FRANK G. & @frogworth : i'll look into the drag & drop.
@frogworth : if you want me to integrate your code into mine let me know, that can benefit to others.

New version :
Playlist Organizer (Jscript Panel 3)
v1.1.0
19-03-2023

Changes :

Bug fixes and code optimization
Change color option for :
   - Folder name
   - Buttons
   - Playlist name
   - Selection bar
   - Background
Save configuration:
   - Auto collapse
   - Text and color preference
Album art as background
The right click menu is split in 2 :
   - Within the playlist area for contextual menus
   - Within the header area for customization menus
Got rid of the vertical lines beginning of a playlist

Let me know if you find bugs

The following zip contains 3 files :
main.js file which is the main panel script
panel_pl_organizer.js
pl_organizer.js which is the main code

The last 2 files are to be copied in the fb.ProfilePath + "\pl_organizer" folder

You need to create a JScript 3 panel, its code has to be the main.js file (copy/paste).

Jscript Panel 3 link : https://jscript-panel.github.io/docs/

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-03-19 11:46:29
I was working on this reply, and then I noticed you posted a new version, Apologies if some of what I have written no longer applies and has now been fixed.

Anyway, THANK YOU for developing this, I've been playing around with it this morning and restoring my playlist hierarchy, it's lovely to have a usable playlist manager again, and currently better than any of the alternatives.

A few requests, questions and general thoughts/feedback:

- I can't create a new folder and name it "Default", I am given an error saying it already exists, when it doesn't. Creating a folder with a different name and then renaming it to "Default" afterwards ostensibly works, however I strongly recommend against doing this because if one then renames any playlist (or even cancelling a rename operation), additional redundant folders called "Default" are created. I advise anyone to avoid calling their folders "Default" (at least for the time being.)
- Right-clicking an AutoPlaylist and selecting "AutoPlaylist...", I expect the AutoPlaylist configuration/pattern to open, but nothing at all seems to happen? Is this feature simply broken?
- It doesn't seem possible to drag a playlist from one folder directly to another, need to drag a playlist out of a folder first, before moving it to another.
- I'd like to specify my own font, for consistency with the rest of my layout (I use Tahoma.)
- Is it possible to add a scrollbar, to take some strain off my scrollwheel? (Ideally a Dark Theme-compliant one!)
- I prefer double-click to activate playlists. Some of my playlists are rather large, so I may not want to load them accidentally while organising playlists.
- I may be missing some external dependencies, because the symbols used for the Display Size/Numbers toggle, the scroll up/down buttons, the yellow currently playing playlist icon and the group icons are empty rectangles/not displaying correctly. Also the scroll up button is sort of buried under the help button and very hard to activate. To be honest, I don't particularly need these anyway (re: scrollbar, would be preferable.) Screenshot attached.
- As mentioned in a previous post, some simple colour configuration would be nice, or to have it observe colour settings specified elsewhere.
- I don't need to know the total # of playlists I have at the top. Some way to disable this message and the red line underneath it would be appreciated.
- Also there's quite a lot of padding/negative space on the left side of the panel. Not a big deal, but might be nice to save a bit of screen space.
- The vertical lines to the left of the playlist names may be unnecessary too, but not a big deal either.
- This may be a foo_quicksearch issue (forgive me if so), but the quicksearch playlist disappears from the group it's in and is recreated at the bottom of the tree. This also happened with plorg as of foobar 2.0...
- Where is the playlist/folder layout stored? Can it be backed up or imported? Is there any danger that it could be lost to an unexpected app or panel crash? I thought I'd ask this before I update to the newer version, too.
EDIT (one more) - I am experiencing significant lag when selecting songs in playlists. Does the song you have selected update the panel in some way?

Thanks again, great work with this.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-19 12:17:11
@etip
Many Thanks.
https://i.imgur.com/QbX7FlF.png
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-19 12:19:53
- I may be missing some external dependencies, because the symbols used for the Display Size/Numbers toggle, the scroll up/down buttons, the yellow currently playing playlist icon and the group icons are empty rectangles/not displaying correctly.

Agree with some of your comments (like scrollbar).
Just wanted to say, this is a dependency of JScript Panel 3 (https://jscript-panel.github.io/docs/) in general. It's FontAwesome you need: https://github.com/FortAwesome/Font-Awesome/blob/4.x/fonts/fontawesome-webfont.ttf?raw=true
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-19 13:04:47
@iridescentaudio : thanks for this constructive and detailed feedback, really appreciated.

- I can't create a new folder and name it "Default", I am given an error saying it already exists, when it doesn't. Creating a folder with a different name and then renaming it to "Default" afterwards ostensibly works, however I strongly recommend against doing this because if one then renames any playlist (or even cancelling a rename operation), additional redundant folders called "Default" are created. I advise anyone to avoid calling their folders "Default" (at least for the time being.)
i can create folder with the name "Default" in my foobar. Does anyone else has that issue ?

- Right-clicking an AutoPlaylist and selecting "AutoPlaylist...", I expect the AutoPlaylist configuration/pattern to open, but nothing at all seems to happen? Is this feature simply broken?
It's fixed in the update i posted today

- It doesn't seem possible to drag a playlist from one folder directly to another, need to drag a playlist out of a folder first, before moving it to another.
Yep, saw that, i thought it was working by design, it doesnt. I'll need to look into it.

- I'd like to specify my own font, for consistency with the rest of my layout (I use Tahoma.)
Adding that to my list, i was planning on tackling the font topic next (it's quite a mess today).

- Is it possible to add a scrollbar, to take some strain off my scrollwheel? (Ideally a Dark Theme-compliant one!)
I know Marc implemented one so i'll be able to use it but for my information, isnt it much easier to use the wheel ?

- I prefer double-click to activate playlists. Some of my playlists are rather large, so I may not want to load them accidentally while organising playlists.
Ok, in my list of todos

- I may be missing some external dependencies, because the symbols used for the Display Size/Numbers toggle, the scroll up/down buttons, the yellow currently playing playlist icon and the group icons are empty rectangles/not displaying correctly. Also the scroll up button is sort of buried under the help button and very hard to activate. To be honest, I don't particularly need these anyway (re: scrollbar, would be preferable.) Screenshot attached.
yep, you had the answer from frogworth.

- As mentioned in a previous post, some simple colour configuration would be nice, or to have it observe colour settings specified elsewhere.
Let me know if this is what you were looking for in the last version.

- I don't need to know the total # of playlists I have at the top. Some way to disable this message and the red line underneath it would be appreciated.
i'll look into making it optional. I may have an issue because this is where the right click custom menu happens now.

- Also there's quite a lot of padding/negative space on the left side of the panel. Not a big deal, but might be nice to save a bit of screen space.
i'm using it for the "note" to highlight the playlist which song is currently playing. i may change that.

- The vertical lines to the left of the playlist names may be unnecessary too, but not a big deal either.
done in the last version.

- This may be a foo_quicksearch issue (forgive me if so), but the quicksearch playlist disappears from the group it's in and is recreated at the bottom of the tree. This also happened with plorg as of foobar 2.0...
does that happen after you create a new search (in that case it cant stay in the folder as foo_quicksearch has no clue that folder exists. I think it deletes and recreates that quicksearch.

- Where is the playlist/folder layout stored? Can it be backed up or imported? Is there any danger that it could be lost to an unexpected app or panel crash? I thought I'd ask this before I update to the newer version, too.
look for a "pl_organizer.txt" file, it should be in your fb.ProfilePath folder (use : console.log(fb.ProfilePath); if you want to know where it is).

EDIT (one more) - I am experiencing significant lag when selecting songs in playlists. Does the song you have selected update the panel in some way?
yes, but it doesnt make sense so i'll post a new version to fix this later.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-03-19 13:56:04
Great, thank you for your answers etip (and frogworth), much appreciated. Yeah, the new version fixed a bunch of things, already much better.

Quote
I know Marc implemented one so i'll be able to use it but for my information, isnt it much easier to use the wheel ?

I have a lot of playlists (132 apparently!) so it takes me four scrolls of the scrollwheel to get between the top and bottom of my playlists. I could get more into the habit of collapsing folders so that I don't need to scroll, I suppose, but my instinct re: plorg is to keep all of them open and use the scrollbar.

By the way, the Auto-Collapse option crashes the panel for me with this error:

Code: [Select]
JavaScript runtime error
Unable to get property 'lvl' of undefined or null reference
File: C:\Users\Dave\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 101, Col: 4

Quote
does that happen after you create a new search (in that case it cant stay in the folder as foo_quicksearch has no clue that folder exists. I think it deletes and recreates that quicksearch.

Yea, any new search will in-effect move the playlist to the bottom. There may be some way to mitigate this in the quicksearch config, I'll investigate.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-19 19:24:35
New version :
Playlist Organizer (Jscript Panel 3)
v1.2.0
19-03-2023

Version changes :
Drag & Drop from other panels/playlist viewers to populate regular playlists.
Option to double or single click to open a playlist.

The following zip contains 3 files :
main.js file which is the main panel script
panel_pl_organizer.js
pl_organizer.js which is the main code

The last 2 files are to be copied in the fb.ProfilePath + "\pl_organizer" folder
X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-19 19:25:43
By the way, the Auto-Collapse option crashes the panel for me with this error:

Code: [Select]
JavaScript runtime error
Unable to get property 'lvl' of undefined or null reference
File: C:\Users\Dave\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 101, Col: 4

Can you please tell me what do you do to have that error ? I'd like to try to reproduce it as it seems to work for me.
thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-20 01:55:22
New version :
Playlist Organizer (Jscript Panel 3)
v1.2.0
19-03-2023

Version changes :
Drag & Drop from other panels/playlist viewers to populate regular playlists.
Option to double or single click to open a playlist.

Wonderful to have drag & drop working, thanks so much @etip!

I've attached my new edited version of pl_organiser.js if you're interested.
The changes are basically just for keyboard navigation. I've added:

Any other changes I'd made thus far were cosmetic and are basically resolved by your colour selection :)

Warning: In this version I've also disabled the Delete key, as I find it too dangerous.
If you're willing, I'd like an option to enable or disable this functionality.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-20 02:58:23
@frogworth
good job!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-20 05:57:23
@etip BTW, regarding:
Quote
I know Marc implemented one so i'll be able to use it but for my information, isnt it much easier to use the wheel ?

For me, I have such a large number of playlists that using the scrollwheel is quite awkward. Grabbing a scrollbar gives me finer control, in my experience.
I've mitigated this by adding the additional keyboard navigation, but would still like a scrollbar too.

Oh, and the other thing a scrollbar does is give you a visual representation of where you are relative to the entire content of the panel.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-20 07:12:21
I've attached my new edited version of pl_organiser.js if you're interested.
The changes are basically just for keyboard navigation. I've added:
  • Home and End to easily jump to top and bottom of the list
  • PgUp and PgDn to go page by page
  • Left and Right - if focused on folder, close or open; if on a playlist within a folder, left jumps focus to the containing folder
  • Enter to select a playlist

Any other changes I'd made thus far were cosmetic and are basically resolved by your colour selection :)

Warning: In this version I've also disabled the Delete key, as I find it too dangerous.
If you're willing, I'd like an option to enable or disable this functionality.
Thank you, if you dont mind, i'll implement these navigation options so that we'll have one main script.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-20 07:16:34
Thank you, if you dont mind, i'll implement these navigation options so that we'll have one main script.

I'd really appreciate that - I don't want to be forked anyway!
VERY minor thing but I've added "Configure..." back (in the top context menu) here, so that one can alter Main.js without too much bother (it also allows for updating the panel when editing the other .js files).
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-20 07:19:10
@etip Another minor thing:
At the moment the panel only paints the border for the ActivePlaylist when the cursor, effectively, goes into it.
What I mean is, if I'm ctrl-tabbing between playlists, it doesn't "know" that playlist is active until I click into the playlist.
Do you think there's a way to make it work as soon as the playlist is shown?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: antares on 2023-03-20 08:22:08
@etip,
great improvements!!
Just some minor issues concerning design:
- the row of the item count is not aligned - see picture
- enable to set permanently different colours just for folder (instead of folder-symbol)
- option to set letters bold or light

Martin

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-20 21:21:54
New version :
Playlist Organizer (Jscript Panel 3)
v1.3.0
20-03-2023

Version changes:
- Navigation changes (thanks to frogworth) : included new keys to navigate with the keyboard (see help).
- delete key is now optional

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-20 21:24:11
@frogworth
Quote
@etip Another minor thing:
At the moment the panel only paints the border for the ActivePlaylist when the cursor, effectively, goes into it.
What I mean is, if I'm ctrl-tabbing between playlists, it doesn't "know" that playlist is active until I click into the playlist.
Do you think there's a way to make it work as soon as the playlist is shown?
i'm sorry, didnt get it, what do you mean by "paints the border of the activePlaylist" ?

@antares
i'll work on your first 2 items (the first one has been bugging me as well), the third is when i'll review the whole font topic.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-21 01:18:54
i'm sorry, didnt get it, what do you mean by "paints the border of the activePlaylist" ?

Apologies, I'll try to explain. Let's say you have playlist tabs, and you switch to a different playlist. Perhaps you have music playing in Default, but you switch to Michèle Bokanowski.
The panel will put a box around the active playlist's name in the panel. But it doesn't do so until you've actually clicked into the playlist.

What I often do is use ctrl+tab to change the active playlist. I don't necessarily use the mouse. I would like the active playlist to be displayed in the panel right away, if possible.

If this doesn't make sense I'll attempt a screen recording :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-21 07:51:10
Thanks, so you're switching playlist using a tab and not the panel, right ?

try to update the panel script (main.js) with the following :
function on_playlist_switch() {
   window.Repaint();
}
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-21 08:21:59
That's right - and your suggestion works! Merci beaucoup  :D

The large number of playlists that I have is why I don't use the Playlist Organizer as my main switcher by the way (but it's still super useful for scanning through and showing me where I am).

With foo_plorg, when I focused on the Playlist Organizer I was able to just start typing the name of a playlist, and focus would jump progressively to the playlist, much like typing in a Windows Explorer window.
I suspect this is too hard to implement here, but it would be pretty awesome to have that capability!

Oh - and this is also why the "Sort" option for folders was so useful. I solved this by opening up pl_organizer.txt and (carefully) sorting the playlists there. So now that they're sorted in the panel, and changes will be easy enough to move into place individually.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-03-21 10:19:57
Loving the recent developments. Thanks!

Can you please tell me what do you do to have that error ? I'd like to try to reproduce it as it seems to work for me.
thanks

It's a weird one. After posting my previous message, auto-collapse was enabled and mostly functional, but I am still getting crashes.

I have recorded a video screencapturing the behaviour since it's much easier to demonstrate than try to explain, (https://www.dropbox.com/s/aesp727ydtaiqzh/output0036.avi?dl=0) but I'll try to explain as well: the script crashes when opening specific folders directly after other specific folders (e.g. opening "Unsorted" after "Main", or "Formats" after "Stuff I'm doing" as shown in the video), then when I reload the script, the folder I previously selected to open is open as intended. Basically it's crashing but then once reloaded it's resolved, so no actual loss of function. I just can't find rhyme or reason for it. The error code given is different to what I quoted before but similar, so probably part of the same issue (and the error code stays the same regardless of which folder caused the crash):

Code: [Select]
JavaScript runtime error
Unable to get property 'pl' of undefined or null reference
File: C:\Users\Dave\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 59, Col: 3
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-21 16:50:46
New version :
Playlist Organizer (Jscript Panel 3)
v1.3.1
21-03-2023

Version changes :
- Numbers on the right are now aligned correctly.
- The active song sign is now optional : Either keep it or change the color of the playlist.
- Code optimizations & fixes

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: antares on 2023-03-21 22:43:25
Hi etip,
its getting closer and closer to perfection! Thank you for your time-consuming job!

Two minor suggestions concerning design:

1. Folder and playlists have exactly the same outline. To ease distiction it would be more skillful to indent playlists to the right and give them a shorter outline. Example (see screenshot): the outline of the playlist „Live“ should be indented and should have a shorter outline than the folder „Default“. In addition, replace the folder-symbol by short arrows to indicate open and collapsed folder (see my 2nd screenshot in reply #8).

2. When selecting a folder or playlist, fonts mandatory gets bold. This might get obstructive as soon as you use small fonts, because fonts get blurry when they are small and bold. So leave them normal or give a choice.



Martin
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-03-22 06:39:51
Hi....my sugestion: show filesize and total length of a playlist by hover!
thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-22 08:56:48
Oh - and this is also why the "Sort" option for folders was so useful. I solved this by opening up pl_organizer.txt and (carefully) sorting the playlists there. So now that they're sorted in the panel, and changes will be easy enough to move into place individually.
At some point, i had the idea to use a multi dimensional array to manage folders & sub folders which would have made the sort option much easier (you sort (or not) a dimension of your array) but at that stage, that would mean a big big rework of the script
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-22 08:58:57
At some point, i had the idea to use a multi dimensional array to manage folders & sub folders which would have made the sort option much easier (you sort (or not) a dimension of your array) but at that stage, that would mean a big big rework of the script

Ah yeah makes sense. It is harder the way it's recorded, but now that I've got it how I want it, maintaining it will not be much work :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-22 08:59:50
1. Folder and playlists have exactly the same outline. To ease distiction it would be more skillful to indent playlists to the right and give them a shorter outline. Example (see screenshot): the outline of the playlist „Live“ should be indented and should have a shorter outline than the folder „Default“. In addition, replace the folder-symbol by short arrows to indicate open and collapsed folder (see my 2nd screenshot in reply #8).
The indentation is easy, i'll post it tonight. Also, i will try to gain space on the left side when not using the active song sign.
Frankly, i will not change the folder icon as i'm quite comfortable with it at that stage.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-22 09:02:13
It's a weird one. After posting my previous message, auto-collapse was enabled and mostly functional, but I am still getting crashes.
Thanks. The good news is that i was able to reproduce it, the bad news is that is random. didnt have time yesterday to investigate but i will.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-22 21:12:36
New version :
Playlist Organizer (Jscript Panel 3)
v1.3.2
22-03-2023

Version changes :
- if the option to not show the active song sign is chosen then the list starts closer to the left side of the panel.
- implemented a tooltip with the total length of the hovered playlist.
- Code fixes (hopefully)

@iridescentaudio can you please check if you still have the (auto Collapse) issue, i dont on my side but i'm not sure i solved it.
X

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-03-23 04:32:51
I love that someone is working on a script to emulate foo plorg functionality. Based on the posted screenshots I just wish the UI resembled the stock Windows UI, such as chevrons instead of folder icons for open/closed nodes. 🤷
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-03-23 04:38:34
So I obviously have not tried this yet, but is it possible to easily customize things like
- Collapsed icon
- Expanded icon
- Line height
- Line/text padding
- Selected background color
- Making the selected background color full-bleed to the edge of the margins
- Indent length

(all the kind of settings one would want to customized if you wanted to emulate the side panel in Windows 11 file explorer for instance)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-03-23 09:39:31
@iridescentaudio can you please check if you still have the (auto Collapse) issue, i dont on my side but i'm not sure i solved it.

Sadly not :( no change from before on my end. Hopefully it is an idiosyncratic usage case in my setup as I haven't seen anyone else report similar problems so far. I may experiment with renaming folders and playlists and see if anything changes.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: InchPerfect on 2023-03-23 11:40:20
This looks great. Thank you very much, etip.

But how do I install it?

I put panel_pl_organizer.js and pl_organizer.js into C:\foobar2000\profile\pl_organizer

Then I made a new tab with a JScript Panel 3 panel and then copied the contents of Main.js and pasted it into the JScript Panel 3 Configuration

So I overwrote this (etc)
(https://i.imgur.com/WR8EUIg.png)

with this (etc)
(https://i.imgur.com/iPivl6b.png)

Is that what I'm meant to do?

I got this error
Quote
JScript Panel 3.1.8 (Playlist Organizer v1.3.2 date 22/3/2023 by Seb + inspiration and abstract from marc2003)
JavaScript runtime error
Object doesn't support property or method 'GetGUID'
File: C:\foobar2000\profile\pl_organizer\pl_organizer.js
Line: 985, Col: 4
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-03-23 12:11:30
New version :
Playlist Organizer (Jscript Panel 3)
v1.3.2
22-03-2023

Version changes :
- if the option to not show the active song sign is chosen then the list starts closer to the left side of the panel.
- implemented a tooltip with the total length of the hovered playlist.
- Code fixes (hopefully)

@iridescentaudio can you please check if you still have the (auto Collapse) issue, i dont on my side but i'm not sure i solved it.
[attach type=thumb]25069[/attach]



Please cut total length like eg 2w 3d 4:67:01 an cut Listening time to "Total"

Thanx for the good work
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-23 12:39:06
I got this error
Quote
JScript Panel 3.1.8 (Playlist Organizer v1.3.2 date 22/3/2023 by Seb + inspiration and abstract from marc2003)
JavaScript runtime error
Object doesn't support property or method 'GetGUID'
File: C:\foobar2000\profile\pl_organizer\pl_organizer.js
Line: 985, Col: 4
GetGUID is a recent update from JS Panel 3, do you have the latest version ?
https://jscript-panel.github.io/docs/ (https://jscript-panel.github.io/docs/)
you need the 3.2.7
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-23 12:40:29
Sadly not :( no change from before on my end. Hopefully it is an idiosyncratic usage case in my setup as I haven't seen anyone else report similar problems so far. I may experiment with renaming folders and playlists and see if anything changes.
Hmm ... i'll continue to look tonight, but i dont have any leads to investigate. If another use can test the auto-collapse and provide feedback, that could help as well.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: InchPerfect on 2023-03-23 12:43:19
GetGUID is a recent update from JS Panel 3, do you have the latest version ?
https://jscript-panel.github.io/docs/ (https://jscript-panel.github.io/docs/)
you need the 3.2.7
Oh, sorry! That was it. Thanks very much.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: InchPerfect on 2023-03-23 12:48:53
I'm probably a bit quick to post this, seeing as I haven't even used it yet, lol, but don't these two statements contradict each other?
'
Quote
Known limitations :
 
 - Doesnt allow duplicate name for folder

List of functionalities :
 
 - Allow duplicate names for folders and playlist

Also. I'm not seeing the cover as the background. I can change the colour but when I select "set background to front cover" it just stays grey.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-23 13:09:52
Also. I'm not seeing the cover as the background. I can change the colour but when I select "set background to front cover" it just stays grey.
You need to play a song, and that song to have a cover front.
Thanks for the comment on the duplicate, i'll correct the help. It does allow duplicates for playlist names but not for folders.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-23 17:50:55
New version :
Playlist Organizer (Jscript Panel 3)
v1.4.0
23-03-2023

Version changes :
- The "folder" font is the 'label' font if you use CUI or the 'list' font if you use DUI, font can be set to bold in the option
- The "playlist" font is the 'items' font if you use CUI or the 'playlist' font if you use DUI
- The folder icon color can be set independently from the folder name color.
- bug fixe & tooltip change to reflect total length of a hovered playlist.

If someone has nice color setups, i can use them to create themes and make them available.

i wasnt able to test the DUI font on my setup, so i hope it works fine.

X

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-24 01:41:37
Thanks so much again @etip - the font changes make for very nice consistency!
I've noticed that the active folder highlight overlaps the 🎵 icon a little bit for me - it did this with the old font too. I have the font-size set to 10, but it also does it on the default 12.
(https://www.frogworth.com/pl_organizer_highlight_overlap.jpg)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-24 05:20:38
yep, thanks, i'll post a fix tonight or tomorrow !
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-03-24 10:35:21
I hate to report another bug! Font changes aren't working for me under CUI. Changing the fonts in the CUI config gives a crash with this error:

Code: [Select]
Object doesn't support property or method 'font_changed'
File: <main>
Line: 30, Col: 2
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-24 14:03:17
I hate to report another bug! Font changes aren't working for me under CUI. Changing the fonts in the CUI config gives a crash with this error:
My bad, the main panel script wasn't updated.
This will fix it and adjust the 🎵 icon a little bit on the left and the margin is slightly larger as well.
sorry about that.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-03-24 15:20:30
No longer getting a crash so that's good, but I'm still not having a lot of success.

I've established that the Folder font is "Common (Labels)" - changing the font to something else works fine, but changing the font style or size doesn't do anything, regardless of which font I use.
As for the Playlists font, I figure it should be "Common (list items)"? Changing that makes no difference at all. I tried all the other "items" fonts too and none of them do anything. I am not sure what font is currently being displayed in my interface, but it's definitely not the one I chose.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-24 16:53:30
do you use the default User Interface (DUI) or the Custom User Interface (CUI) ?
On CUI (my foobar), it is :
X
then choose custom to change font:
X
Click the "change" button and choose a font. When you click ok on that same window, the panel should update as it is a callback i'm using (on_font_changed)

This example is about the font change of the label item ie on the panel the folder, using CUI.

HTH

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-03-24 17:09:01
Yep, I'm using CUI. I think I'm doing everything right.

I've made another short video (https://www.dropbox.com/s/kjiskjbyn6y2qxc/output0037.avi?dl=0). The Playlists font doesn't change whatever I do, whereas the Folders font will change but only the font, not the font style or size.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-24 17:16:31
ok, i should have specified it but the size and style is not affected, only the font name will change.
You can however change size in the panel as well as the style (only for folder).
Frankly, i dont know what's happening as it works ok for me. i cant help but notice a playlist which is an icon (the magnifyer icon). Can you try to rename it to a text ?
thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-03-25 12:16:17
With the same portable installation on my second PC the icons view is wrong...both on windows 11:



Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-03-25 12:20:54
Understood. In that case the only mystery is why changing the Folder font works fine but the Playlists font doesn't (removing the 🔍 had no impact.) This could be another thing where it may be some idiosyncratic aspect of my setup, so maybe not worth worrying about for now.

With the same portable installation on my second PC the icons view is wrong...both on windows 11:

I had the same problem. You need to install this font (https://github.com/FortAwesome/Font-Awesome/blob/4.x/fonts/fontawesome-webfont.ttf?raw=true).
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-25 12:24:29
With the same portable installation on my second PC the icons view is wrong...both on windows 11:

Did you install the FontAwesome font (https://github.com/FortAwesome/Font-Awesome/blob/4.x/fonts/fontawesome-webfont.ttf?raw=true)? It's required by JScript Panel 3 (https://jscript-panel.github.io/docs/). Not that obvious, perhaps @etip could make a note about it in the 1st post in this topic.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-03-25 12:53:29
Wow, thanks it works!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-26 18:17:46
New version :
Playlist Organizer (Jscript Panel 3)
v1.5.1
26-03-2023

Version changes :
- Ability to sort (asc & desc) a folder content or the root.
- Lots of small fixes & code optimizations

This version doesnt require anymore the panel_pl_organizer.js file (hence 2 files only in the zip).
X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-27 02:07:24
Hi :)
v1.5.1 26-03-2023
1.) I have a problem with "Background > set background to front cover".

Playback > Stop
(https://i.imgur.com/ycyY2IV.png)

Playback > Play
(https://i.imgur.com/JoNlP8t.png)

2.) The selection frame is a little off
Font: Yu Gothic UI Font size: 10
(https://i.imgur.com/SnBHZQg.png)

3.) Settings are not saved. When you restart, it will return to the original.

Thanks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-03-27 12:26:08
Sorry for stupid question:
Having never used JScript Panel 3 before I'm struggling.
I don't think I'm putting the files in the right place. In a JScript Panel window I right click>Configure>Tools>Import>
\profile\pl_organizer1.5.1\main.js ?
But then I get JavaScript Error and a window with the following:
JScript Panel 3.2.7 (Playlist Organizer v1.5.1 date 26/3/2023 by Seb + inspiration and abstract from marc2003)
JavaScript runtime error
'_pl_organizer' is undefined
File: <main>
Line: 12, Col: 1

This is FB2K portable.
I feel so close but I'm just missing something!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-27 12:56:25
@iangk

folder rename "pl_organizer"

\profile\pl_organizer\main.js
\profile\pl_organizer\pl_organizer.js

Configure... > Tools > Import > bottom right「JScript files (*.js)」"Main.js" Selection

Reload on error
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-03-27 13:08:19
@iangk

folder rename "pl_organizer"

\profile\pl_organizer\main.js
\profile\pl_organizer\pl_organizer.js

Configure... > Tools > Import > bottom right「JScript filoes (*.js)」"Main.js" Selection

Reload on error
Just renaming the folder as suggested worked a treat. Thank you!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-03-27 15:59:16
One little thing. Changing the font size isn't remembered on restart. It's always 10. (Right-click>Text>Font size) This is DUI
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-27 16:04:57
@iangk

I wrote above
https://hydrogenaud.io/index.php/topic,123820.msg1024152.html#msg1024152
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-03-27 16:09:31
@iangk

I wrote above
https://hydrogenaud.io/index.php/topic,123820.msg1024152.html#msg1024152
Yes, missed your point 3, and confirm same happens for me.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-27 16:57:07
@Airken
I was wondering what your point 3 was about and i get it now. Yep, this is probably due to the changes i did this week end. I'll fix it tonight. Same as your point 2 (i'll try to be slightly broader).
Re your point 1, do you have this issue with all covers or specially this one ? (i'm at loss there tbh).
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-27 17:08:19
@etip

Thank you for your reply.
Happens on all Albumarts. Confirmed on multiple PC and multiple foobar.
v1.4.1 was fine
----------
It is an example that was fixed by Dark Mode.

(https://i.imgur.com/CCkA58o.png)

(https://i.imgur.com/XOLf7Zk.png)

Thanks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-27 17:41:20
@Airken
So it works on dark mode and not on normal mode ? (if so i'm surprised it worked before 1.4.1)
Also, looking at the dark mode example, would you say the opacity is enough or not ? (it's at 10% at the moment)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-27 17:48:42
I tested by switching normal and dark mode with the same foobar.
Dark Mode works fine.opacity is enough.

Both Default UI and Columns UI are the same.
Dark Mode is fine.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-27 22:02:04
New version :
Playlist Organizer (Jscript Panel 3)
v1.5.2
27-03-2023

Version changes :
- fix cover background for light mode
- selection bar is slightly wider
- text size is now persistent

X

@Airken let me know if that fixes these topics for you. I have weird behavior with certain fonts (like Yu Gothic by example) and i'm still trying to understand what's going on.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: InchPerfect on 2023-03-28 00:14:16
Thanks for all these updates. You're too kind to us. 👍

And now I'm going to ask for another!

Any chance of a font size 9 option please?

It's the default font size and I'd imagine it would be more used than size 32.

And is it possible change the colour of that red bar near the top?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-28 02:11:10
@etip

problem solved.
Many Thanks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-28 04:55:28
  • Type to search - i.e. start typing name of playlist to jump to it
@frogworth
2 questions for you to try to understand the logic you are after.
- what you type would be the beginning of the playlist name (and not char within the playlist name) ?
- if a folder is closed, is that part of the search ? (in case that means the folder would open up)
thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-28 06:05:57
  • Type to search - i.e. start typing name of playlist to jump to it
@frogworth
2 questions for you to try to understand the logic you are after.

Thanks so much for thinking about this!
I hope that typing what I guess are letters and numbers won't interfere with the navigation shortcuts - don't think so.

So re these questions:
Quote
- what you type would be the beginning of the playlist name (and not char within the playlist name) ?
- Yes, I think it should be "playlists beginning with...". It would be too confusing to match characters inside a playlist name, I think!
The way I imagine it, with focus on the panel, you start typing, and it takes you to the first playlist that begins with the letters you've typed. It may be worth having a small latency there, so that typing a few letters in quick succession doesn't cause it to jump around too much?
(The other way would work, I guess, like the filtering on the keyboard shortcuts settings page. That's a classic case where typing four or five letters, it struggles to keep updating the results each time.)

Quote
- if a folder is closed, is that part of the search ? (in case that means the folder would open up)
- I don't really have an opinion on how it behaves if a folder is closed. I generally always have folders open. My instinct is that playlists inside closed folders should not be included, but I'm not set on that.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ASopH on 2023-03-28 09:27:23
Hi,

a right-click on a playlist crashes the panel:

JScript Panel 3.2.7 (Playlist Organizer v1.5.2 date 27/3/2023 by Seb + inspiration and abstract from marc2003)
Laufzeitfehler in JavaScript
Die Eigenschaft "name" eines undefinierten oder Nullverweises kann nicht abgerufen werden.
File: C:\Users\xyz\Desktop\foobar2000 v2.0 b28 (x64) Test\profile\scripts\js\pl_organizer.js
Line: 606, Col: 8
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-28 10:09:23
@ASopH

Is the location of the script file correct?
https://hydrogenaud.io/index.php/topic,123820.msg1024163.html#msg1024163
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ASopH on 2023-03-28 10:26:42
@AIR Ken :-)

Hi and yes:
JScript Panel 3.2.7 (Playlist Organizer v1.5.2 date 27/3/2023 by Seb + inspiration and abstract from marc2003)
Laufzeitfehler in JavaScript
Die Eigenschaft "name" eines undefinierten oder Nullverweises kann nicht abgerufen werden.
File: C:\Users\xyz\Desktop\foobar2000 v2.0 b28 (x64) Test\profile\pl_organizer\pl_organizer.js
Line: 606, Col: 8

It makes no difference

cheers :-)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-28 10:38:28
foobar2000 v2.0 beta 18 newer?
(>File: C:\Users\xyz\Desktop\foobar2000 v2.0 b28 (x64) Test): confirmation)

Please show me the SS when the Playlist Organizer Panel is displayed for the first time.
Please wait for the answer from the author.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ASopH on 2023-03-28 11:58:07
Yes it't foobar v2.0 BETA 28 ...
Panel start is ok - only when I right-click on a playlist (e.a. LIBRARY VIEWER SELECTION) it crashes.

@AIR Ken: what you mean with "SS" ??

Edit: hmm.. error is no longer reproducible - sorry -
Edit2: this happen only, when no playlist ist highlighted and the I right-click
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-03-28 12:07:47
Yes it't foobar v2.0 BETA 28 ...
Panel start is ok - only when I right-click on a playlist (e.a. LIBRARY VIEWER SELECTION) it crashes.

@AIR Ken: what you mean with "SS" ??

Edit: hmm.. error is no longer reproducible - sorry
This happens to me on startup. The appearance is the selection frame around a playlist not the selection bar, meaning nothing is selected. Right-click > Javascript error.
If I left-click to select something first, then right-clicking doesn't crash.
So it seems on startup nothing is initially selected, and that causes the crash.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-28 17:26:26
@ASopH

Preferences > Media Library > Library viewer selection playlist > Enable (on)

I tried sending from "Album List" to "Library viewer selection playlist".

> Edit2: this happen only, when no playlist ist highlighted and the I right-click

both were fine

Have you rebuilt your media library?
and Create a new Playlist.

Back Up:
\profile\library-v2.0
\profile\playlists-v2.0
\profile\metadb.sqlite
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ASopH on 2023-03-28 17:45:36
Yes, media library is rebuild, it's only happened after first start and no PL is selected.
Preferences > Media Library > Library viewer selection playlist > Enable (on) IS selected!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-28 19:53:31
yes, i'll post a fix to that, didnt have time yesterday :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-28 20:32:02
- I don't really have an opinion on how it behaves if a folder is closed. I generally always have folders open. My instinct is that playlists inside closed folders should not be included, but I'm not set on that.

I've started to work on it, the idea is to push (and stay pushed) shift to input chars, if you release shift the process stops. At each char (maybe with a min of 3), if a playlist matches, it selects it. Something like it.
And yes, i will not open folders.
Thanks for your answer.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-28 21:45:26
New version :
Playlist Organizer (Jscript Panel 3)
v1.6.0
28-03-2023

Version changes :
- font size starts at 9
- Color of the line separating the header from the list can be customized.
- fix crash when right clicking at load up
- implemented a search functionality : Triggering it using shift, closing it using shift again. Search starts at the third character.
@frogworth : let me know what you think and how to improve it (i need to make sure the scroll goes to the selected item).

The files "inputbox.js" & "pl_organizer.js" need to be copied in the pl_organizer folder (the inputbox.js file is new and was developped by @marc2k3 )
X

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-03-28 22:49:23
(the inputbox.js file is new and was developped by @marc2k3 )

Nope, not my work. Whichever one you took from JSPlaylist or the Smooth folder is by the original author of those scripts (Falstaff). Obviously I've had to update them many times over the years to keep up with all my breaking component changes but the main bits that do all the work haven't really been touched.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-28 22:55:04
yep, smooth folder. Thanks for the clarification.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-03-28 23:09:46
First of all, thaks for doing this. As this is the last absolutely essential component not available as 64-bit (standalone) I decided to give this version a try :) (also, this script is the reason I decided to install JScript Panel after all, even if I for a long time didn't want to)

Some observations/questions:

Can the "Total" (duration) tooltip be disabled? I find it rather irritating, and I'd rather have that info show up in the right column (which now can be toggled between "number of items" and "number of items + size"). So this is also a request to add "total duration" as an option to the right column.
Same question about the drag and drop tooltip, so actually this request is generally for an option to turn the tooltip on and off.

I know you just updated it to have minimum font size at 9, but I'd still like to request size 8 as a minimum as my entire interface is Tahoma size 8 (and 8 is also the minimum in the DUI fonts picker).

The playlist selection bar is a bit off and acts a bit strangely in some cases (these screenshots were taken with 1.5.2 and text size 10 just before 1.6.0 was out, but the behaviour is the same with 1.6.0 and size 9)

Selected playlist clashes with the top bar in some cases:
(https://i.imgur.com/R2FSwoh.png)
There is actually a playlist between "Goa Trance" and "Goa Trance Revolution" but it's hidden (as it's supposed to)

The bounding box is too high and not centered:
(https://i.imgur.com/KabYUj9.png)

And then a quite strange one:
Sometimes, sorting (or as it's named, "Filter (Asc/Desc) on folder" which confused me a bit at first) just doesn't work. For example, I have a folder with playlists prefixed with numbers (01-13 currently) and no matter which sorting option I choose (Asc/Desc) the playlists stay sorted as 13->01 (descending). For some reason it looks like if you have even a single playlist where the name starts with a number (or actually, any symbol not A-Z it seems), and you have that playlist in a folder, sorting that folder's playlists only works descending, not ascending. I can do some further investigation if needed, this is preliminary info. Edit: forget that, sorting ascending inside folders doesn't work at all, or rather, it doesn't do anything to the current order, whatever it might be. In the root it seems to work, but I made the mistake of trying that and it sorted my folders in with the playlists which was a bit of an unpleasant surprise.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-03-29 00:46:18
Still getting this occasionally when right clicking:

JScript Panel 3.2.7 (Playlist Organizer v1.6.0 date 28/3/2023 by Seb + inspiration and abstract from marc2003)
JavaScript runtime error
Unable to get property 'id' of undefined or null reference
File: C:\Users\XXXX\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 800, Col: 6
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-03-29 02:12:18
Well, I might as well keep talking to myself here in the middle of the night, but something is seriously off with sorting the playlists. Now that I finally finished organizing my over 600 playlists into folders (with nothing in the root folder), sorting works both ways...until it doesn't. Meaning that sorting a folder ascending might look like it's sorted in alphabetical order, but suddenly there's a jump. Look at this (this is a snippet from my Artists folder):
(https://i.imgur.com/f6JcXe2.png)
It actually starts at the beginning of the list at Astral Projection, then goes alphabetically to almost to the end of playlists starting with G (skipping some playlists no, actually that entire 12 Moons - Asia 2001 section should be in alphabetical order at the beginning of the folder, before Astral Projection) then jumps back to Asia 2001 and it actually goes in reverse alphabetical (descending) order until 12 Moons, then continues again from Gus Till in what seems like a proper alphabetical order until the end of the folder. This doesn't happen with all folders though (at least as far as I can tell) and how the playlists are actually sorted varies quite randomly (or at least not following any pattern I can figure out).
Another weird side effect of sorting is that sorting one folder has a high possibility to cause another random folder to go into a random sorting order. And when you go and sort that folder it messes up another folder and so on and so on.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-29 02:56:34
Still getting this occasionally when right clicking:

JScript Panel 3.2.7 (Playlist Organizer v1.6.0 date 28/3/2023 by Seb + inspiration and abstract from marc2003)
JavaScript runtime error
Unable to get property 'id' of undefined or null reference
File: C:\Users\XXXX\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 800, Col: 6

Ignore that error when you get it, which is common.
Drag and Drop, right click, mouse operation.

Right click > Reload.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-03-29 03:41:06
Ignore that error when you get it, which is common.
Drag and Drop, right click, mouse operation.

Right click > Reload.

Okay, yes it's more like an annoyance.
I figured out that rclick -> reload already (fortunately no changes are lost)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ASopH on 2023-03-29 08:37:09
New version :
Playlist Organizer (Jscript Panel 3)
v1.6.0
28-03-2023

Version changes :
- font size starts at 9
- Color of the line separating the header from the list can be customized.
- fix crash when right clicking at load up
- implemented a search functionality : Triggering it using shift, closing it using shift again. Search starts at the third character.
@frogworth : let me know what you think and how to improve it (i need to make sure the scroll goes to the selected item).

The files "inputbox.js" & "pl_organizer.js" need to be copied in the pl_organizer folder (the inputbox.js file is new and was developped by @marc2k3 )
[attach type=thumb]25101[/attach]


Right-Click Error is fixed - thank you  ;)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-29 09:39:26
Ignore that error when you get it, which is common.
I have to admit i created my folders and dont really need to create new ones for my library so i'm not testing that functionality. Still, i'm surprised it's common. Can you describe the situation in which you have this error ?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-29 09:44:32
Well, I might as well keep talking to myself here in the middle of the night, but something is seriously off with sorting the playlists. Now that I finally finished organizing my over 600 playlists into folders (with nothing in the root folder), sorting works both ways...until it doesn't. Meaning that sorting a folder ascending might look like it's sorted in alphabetical order, but suddenly there's a jump. Look at this (this is a snippet from my Artists folder):

It actually starts at the beginning of the list at Astral Projection, then goes alphabetically to almost to the end of playlists starting with G (skipping some playlists no, actually that entire 12 Moons - Asia 2001 section should be in alphabetical order at the beginning of the folder, before Astral Projection) then jumps back to Asia 2001 and it actually goes in reverse alphabetical (descending) order until 12 Moons, then continues again from Gus Till in what seems like a proper alphabetical order until the end of the folder. This doesn't happen with all folders though (at least as far as I can tell) and how the playlists are actually sorted varies quite randomly (or at least not following any pattern I can figure out).
Another weird side effect of sorting is that sorting one folder has a high possibility to cause another random folder to go into a random sorting order. And when you go and sort that folder it messes up another folder and so on and so on.
I do not have that many playlists and my folders usually hold just a few playlists so it works well for me. I'll take a look tonight and will let you know.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-03-29 11:34:11
Ignore that error when you get it, which is common.
I have to admit i created my folders and dont really need to create new ones for my library so i'm not testing that functionality. Still, i'm surprised it's common. Can you describe the situation in which you have this error ?


mouse operation.
Playlist/folder: right click, drag & drop
unspecified.

In my case it almost never crashes now.
But I'm surprised some people are still crashing.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-29 13:11:43
New version :
Playlist Organizer (Jscript Panel 3)
v1.6.0
28-03-2023

- implemented a search functionality : Triggering it using shift, closing it using shift again. Search starts at the third character.
@frogworth : let me know what you think and how to improve it (i need to make sure the scroll goes to the selected item).

This is pretty awesome, @etip! Thanks.
Now that I see how you're triggering it - tap shift once, enter text - I can see that actually a search for anywhere within a playlist title could actually be super cool.
Not sure how many other users will use this, but I really like it.

I would like the panel to scroll the active playlist into view, yes please!
I'll keep using it a bit and see if anything bugs me, or anything else comes to mind.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-29 14:45:47
thanks for the feedback, another thing is if you delete a char in the inputbox, using backspace (by example), i dont think the search happens. I'll check that out tonight.
 
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-29 14:46:39
thanks for the feedback, another thing is if you delete a char in the inputbox, using backspace (by example), i dont think the search happens. I'll check that out tonight.

Ah yes, for me it seemed like backspace just didn't work. I didn't want to mention as it's easy enough to hit shift twice and start again...
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-29 14:48:06
In my case it almost never crashes now.
But I'm surprised some people are still crashing.
@paul Eye : can you please give a bit of context for these crashes you experienced ?
Thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-29 23:14:58
New version :
Playlist Organizer (Jscript Panel 3)
v1.6.0
28-03-2023

Version changes
- font list includes size 8
- search functionality improved with :

X

@Paul Eye :
I've looked at 2 things :
What you called the "Selected playlist clashes with the top bar in some cases"
I didnt manage to find the source of the issue (hopefully yet) but i was able to reproduce.

And the sort functionality.
I was not able to reproduce the issue, i created a big folder with 30 playlists, put some random numbers in front of some, and the sort works as designed, both ways.

Regarding the selection bar not centered around the playlist name, i'm not sure i can do anything about it as it kind of is dependant of the font you choose. Can you try the Segoe UI for me and let me know if it's well centered ?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-30 13:38:22
Thanks for the latest update, @etip!
The search itself is working very well.
But I'm personally finding that backspace still doesn't work?
Also, the view for me doesn't successfully scroll to the selected playlist - it seems to mostly jump right to the bottom of my panel.
Anything I can do test/demo this? I can take a peek at the code in a few days but not right now.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-03-30 18:25:47
Thanks for the font size 8 option :)

I've looked at 2 things :
What you called the "Selected playlist clashes with the top bar in some cases"
I didnt manage to find the source of the issue (hopefully yet) but i was able to reproduce.

Okay, good to know.

Quote
And the sort functionality.
I was not able to reproduce the issue, i created a big folder with 30 playlists, put some random numbers in front of some, and the sort works as designed, both ways.

Hmm, that's strange. I don't know if the sorting issue has something to do with how many playlists a folder contains, but as I said, it seems completely random how the sorting works (and doesn't). Now suddenly my "Artists" folder with 268 playlists sorts neatly in ascending/alphabetical order, and that folder with playlists currently prefixed with numbers 01-13 refuses to sort in ascending order no matter how many times I try both asc and desc sorting, it just stays stuck at 13->01 (I know it's not much of a hassle to sort it manually but still it doesn't solve the underlying issue). My "Labels" folder with 107 playlists now sorts almost in asc/alphabetic with just a few stray entries at the top sorted descending.
I wish I could help more but as this is quite random this is all I can do.

Quote
Regarding the selection bar not centered around the playlist name, i'm not sure i can do anything about it as it kind of is dependant of the font you choose. Can you try the Segoe UI for me and let me know if it's well centered ?

It's exactly the same if I change to Segoe UI. Something I noticed is that the red drag and drop bounding box that appears then you drop a playlist into a folder is properly sized and aligned. Where does it get its values from? (just a thought)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-03-30 18:32:02
In my case it almost never crashes now.
But I'm surprised some people are still crashing.
@paul Eye : can you please give a bit of context for these crashes you experienced ?
Thanks


It's quite rare now, but if it happens it's the same as reported earlier, right click a playlist/folder. I'll let you know if it happens again, but as stated it's not a big hassle to just reload the script :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-31 09:09:18
What you called the "Selected playlist clashes with the top bar in some cases"
I didnt manage to find the source of the issue (hopefully yet) but i was able to reproduce.
Okay, good to know.
Found it, i'll post a fix later today

Thanks for the latest update, @etip!
The search itself is working very well.
But I'm personally finding that backspace still doesn't work?
Also, the view for me doesn't successfully scroll to the selected playlist - it seems to mostly jump right to the bottom of my panel.
Anything I can do test/demo this? I can take a peek at the code in a few days but not right now.

yes the jump is funky. i'll investigate.
Can you describe the backspace ? can't you edit the search text with (it deletes the previous char) or it doesnt search when you hit the backspace button ?
thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-31 11:06:41
yes the jump is funky. i'll investigate.
Can you describe the backspace ? can't you edit the search text with (it deletes the previous char) or it doesnt search when you hit the backspace button ?
thanks

Hm, that's weird. For me, backspace doesn't work at all. I'm on a Mac in Parallels, but it should be transparently mapping "delete" to Backspace. Delete (i.e. forward delete) does work - i.e. back arrow and then delete!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-03-31 11:17:19
frogworth, can you test this in a fresh panel.
Code: [Select]
function on_key_down(vkey) {
console.log("on_key_down", vkey);
}

function on_char(code) {
console.log("on_char", code);
}

When hitting the backspace on windows, it displays this in the Console...

Code: [Select]
on_key_down 8
on_char 8

Can you confirm if both lines are printed and the same?

If it does work, try loading Smooth Playlist Manager from the Samples button. Hit F2 (or you use the right click menu) to rename any playlist and see if backspace works there??
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-31 11:35:54
Hi @marc2k3,
OK, so bizarrely, nothing is logged when I hit Backspace!
Left arrow, delete, everything else gets logged.

I even just went and added an explicit mapping for the Mac keyboard's "delete" key to "Backspace", but it's still not logged!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-03-31 11:51:11
Well I'm afraid nothing can be done by me to work around this. It seems to be an incompatibility with Parallels?? All my component does is pass on windows messages completely untouched. I assume backspace works everywhere else it's supposed to??

If you're using using DUI, it might be interesting to test CUI or vice versa??
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-03-31 11:52:28
If you're using using DUI, it might be interesting to test CUI or vice versa??

I haven't gotten my head around CUI - after decades using foobar2000 lol, so I probably should! I'll give it a go.
I'll look into this also, maybe someone's come across it in another context.
Thanks!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-03-31 11:53:53
I'm definitely not suggesting switching - just that it might be an interesting test. Assuming you can figure out the layout editing!  :))
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-03-31 17:09:57
Playlist Organizer (Jscript Panel 3)
v1.6.0
28-03-2023

Version changes :
- bug fixes : Display of a selected folder/playlist in the header area (@paul eye : It should be ok now)
- The focus will now jump correctly to the searched playlist. @frogworth : let me know if it works

X

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-04-01 01:53:03
It's better, but in a few cases it doesn't get it quite right.
Hard to define - sometimes it just has the folder in view, sometimes it's a few items below the selected folder.
Also, sometimes I get a runtime error:
Code: [Select]
Unable to get property 'lvl' of undefined or null reference
File: L:\Dropbox\foobar2000\profile\pl_organizer\pl_organizer.js
Line: 77, Col: 4
In this case I was typing the start of "peter gabriel". May have something to do with the underlying index of that playlist? I do have a lot of playlists in the Artists folder!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-04-01 01:54:09
Tbh, @etip I would strongly prefer to remove the up and down arrows at the top and bottom of the panel, giving more vertical space, and replace with a scrollbar, which I saw does exist in some Jscript Panel 3 samples.
I realise this isn't your preference though.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-04-01 13:11:36
Tbh, @etip I would strongly prefer to remove the up and down arrows at the top and bottom of the panel, giving more vertical space, and replace with a scrollbar, which I saw does exist in some Jscript Panel 3 samples.
I realise this isn't your preference though.
I'd prefer a standard scrollbar too, since all my other panels that need one have one.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-04-01 13:15:34
- bug fixes : Display of a selected folder/playlist in the header area (@paul eye : It should be ok now)
Yep, that's fixed now, thanks :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-04-01 13:38:08
Regarding the up/down buttons, if I scroll to the bottom, leaving only the up button visible, then collapse a folder such that everything fits, the up button doesn't go away.
Fwiw I'd prefer scrollbar too :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-02 17:48:54
Playlist Organizer (Jscript Panel 3)
v1.6.3
02-04-2023

Version changes :
- Created a save & restore function under the customization menu in the header area. This will allow to archive the text file that manages the sort & folders configuration and to restore it anytime.
- Rewrite of the Delete function : I realized that when a folder was deleted, the playlists of any subfolders were badly tagged in the configuration file. If you think you had done that (deleted a folder that has subfolders in it), you may want to make sure the text file is ok.

Regarding the scrollbar, i took a first glance the other day and understood it may be complicated to integrate it. I'll try though.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-04-04 14:14:23
Regarding the scrollbar, i took a first glance the other day and understood it may be complicated to integrate it. I'll try though.

I have been using this Playlist Organizer over the last week and haven't had any new complaints. It feels solid and dependable to me now. A scrollbar, and perhaps getting rid of that red line at the top :D are the last things I can personally think of wanting for this, so I wish you luck.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: InchPerfect on 2023-04-04 15:14:32
... and perhaps getting rid of that red line at the top :D are the last things I can personally think of wanting for this, so I wish you luck.
You can change the colour of the red line in the latest versions (thanks, etip).

Right click the header and choose Header line color ...

I think the default grey is RGB all set at 192.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-04-06 09:54:48
You can change the colour of the red line in the latest versions (thanks, etip).

Ohh sick... today I learned. Thank you ~ the line has magically disappeared.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-04-06 20:51:18
Hi!
Can you please make the bar narrower towards the bottom?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-08 09:11:58
@DJ FRANK G.
you mean this area that you want shorter ?

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-04-08 09:49:22
I think DJ FRANK G. is referring to the vertical height of the Selection Bar, unless I am mistaken. It's shorter at the top/longer at the bottom (I hadn't honestly noticed this before.)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-08 09:51:45
ah i get it, thanks.
yep, i have that on my mind, but i honestly dont know why.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-04-08 10:51:27
 ;)
...and the icons are not in the center (verticall) to the folder names.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-04-08 10:52:46
I think DJ FRANK G. is referring to the vertical height of the Selection Bar, unless I am mistaken. It's shorter at the top/longer at the bottom (I hadn't honestly noticed this before.)
thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-04-08 10:57:57
i don' t need the top bar. Can you make it to disable per option? More place for Playlists.  Please...
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Paul Eye on 2023-04-13 16:30:40
Just a little heads up in case anyone cares, I trimmed down my fb2k installation, JScript panel was one of the components that had to go. So obviously I won't be using this plorg substitute anymore either. You can ignore my feature requests if needed.
Title: Re: MTPL playlist foo.mtpl this component does start
Post by: grfoo1 on 2023-04-13 17:29:21
i have installed this component correctly .
it does not run .
Ideas ? .
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-14 22:37:18
what's happening exactly ?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-22 23:17:07
Playlist Organizer (Jscript Panel 3)
v1.7.0
22-04-2023

Version changes :
- implemented a scrollbar
- made the header shorter.

I hope i didnt break anything else. Known bug, when you delete a playlist/folder, the scrollbar disappears for i dont know what reason. It isn't fixed yet.

the zip has now 4 files :
- main.js which is the main script (copy/paste)
- the 3 others need to go into the pl_organizer folder.


X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-04-23 03:14:17
Amazing! Thanks so much @etip, I'll have a play and let you know if I encounter any unknown bugs.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-04-23 08:32:23
New version doesn't work... :-(
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-23 08:58:22
here is the fix (i hope), but it should have worked. Are you sure you did copy the 3 files into the pl_organizer folder ?

Best
X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: DJ FRANK G. on 2023-04-23 09:10:18
thanks...faster than lightning
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-04-24 08:57:10
I hope i didnt break anything else. Known bug, when you delete a playlist/folder, the scrollbar disappears for i dont know what reason. It isn't fixed yet.

I've also found this happen when restarting foobar2000. Other than that this feels complete, extremely hyped to have a scrollbar, and a dark mode one at that 8) - thank you again.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-24 20:46:53
ah thanks. I didnt even notice that as my foobar was up for a while. It's good lead though.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-04-25 11:26:31
A little scrollbar glitch: If the playlist size is not long enough to need the scrollbar, then either by expanding folders or shrinking the height of the window such that the scrollbar is needed, then reverting back to the smaller size by closing folders/expanding height, the scrollbar remains populated, and trying to scroll it results in Javascript error crash.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-25 17:51:24
ok, thank you, i'll look into it and will probably post a fix tomorrow.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-04-25 22:35:50
Playlist Organizer (Jscript Panel 3)
v1.7.2
25-04-2023

Version changes :
- fix scrollbar not disappearing when # of lines displayed < # of lines that can be displayed.

@iangk : Let me know if that fixes the issue for you.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-04-26 11:59:58
@etip : Yes, that works perfectly thanks, now the scrollbar doesn't show when not needed.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: rednoise on 2023-05-03 23:49:27
I installed the latest version from above and it worked for a bit until I tried to change the font size from 12 to 10. I then got the following error, and I still get it on starting FB2K. I've tried uninstalling and reinstalling the Javascript Panel and pl_organizer, but I still get the error. Can I resolve this somehow?

JScript Panel 3.2.16 (Playlist Organizer v1.7.2 date 25/4/2023 by Seb + inspiration and abstract from marc2003)
JavaScript runtime error
Unable to get property 'foldState' of undefined or null reference
File: C:\Users\[redacted]\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 1240, Col: 5
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-04 03:37:38
Hi,
I apologize for the issue. I will look into it but unfortunately not before beginning of next week as I’m on vacations.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2023-05-05 07:59:37
i just upgraded to 2.0 and ran into problems with foo_plorg, so this is very lovely! i do have a quick request, would it be possible to do a ... thing if the playlist has too long of a name? i sometimes have long names for playlists, and in your panel, it comically sticks out over top the total track value and the scrollbar.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: rednoise on 2023-05-06 19:48:21
Hi,
I apologize for the issue. I will look into it but unfortunately not before beginning of next week as I’m on vacations.

I can wait, take your time. I'll be interested to hear what you think about this. I have uninstalled foo_jscript_panel3 and pl_organizer and deleted every file and trace I can find that has to do with those components. And yet when I reinstall them I get the same error message. Maybe I'm missing a file somewhere else? I can't figure it out.

Windows 10 22H2, Foobar2000 v2.0 [x86]. pl-organizer works on two other computers in my home, but I didn't try to mess with the font size on those, which seems to have precipitated the problem on this one computer.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-07 22:43:33
before looking at the code, which i'll do tomorrow, can you try with a blank "pl_organizer.txt" ? you can archive the current one in the parameter menu.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-05-09 10:45:05
As for the Playlists font, I figure it should be "Common (list items)"? Changing that makes no difference at all. I tried all the other "items" fonts too and none of them do anything. I am not sure what font is currently being displayed in my interface, but it's definitely not the one I chose.

Heads up, I've discovered what was causing this. I had the "Core: List Items" element set to Custom mode, which was overriding changes made to Common (list items.) Changing "Core: List Items" to the "Common (list items)" mode fixed it, so now custom fonts affect the Playlist text as intended. I don't know whether this is a bug or an intended behaviour really, but thought you (or anyone) may like to be aware that this happens.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Daxtear on 2023-05-09 13:02:34
Hello! You're doing god's work with this panel. I could finally switch over to x64 foobar...
I ran into an error while dragging a playlist into a folder. Apparently it tried to access the property "pl" on a null value at line 69 in pl_organizer.js. It hasn't happened again, but maybe look into that.
Also I would like to request two options:
-Opening folders by single-clicking on the folder symbol (not the text)
-Opening the rename window by double-clicking the text on a folder or playlist
Both of these are features that existed in foo_plorg and I would be very happy if you could find the time to implement them.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-09 17:14:15
Playlist Organizer (Jscript Panel 3)
v1.7.3
9-05-2023

Version changes :
- fix scrollbar not appearing at startup.
- fix the long playlist name overlapping with the # of items.

i just upgraded to 2.0 and ran into problems with foo_plorg, so this is very lovely! i do have a quick request, would it be possible to do a ... thing if the playlist has too long of a name? i sometimes have long names for playlists, and in your panel, it comically sticks out over top the total track value and the scrollbar.
Let me know if that fixes it for you. Thanks

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-09 17:26:02
Heads up, I've discovered what was causing this. I had the "Core: List Items" element set to Custom mode, which was overriding changes made to Common (list items.) Changing "Core: List Items" to the "Common (list items)" mode fixed it, so now custom fonts affect the Playlist text as intended. I don't know whether this is a bug or an intended behaviour really, but thought you (or anyone) may like to be aware that this happens.

It is strange as for me, the core: list items has no impact on the font the panel displays. I just changed it to Stencil and my font keeps on being the "common" one.
However there is a note on the documentation of Js Panel 3 :
"Not all fonts supported by Default UI / Columns UI can be used by this component. This is because they use older GDI graphics whereas this component uses DirectWrite. If an unsupported font is detected, the method will fallback to returning Segoe UI. The most likely cause of this happening would be using Raster fonts like System or Small Fonts."
Do you use a specific font ?

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-09 17:29:05
Hi,
I apologize for the issue. I will look into it but unfortunately not before beginning of next week as I’m on vacations.

I can wait, take your time. I'll be interested to hear what you think about this. I have uninstalled foo_jscript_panel3 and pl_organizer and deleted every file and trace I can find that has to do with those components. And yet when I reinstall them I get the same error message. Maybe I'm missing a file somewhere else? I can't figure it out.

Windows 10 22H2, Foobar2000 v2.0 [x86]. pl-organizer works on two other computers in my home, but I didn't try to mess with the font size on those, which seems to have precipitated the problem on this one computer.
did you delete the pl_organizer.txt file as well ?
It is supposed to be in the profile folder or in the foobar root if you dont have a profile folder.
from the error message thrown,  there is no relationship with the font size you changed.
Let me know.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-09 19:28:23
Hello! You're doing god's work with this panel. I could finally switch over to x64 foobar...
I ran into an error while dragging a playlist into a folder. Apparently it tried to access the property "pl" on a null value at line 69 in pl_organizer.js. It hasn't happened again, but maybe look into that.
Also I would like to request two options:
-Opening folders by single-clicking on the folder symbol (not the text)
-Opening the rename window by double-clicking the text on a folder or playlist
Both of these are features that existed in foo_plorg and I would be very happy if you could find the time to implement them.
well, you probably wont like my answers but here they are anyway :)
Sorry about the error message. While this happens from time to time, it doesnt affect the result of your action and you have to reload the scripts to continue.
Regarding your requests, i would have done them but i'm afraid it will impact how other users are interacting with the panel as you're the only one requesting this. So for now, i will not change it but if other users want that change, i may reassess.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2023-05-09 20:48:22
Let me know if that fixes it for you. Thanks
yes, perfect! thank you so much, this is beautiful! (edit: i noticed if you select the playlist it still shows the full name, like this (https://i.imgur.com/69qknNz.png), but this is a very minor issue for me)

i have one more request: is it possible to make it so if you drag&drop a track/folder into a blank space, it creates a new playlist? ideally it could have the name of the file (or folder), but even if it was just called "new playlist (#)" that would be fine for my habits.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-10 07:00:16
It is strange as for me, the core: list items has no impact on the font the panel displays. I just changed it to Stencil and my font keeps on being the "common" one.

window.GetFontCUI has 2 choices...

Code: [Select]
var FontTypeCUI = {
items : 0,
labels : 1,
};

They correspond directly with Common (list items) and Common (labels). That's it. You can set them to Custom and pick any font you want but of course that would affect any other panel using the defaults.

If you want finer grained control over what to use in your panel, look at utils.ListFonts and present your own menu. An included Sample in the basic folder (DWriteFonts) uses this method to list/preview all installed fonts.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-10 07:01:21
(edit: i noticed if you select the playlist it still shows the full name

My bad, i'll post a fix later. thanks for pointing it out.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-10 07:06:34
Thanks Marc,
That was my understanding, hence my remark on the fact "core: list items" had no impact.

If you want finer grained control over what to use in your panel, look at utils.ListFonts and present your own menu. An included Sample in the basic folder (DWriteFonts) uses this method to list/preview all installed fonts.
thanks, i'll look at this example.
Edit : Regarding the following note in your documentation :
"Not all fonts supported by Default UI / Columns UI can be used by this component. This is because they use older GDI graphics whereas this component uses DirectWrite. If an unsupported font is detected, the method will fallback to returning Segoe UI. The most likely cause of this happening would be using Raster fonts like System or Small Fonts."
Do you know which ones are not supported ?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-10 07:24:51
I'm only aware of Raster fonts not being supported. You can customise the view in Explorer when browsing C:\Windows\Fonts. First make sure Details view is enabled and then right click the column headers to show Font Type. Now sort by font type and you'll see all Raster fonts grouped together.

(https://i.imgur.com/DZORwRd.png)



Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-10 07:33:04
Thanks !!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: regor on 2023-05-11 15:58:22
Added this as an alternative to foo_plorg at the jp wiki
https://foobar2000.xrea.jp/?User+interface/UI+Element#n8c40296

Someone with an user, could edit this wiki and put a big warning about the component being buggy, and also linking the alternatives
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Playlist_Organizer_%28foo_plorg%29
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-05-12 09:33:34
It is strange as for me, the core: list items has no impact on the font the panel displays. I just changed it to Stencil and my font keeps on being the "common" one.
However there is a note on the documentation of Js Panel 3 :
"Not all fonts supported by Default UI / Columns UI can be used by this component. This is because they use older GDI graphics whereas this component uses DirectWrite. If an unsupported font is detected, the method will fallback to returning Segoe UI. The most likely cause of this happening would be using Raster fonts like System or Small Fonts."
Do you use a specific font ?

I'm using Tahoma in almost every instance.
Interesting that you are unable to recreate the behaviour. All I can tell you is that if I set Core: List Items to Custom (Tahoma), changing Common (list items) to something other than Tahoma won't do anything. It isn't important anyway, I just keep Core: List Items set to Common (list items) and now have no problems.

Looking forwards to trying the new version now! Hopefully no more scrollbar weirdness.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: rednoise on 2023-05-15 21:26:07
Hi,
I apologize for the issue. I will look into it but unfortunately not before beginning of next week as I’m on vacations.

I can wait, take your time. I'll be interested to hear what you think about this. I have uninstalled foo_jscript_panel3 and pl_organizer and deleted every file and trace I can find that has to do with those components. And yet when I reinstall them I get the same error message. Maybe I'm missing a file somewhere else? I can't figure it out.

Windows 10 22H2, Foobar2000 v2.0 [x86]. pl-organizer works on two other computers in my home, but I didn't try to mess with the font size on those, which seems to have precipitated the problem on this one computer.
did you delete the pl_organizer.txt file as well ?
It is supposed to be in the profile folder or in the foobar root if you dont have a profile folder.
from the error message thrown,  there is no relationship with the font size you changed.
Let me know.

Still a problem on one computer out of three. I'll describe exactly what I'm doing, maybe you can see if I am doing something to trigger it:


JScript Panel 3.2.19 (Playlist Organizer v1.7.3 date 9/5/2023 by Seb + inspiration and abstract from marc2003)
JavaScript runtime error
Unable to get property 'foldState' of undefined or null reference
File: C:\Users\lsprague\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 1254, Col: 5




Now, if I:


It appears to work again, until I restart.

I feel like I went into too much detail. Does this tell you anything? Could it have anything to do with my music files being on another drive than the Foobar program and my profile?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-15 21:57:01
Thanks for explaining.
I dont get why this error is thrown, it's not linked to the music but to the playlists you have created.
Could you please send me the pl_organizer.txt you have after the first launch (before the restart) by PM, and tell me how many playlists you have ?
Thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-15 21:59:06
I'm using Tahoma in almost every instance.
Interesting that you are unable to recreate the behaviour. All I can tell you is that if I set Core: List Items to Custom (Tahoma), changing Common (list items) to something other than Tahoma won't do anything. It isn't important anyway, I just keep Core: List Items set to Common (list items) and now have no problems.

Looking forwards to trying the new version now! Hopefully no more scrollbar weirdness.

I've done the exact same thing and i dont see the problem on my version. As Marc pointed out, only the Common (list items) and Common (labels) are used, the core lists shouldnt have any impact.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-15 22:04:01
Playlist Organizer (Jscript Panel 3)
v1.7.4
15-05-2023

Version changes :
- fix the long playlist name overlapping with the # of items when selected.
- fix a bug with the scrollbar (when clicking the down arrow and at the bottom of the panel, then an error was thrown).
X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: rednoise on 2023-05-15 22:16:14
Thanks for explaining.
I dont get why this error is thrown, it's not linked to the music but to the playlists you have created.
Could you please send me the pl_organizer.txt you have after the first launch (before the restart) by PM, and tell me how many playlists you have ?
Thanks

OK, sent. Check your mailbox.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-15 22:40:56
ok we found the issue : A playlist contained a semicolon character, as i'm using this character to separate fields, it cant be used.
i'm open to any suggestions on how to fix this but for now i'll replace any semicolon in playlists' names by the word "semicolon"
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-15 22:58:03
You should be using JSON for your config file. For any javascript object/array, you use JSON.stringify to make a string for writing to a text file. When reading plain text, you'd use JSON.parse. It couldn't be simpler.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-15 23:32:00
thanks Marc,
tbh i'm not that familiar with JSON but i will investigate.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-15 23:44:51
So I peeked inside your JS and found this...

Code: [Select]
	this.save_status = function () { // Save latest to file
strContents = "FORMAT : position;name;#files in PL (-1 if folder);playlist (yes = 1);lvl;folder name (if any) belonged to;folder status (1 = open)" + "\n";
for (var i = 0; i < this.data.length; i++) {
strContents = strContents + this.data[i].position + ";" + this.data[i].name + ";" + this.data[i].value + ";" + this.data[i].pl + ";" + this.data[i].lvl + ";" + this.data[i].fold + ";" + this.data[i].foldState + "\n";
}
_save(statusFile, strContents);
}

It could be this...
Code: [Select]
	this.save_status = function () { // Save latest to file
_save(statusFile, JSON.stringify(this.data));
}

When reading your file, you'd use JSON.parse for converting strings back to a javascript object/array.

edit: when using JSON.parse, you should wrap it inside try/catch. It will throw errors if it fails. Shouldn't happen but any half wit can open the file, modify and break it.  :P
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-16 03:45:48
Installed it for the first time. If I try creating a playlist folder by right clicking on a playlist the script it crashes with
Code: [Select]
JScript Panel 3.2.19 (Playlist Organizer v1.7.4 date 15/5/2023 by Seb + inspiration and abstract from marc2003)
JavaScript runtime error
Unable to get property 'id' of undefined or null reference
File: C:\Users\bro\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 794, Col: 8
It doesn't happen if I right click on a blank space and create a playlist folder.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-16 04:09:32
Thank you for this script 👏

Some things I've noticed:

1. Tooltip font size. Tooltip font sizes look like they are hardcoded at 12. Can you make the tooltip font size use PL.FONTSIZE.VALUE.

2. Up/down chevrons. Can you add a property to enable/disable the up/down chevrons? This is subjective, but in my opinion they are superfluous with a scrollbar. (https://i.imgur.com/TyRJJyk.png)

3. Number formatting separator string. The playlist items count has a space for separating thousands. Is there a way to remove the space? Or maybe add another custom property value for the number separator string. The user could input a comma, period, no character, or whatever. (https://i.imgur.com/1pme6UE.png)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-17 23:44:27
Playlist Organizer (Jscript Panel 3)
v1.7.5
18-05-2023

Version changes :
- Changes in the pl_organizer.txt format. The save and parse methods are now using JSON and the switch between old & new format should be transparent. You can use the "Txt File Archiving menu" to archive the current file, in case.
- Tooltip font size is now matching the panel folder/playlist font size.
- Fix a bug when creating a folder without selecting a playlist/folder first (i was lazy i just deactivated the option to create a folder without selecting something first)

@marc2k3 : You were, of course, right, the JSON method is easier and more reliable. + now we can use semicolon characters in the playlist/folder name.

@metal_termite : Thanks for your feedback. I couldnt create the Number formatting separator string as a custom option because i wasnt able to code the string formatting using different options. i'll try again.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-18 13:36:47
You can use _formatNumber from my common.js which you already import. This takes a custom separator for thousands.

https://github.com/jscript-panel/component/blob/3c2c6c8e0222848a5dd7734824692b461f60a157/samples/js/common.js#L170-L172
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-18 14:51:10
Playlist Organizer (Jscript Panel 3)
v1.7.6
18-05-2023

Version change :
- Thousand separator is now customisable using the right click menu in the header. Under "Text , "Playlist count separator" you now have the option to choose nothing, a space, a dot or a comma.

@marc2k3 : Thanks, spent quite some time yesterday, very handy function there !

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-19 02:22:57
@etip Thanks for using my suggestions!

I'm trying to modify your script to implement my own personal preferences but I know next to nothing about JS.

I did manage to change the node icons
Code: [Select]
chars["folder_close"] = '\uf0da';
chars["folder_open"] = '\uf0d7';
(https://i.imgur.com/Kx02l6d.png)

I have a few more suggestions because this has now become my primary playlist component, and I'm excited to use it.

Single click nodes. One thing that's bugging me is double clicking to open/close the nodes/folders. I'm trying to change it from double click to single click but can't figure it out. I'm not certain but I think it's standard Windows operation for a node to open/close with a single click. Maybe this would be better as a custom setting?

Selection box padding. It looks like the selection box is bigger on the bottom than the top, so there should be be more spacing on the bottom. Maybe it's because I'm using 9 for my font?
(https://i.imgur.com/DSOK8kg.png)

Toggle the header with a show/hide toggle. Can you make a toggle to hide/show the top header? This would include disabling the search box when the top header is hidden.

Merging the right click context menus. I think it would make more sense if the both right click context menus were merged into right click menu. It wouldn't matter what part of the UI is clicked, all items are always available on the right click context menu.

(https://i.imgur.com/WlHfYAj.png)

(https://i.imgur.com/Vexvs68.png)

If you eventually add more items to the context menu and it starts to get crowded you could consider merging all the "Create" items into fly out item.

(https://i.imgur.com/etbdc1u.png)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-19 08:56:20
@metal_termite : Thanks for your feedback !
Single click nodes. One thing that's bugging me is double clicking to open/close the nodes/folders. I'm trying to change it from double click to single click but can't figure it out. I'm not certain but I think it's standard Windows operation for a node to open/close with a single click. Maybe this would be better as a custom setting?
You have an option to choose from single to double click ("open playliste menu).

On the Selection box padding, it's been a struggle for me to calibrate it correctly for all the fonts & size (i can tell you it looks ok on my side). However i will slightly decrease de padding at the bottom.

Your other suggestions are good and i will definitely (try to) implement them.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-20 07:23:19
You have an option to choose from single to double click ("open playliste menu).

I have that enabled -- Open Playlist > Single click -- but it still requires a double click to expand or collapse a folder. Possible bug? Or maybe I have miscommunicated in my previous post.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-20 08:07:19
no it's me; the single/double click option is to open a playlist. Not a folder.
My bad.

Edit : You can open/close a node with the right/left arrows.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2023-05-23 08:07:34
i'd like to request one more feature:

when an action switches the active playlist (or creates a new playlist, for example with quicksearch), if there's a scroll bar, it currently doesn't jump down to show the highlighted/activated playlist. would this be possible to implement?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-05-23 08:50:24
i'd like to request one more feature:

when an action switches the active playlist (or creates a new playlist, for example with quicksearch), if there's a scroll bar, it currently doesn't jump down to show the highlighted/activated playlist. would this be possible to implement?

I would love this too, although I can see it being annoying for some people. But an option for this would be great.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bloniaq on 2023-05-25 08:04:21
Is it forbidden to nest folders as 3rd level of nesting?
I mean situation like:
Code: [Select]
folderA\
    folderB\
        folderC\
I can put folderC in folderB, but I can't open it. Is it behaving like that on purpose?


edit: Actually in my foo_plorg configuration I have even folderDs in a few places :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-05-25 08:39:49
Up to folder B for now. I would like to request folder C.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-25 21:55:22
Playlist Organizer (Jscript Panel 3)
v1.8.0
25-05-2023

Version changes :
- Selection bar slightly lower at the bottom
- Customized folder icon (folder or arrow)
- Menu completely rearranged
- Playlist stat is persistent and allow 3 choices : item count, size, item count and size. Now part of the menu instead of a top right button
- Help top right button has disappeared and is now in the menu
- Move search inputbox to be horizontally in the middle of the panel
- Ability to show or not show the header

Let me know what you guys think.

I still have some development following up on some of your comments but :
Up to folder B for now. I would like to request folder C.
is not happening. I will have to completely change my approach (to a recursive model which i didnt do at the beginning) and i honestly dont have the courage to do it.


X

edit : i still had console.log in my code, got them removed.
edit2 : Last minute modification of the gap at the bottom of the panel
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-26 04:06:12
Let me know what you guys think.
I think you nailed it. Good job.

It would be nice if single click open playlist also opened/closed the folders with one click, but your script mostly replaces plorg exactly, and then some. I'm pleased. Thank you for your work.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: kahel on 2023-05-26 04:41:07
Yeah your script does the job well... and is nicely customizable.

I only played with it for 5min so far... but at a first glance there is only 2 thing I would be missing...
An option to 'open and play' (with double click for example).
And, when drag and drop a folder (not in an already existing playlist)... create a new one with the name of the folder.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-26 21:23:24
Playlist Organizer (Jscript Panel 3)
v1.8.1
26-05-2023

Version changes :
- Double click a playlist will automatically play the first item of the playlist (if any)
- Single click a folder will toggle between open and close.
PS : I didnt mention it but yesterday's version got rid of the top and bottom arrows.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iridescentaudio on 2023-05-28 08:33:46
I just upgraded from 1.7.5 to 1.8.0. All of the recent changes are great. The menu reorganisation is a big improvement, I like having a comma in the playlist stats (I had wondered about that but it seemed too nitpicky to bring up :P), I like being able to hide the header and I like the other icons for help/up down arrows/etc. being removed. Feels cleaner and more like plorg now. Great work.

I am holding off on updating to 1.8.1 because:

- Double click a playlist will automatically play the first item of the playlist (if any)

I already have the Open Playlist setting as Double-click (so that I'm not opening large playlists when single-click & drag/reorganising), does this change introduce a conflict where I won't be able to open a playlist without playing a song? I wouldn't ever use this feature personally, but fine if it's an option for people.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-28 10:42:45
@iridescentaudio : Thanks for the feedback, i can make the "playing a song" optional if you wish.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-05-28 11:01:34
@iridescentaudio : Thanks for the feedback, i can make the "playing a song" optional if you wish.

I'd appreciate this too, if that's OK @etip !
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-28 11:25:15
Playlist Organizer (Jscript Panel 3)
v1.8.2
28-05-2023

Version change:
- Playing a song when a playlist is double clicked is now optional (default is no).

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: hexenszene on 2023-05-28 14:46:16
Could I ask for a little hand holding when installing please?
I have JSP3.
There are 4 files in the newest zip.  I know 2 of them go in the fb.ProfilePath + "\pl_organizer" folder
which two?
and where do the other 2 go?
Thanks much
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-05-28 14:50:14
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).
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: hexenszene on 2023-05-28 16:00:39
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.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: zeremy on 2023-05-28 17:53:27
@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.  
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-28 18:58:15
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





Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: zeremy on 2023-05-28 19:14:58
And what about the other restrictions (add, remove etc) when dropping items to the playlist?Does it fail silently also?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-28 19:27:28
If there are locks in place preventing addition of items, any attempts to add always silently fail. There isn't really anything you have to do.

But to make things nicer, feedback can be provided during drag/drop operations that change the mouse pointer to show dropping is allowed/not permitted.

action.Effect should be zero or one depending on whatever conditions you determine...

https://jscript-panel.github.io/docs/interfaces/IDropAction/

edit: just realised I really need to update that to take in to account playlist locks that aren't autoplaylists. I think the bulk of that was written before they were supported.





Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: zeremy on 2023-05-28 19:43:21
Perhaps an icon(s) should be also displayed next to the playlist indicating such restrictions...
Thanks for your feedback,your knowledge is appreciated on how to handle them, I am just pointing out some problems I encountered to report to the author.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-28 21:35:36
Playlist Organizer (Jscript Panel 3)
v1.8.3
28-05-2023

Version change:
I followed Marc advice :
- If the playlist lock prevents renaming, then the rename menu will be greyed out
- If the playlist lock prevents deleting, then the delete menu will be greyed out
- If the playlist lock prevents adding new songs, then the drag&drop mouse pointer will show it is not permitted.

Again, @marc2k3  : Thanks !

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: MojoBass on 2023-05-29 05:54:16
Perhaps an icon(s) should be also displayed next to the playlist indicating such restrictions...
Such an icon (e.g. a lock) next to the playlist would be a dream!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-29 21:51:22
Playlist Organizer (Jscript Panel 3)
v1.8.4
29-05-2023

Version change:
- I added a lock icon to the right of the playlist name when it's locked for either :

I personally dont like it so i made it optional.
It's pretty basic so i'm up for suggestions, let me know what you think.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-30 05:21:10
I personally dont like it so i made it optional.
It's pretty basic so i'm up for suggestions, let me know what you think.

Agreed. I think the icon stands out far too much. A way to minimize that might be to add a custom color to the lock icon (like you did with the folder icon). the option for the user to set a custom opacity of the icon from a range of 0 to 100%. The icon would probably blend in better.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: MojoBass on 2023-05-30 05:39:40
Version change:
- I added a lock icon to the right of the playlist name when it's locked
Wow, this is perfect + faster than lightspeed! Great thanks to you etip!!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-30 07:23:09
I made some changes to the script regarding the context menu. Please add these to the main script if you like them.

- Changed order of items
  - Grouped all items that have to do with folder and playlist maintenance together
- Created submenu for filter items called Sort folder
  - Added the name of the selected folder as a standalone item in this submenu
  - Renamed the filter items to Ascending order and Descending order respectively

(https://i.imgur.com/KuMNnhw.png)

Added this line
Code: [Select]
this.sortMenu = window.CreatePopupMenu();

After this line
Code: [Select]
this.createM = window.CreatePopupMenu();

Modified the filter items code to this
Code: [Select]
		// Sort folders
var filt = "";
if (selected.index > -1) {
if (selected.pl == 1) filt = this.display[selected.index].fold;
else filt = this.display[selected.index].name;
}
this.sortMenu.AppendTo(this.s, EnableMenuIf(selected.index > -1), 'Sort Folder');
this.sortMenu.AppendMenuItem(MF_GRAYED, 0, (filt == "" ? 'Root' : filt));
this.sortMenu.AppendMenuSeparator();
this.sortMenu.AppendMenuItem(EnableMenuIf(selected.index > -1), 1450, 'Ascending order');
this.sortMenu.AppendMenuItem(EnableMenuIf(selected.index > -1), 1460, 'Descending order');

And you'll have to sort the items like I did in the included screen shot.

If there is any easier way to do this just let me know. PM me if you want my pl_organizer.js
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: hexenszene on 2023-05-30 07:36:55
I feel like I can't find a setting somewhere:  When I double click a playlist, it unfortunately starts playing.  I don't want to play it - I just want to view it.  How do I view a playlist without starting it going? 
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-30 07:41:53
Here's another modification that adds the string "Total playlists: {amount}" to the context menu. On mine I added it right above the Help item. It will only be displayed if the Header is set to not visible.

Code: [Select]
		// Show total playlist items in context menu
if (!this.header) {
this.s.AppendMenuItem(MF_GRAYED, 0, 'Total playlists: ' + this.data.filter(function (artr) {
return artr.pl == 1;
}).length);
this.s.AppendMenuSeparator();
}

I wanted to add this as the first context menu item in MF_STRING and bold, but I didn't know how to make bold text.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-05-30 07:49:40
@hexenszene
Settings -> Double Click on Playlist -> Doesn't play song

If you can't see this, you probably need to download the latest version.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-30 07:51:48
@etip I just noticed that the Rename Folder and Delete Folder context menu items are always disabled. Is it broken or am I doing something wrong?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-30 20:32:27
@etip I just noticed that the Rename Folder and Delete Folder context menu items are always disabled. Is it broken or am I doing something wrong?
weird, it works for me, i did create some specific playlists to double check that.

I wanted to add this as the first context menu item in MF_STRING and bold, but I didn't know how to make bold text.
Not sure it's feasible, unless @marc2k3 ... nevermind :) :)

PM me if you want my pl_organizer.js
Yeah, i'll take your code, verify and integrate it in a new version.
Thanks !
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-30 20:52:20
weird, it works for me, i did create some specific playlists to double check that.

Is there a way to reset all data relevant to this script? Maybe starting from scratch will solve the issue.. I figured out how to clear all the JS properties.

Rename folder and delete folder still disabled :/

Also now there is often a yellow outline around previously selected playlist items. How do I change that?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-30 20:59:37
do you know the "lock" parameters for your playlist ?
I'm using Marc Smooth Playlist Manager that has a nice box to describe these :
X

The only way to reset all data relevant to the script is to delete the pl_organizer.txt file located in the profile folder (root if you dont have such folder). There is an option to archive your current, then you can delete the file and restore it at any point of time.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-30 21:20:59
do you know the "lock" parameters for your playlist ?
I'm using Marc Smooth Playlist Manager that has a nice box to describe these :
[attach type=thumb]26048[/attach]

The only way to reset all data relevant to the script is to delete the pl_organizer.txt file located in the profile folder (root if you dont have such folder). There is an option to archive your current, then you can delete the file and restore it at any point of time.
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?

I can delete and rename playlists, it is just on the folders where these items are disabled on the context menu.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-05-30 21:24:51
Hmm. Deleting pl_organizer.txt did not work either.

- Deleted pl_organizer.txt
- Restarted foobar2000
- Created new folder
- Right click on newly created folder and Rename and Delete options still disabled.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-30 21:36:39
Looks you're both getting your wires crossed. etip is testing playlists and metal_termite is having problems with folders??

Also, what if a folder contains a playlist that can't be removed? What do you do then? Move it to the root or remove all playlists that can be removed and leave the folder in place with just the playlist(s) that can't be removed. Have fun!

BTW, I probably can add support for bold menu items. Currently not possible but it should be easy enough.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-30 21:45:26
yep, i thought the problem was on the playlists. I'll take a look on this issue.
The way the script works is that if a folder is deleted, the playlists within fall into the level above, they are not deleted.

BTW, I probably can add support for bold menu items. Currently not possible but it should be easy enough.
Yay !

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-30 21:51:57
Just to be clear, only one menu item is supposed to be bold to indicate the default action (typically pressing the Enter key). Right click a single item in the Default UI/Columns UI playlist view for an example. Obviously this can't be enforced but I just thought I'd mention it.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-30 21:56:58
Playlist Organizer (Jscript Panel 3)
v1.8.5
30-05-2023

Version change:
- Menu reordered and rearranged (thanks @metal_termite  !)
- Bug fix : the folder rename and delete menus are back to normal
- Bug fix : the lock icon didnt appear if the playlist was selected.
X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-30 22:13:55
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
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-05-31 12:02:24
I can't see any option for locking/unlocking playlists. Is a seperate plugin required to enable that functionality?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-31 13:57:21
Someone needs an eye test.  :o
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-05-31 14:00:49
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?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-05-31 14:18:04
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.

(https://jscript-panel.github.io/images/playlist-lock.png)

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.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-05-31 14:49:14
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!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: iangk on 2023-05-31 14:57:33
@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.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-31 23:38:23
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
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-05-31 23:58:39
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.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-06-01 01:30:28
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.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-06-01 03:48:01
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?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-01 06:11:05
@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.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-01 08:15:58
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...');
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-06-01 12:04:17
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.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: frogworth on 2023-06-01 12:24:20
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.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-01 22:16:59
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.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-01 22:22:23
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
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-03 08:20:14
@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
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-04 17:01:16
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
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-05 06:29:40
😍
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-11 15:56:32
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
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-12 08:52:34
@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?

(https://i.imgur.com/AHlVLjL.png)

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
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-06-12 13:11:35
@metal_termite
good work. thanks. :)

(https://i.imgur.com/21VcTXZ.png)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-12 19:59:43
thanks @metal_termite, i'm modifying the code for next release :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2023-06-13 00:04:57
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!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-13 01:29:32
I agree, this script has done a great job replacing the old plorg component.

I think there are a few more behavioral modifications that can be done to polish things up. The main one is:

Right click should highlight the item and open the context menu. I don't know if this is a limitation of the JScript panel, but a right mouse click does not highlight an item. Conventional behavior has a right click both highlight an item and open the context menu at the same time. Currently in this script, if you hover over an item, it will show a tooltip related to that item, but if you right click this item it will not necessarily open the context menu that is related to the same item you are clicking. Instead it only ever opens the context menu of the item that was last highlighted. Its kinda misleading and from a UX perspective this is unexpected behavior, at least for me.

It's way beyond my level of understanding to fix otherwise I'd happily contribute.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-06-13 02:49:25
Right click should highlight the item and open the context menu. I don't know if this is a limitation of the JScript panel, but a right mouse click does not highlight an item.

Certainly not a component limitation. Smooth Playlist Manager highlights the item when right clicked...

(https://i.imgur.com/xLIhTH3.gif)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-13 06:39:40
@etip I sent you a DM with a few of my recent cosmetic revisions for UI consistency and a mouse behavior setting to change the scroll speed (fast, medium, and slow). I personally found it too fast on my setup.

Here are a few features I wanted to add to my version of your script but am too stupid to figure it out. Aside from the above right click select like in marc2k3's script:

1. Tooltip placement. I personally do not like the duration tooltip appears every time I hover over the playlist item, however I do appreciate the utility of that stat. Personally I would only put the tooltip when hovering over the playlist stats column since it's related to playlist stats.

Code: [Select]
- Settings >
   - Appearance >
      - Playlist stats >
     - Tooltip >
        - 🔘 Show over playlist item
        - 🔘 Show over playlist stats only
        - 🔘 Disable

2. Accidental deletion of playlist. Accidentally deleting a playlist happens from time to time. To prevent this I wanted to add the option of enabling a modal confirmation window when the user tries to delete a playlist: "Do you want to delete {playlist name}? [OK] [Cancel]"

Code: [Select]
- Settings >
   - Keyboard shortcuts >
      - <Delete> key >
     - ✔️ Enable shortcut
     - ✔️ Show confirmation window

3. Restore. This one might be time consuming. The original Plorg component had a feature to restore deleted playlists. I think it kept a history of the last 5 or so deleted playlists that were accessible to restore in the context menu.

Code: [Select]
- Create >
- Delete
- Move to >
- Rename...
- Sort >
---
Edit autoplaylist...
Convert to standard playlist
---
Contents >
---
Restore >
              Deleted playlist 1
              Deleted playlist 2
              Deleted playlist 3
              ---
              Clear history
Settings >
Help
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-06-13 07:30:54
Restoring deleted playlists would totally negate the need for offering a confirmation dialog. Deleted playlists are available to restore until fb2k is closed. I think it would be overkill to have both.

Smooth Playlist Manager has this feature so it's easy enough to copy the basic functionality and of course it's documented with examples here.

https://jscript-panel.github.io/docs/namespaces/plman/ << search the page for recycler

Obviously etip's script is more complex and restoring it to the folder/position it was in might be asking too much.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-13 07:57:09
Right it is redundant. I should have communicated that #2 is completely conditional on whether #3 being implemented as #3 would be a large task I think
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-13 22:53:34
I agree with @marc2k3, a confirmation dialog maybe overkill, and i have a lot of scripts that create playlists on the fly, the ability to delete these quickly simply by keeping my finger on the del button is important for me :)
i'll look at restoring the last ones and i'll look as well your tooltip idea.
Thank you, once again, for your very constructive feedback.

Of course, i'll look at your PM as well :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-17 17:01:18
Playlist Organizer (Jscript Panel 3)
v1.9.0
17-6-2023

Version changes :
- Right click now selects the playlist/folder
- Ability to restore or purge deleted playlists (up to 90)
- Tooltip with duration will only appear when mouse is in the area of the statistics
- Bug fixes
Below is thanks to @metal_termite :
- Added a help submenu context item with a link to this discussion thread and revised reference manual
Changes:
- Cosmetic
  - Reduced top margin of the playlist panel to this.layerUp = _scale(2);
  - Modified tooltip total duration format to match foobar2000s duration format for UI consistency, and replaced the word "Total" with "Duration" to specifically indicate it's a duration
  - Changed string "normal playlist" to "standard playlist". I've noticed throughout the forums and in a few components/scripts people tend to refer to non-autoplaylists as standard playlist. I just changed the wording here for consistency with that.
Feature:
  - Added a mouse behavior setting to select mouse scroll speed (fast, medium, and slow, where fast is the default and current incumbent speed).

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-17 17:03:33
Obviously etip's script is more complex and restoring it to the folder/position it was in might be asking too much.
I could save the position in a file when deleted but i think it's overkill :)
When restored, a playlist goes at the bottom of the list.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: rednoise on 2023-06-17 22:40:21
Playlist Organizer (Jscript Panel 3)
v1.9.0
17-6-2023

Version changes :
- Right click now selects the playlist/folder
- Ability to restore or purge deleted playlists (up to 90)
- Tooltip with duration will only appear when mouse is in the area of the statistics
- Bug fixes
Below is thanks to @metal_termite :
- Added a help submenu context item with a link to this discussion thread and revised reference manual
Changes:
- Cosmetic
  - Reduced top margin of the playlist panel to this.layerUp = _scale(2);
  - Modified tooltip total duration format to match foobar2000s duration format for UI consistency, and replaced the word "Total" with "Duration" to specifically indicate it's a duration
  - Changed string "normal playlist" to "standard playlist". I've noticed throughout the forums and in a few components/scripts people tend to refer to non-autoplaylists as standard playlist. I just changed the wording here for consistency with that.
Feature:
  - Added a mouse behavior setting to select mouse scroll speed (fast, medium, and slow, where fast is the default and current incumbent speed).

[attach type=thumb]26262[/attach]


I'm finding that, if I'm scrolled all the way to the top of the list of folders, and I right-click in the header area, I get the following Javascript error:

Code: [Select]
JScript Panel 3.2.21 (Playlist Organizer v1.9.0 date 16/6/2023 by Seb + inspiration and abstracts from marc2003 + great help from metal_termite.)
JavaScript runtime error
Unable to get property 'pl' of undefined or null reference
File: C:\Users\xxxxx\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 71, Col: 9

If I'm scrolled down farther in the folders list, it behaves normally. This is repeatable on three different computers.

Otherwise, it looks and performs great!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-17 22:50:09
@rednoise : Thank you, i'll look into that.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-17 23:35:12
Playlist Organizer (Jscript Panel 3)
v1.9.1
18-6-2023

Version changes :
- Bug fix (right clicking in the header area was leading to crash)
Below is thanks to @metal_termite :
- Feature: Added toggle option to increase node indentation located in Appearance settings
- Modification: Moved Restore near the bottom of the context menu like the original foo_plorg
- Code optimizations

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2023-06-18 18:22:54
Any idea why the console is still reporting such an old version of this script?
Code: [Select]
JScript Panel 3.2.25 (Playlist Organizer v1.7.4 date 15/5/2023...
Main.js
Code: [Select]
// ==PREPROCESSOR==
// @name "Playlist Organizer"
// @version "1.9.1 date 18/6/2023"
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-18 18:31:31
no idea, mine is reporting correctly.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: el-jaguar on 2023-06-20 18:05:12
I currently have the script on a panel higher than the current list of playlists. Whenever I right-click on an empty part of the panel where a playlist could be (not so on the left margin on the space between the border and the playlist indentation), the script crashes and I get this message:

No se puede obtener la propiedad 'pl' de referencia nula o sin definir
File: C:\Users\jlupp\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 82, Col: 9

I've learned not to right click on empty spaces, but thought of letting you know. Maybe it could be fixed for the context menu to just show the options not related to any playlist...

Thank you for this wonderful script, it is really useful. Now to hope that someone replaces TagBox...
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: rednoise on 2023-06-20 18:56:29
I currently have the script on a panel higher than the current list of playlists. Whenever I right-click on an empty part of the panel where a playlist could be (not so on the left margin on the space between the border and the playlist indentation), the script crashes and I get this message:

No se puede obtener la propiedad 'pl' de referencia nula o sin definir
File: C:\Users\jlupp\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 82, Col: 9

I've learned not to right click on empty spaces, but thought of letting you know. Maybe it could be fixed for the context menu to just show the options not related to any playlist...

Thank you for this wonderful script, it is really useful. Now to hope that someone replaces TagBox...

Similarly, and similar perhaps to the bug I reported earlier that was fixed, if I right-click in the blank space between the end of the list of playlists and the bottom edge of the panel, the script crashes with this javascript error message:

 
Code: [Select]
JScript Panel 3.2.21 (Playlist Organizer v1.9.1 date 18/6/2023 by Seb + inspiration and abstracts from marc2003 + great help from metal_termite.)
JavaScript runtime error
Unable to get property 'pl' of undefined or null reference
File: C:\Users\xxxxx\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 82, Col: 9

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-20 20:25:55
i apologize, i have a few pages of playlist so i never tested the situation in which you have a lot of blank area below the playlists.
Let me know if that update fixes your issue :
Playlist Organizer (Jscript Panel 3)
v1.9.2
20-6-2023

Version changes :
- bug fix (i hope) : Right click in an empty area below the last playlist doesnt crash the script anymore.
X

@el-jaguar : Let me know as well if it's ok now as i didnt quite understand your issue.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: rednoise on 2023-06-20 20:39:53
i apologize, i have a few pages of playlist so i never tested the situation in which you have a lot of blank area below the playlists.
Let me know if that update fixes your issue :
Playlist Organizer (Jscript Panel 3)
v1.9.2
20-6-2023

Version changes :
- bug fix (i hope) : Right click in an empty area below the last playlist doesnt crash the script anymore.
[attach type=thumb]26296[/attach]

@el-jaguar : Let me know as well if it's ok now as i didnt quite understand your issue.


That seems to have fixed it! Thank you.

I have lots of playlists, too, so I don't always have a space at the bottom of the list, but if I were to scroll down to the bottom and right-click below the last one, the crash would happen. But no more, all better now.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-20 21:00:25
alright, thanks for the feedback, and yeah it was connected to the other issue :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2023-06-20 22:24:40
I realized a feature I'm missing is, if a playlist has a name that's been truncated, it would be great if I could see the full name through a tooltip! This is the behavior that I have in my columns playlist view, so it would be great to be able to replicate that in plorg as well.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-20 22:27:19
yep, good idea, i'll think about it !
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-06-21 13:50:24
Any idea why the console is still reporting such an old version of this script?

Are you sure you don't have another instance or something? The component can only display info from scripts it parses on startup (or when opening the configuration window and clicking OK/apply).
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-24 15:29:13
Playlist Organizer (Jscript Panel 3)
v1.9.3
24-6-2023

Version changes :
- Ability to create unlimited level of folders
X
- When a playlist name is truncated, the tooltip will show the full length of the playlist

I probably have not fully tested the folder functionality, so let me know if you find issues.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Juancar2 on 2023-06-26 00:02:16
Please, could you tell me if the backup of my playlists is kept in somewhere in foobar2000 folders?
I am use to saving them in a chosen folder in the old component playlists.
Thank you very much for you good work.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-26 06:57:10
@Juancar2 if i'm not mistaken the playlists are located in the "playlists-v2.0" folder.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: stevehero on 2023-06-27 23:58:24
Thank you so much for this. I was going to ask before I installed it, how can my playlists get imported from the old foo_plorg but it did it.

Now I was wondering if there's a way to multi-select playlists and drag them to folders as this is the only thing it didn't do.

Thanks again. I wouldn't mind donating to this if you have a link.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-06-28 08:50:02
I like it, even if at the moment there are a crash ...

Sorting ascending and descending doesn't work or doesn't sort correctly.

The background image must be set with the correct proportion.

(https://i.postimg.cc/1n34vsfZ/Screenshot-2023-06-28-094744.png) (https://postimg.cc/1n34vsfZ)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: stevehero on 2023-06-28 21:48:59
Just noticed loading times are slow when opening FB. I do have 100+ auto playlists.

Is there any way for this to load them in the background when opening FB?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-28 22:31:12
Now I was wondering if there's a way to multi-select playlists and drag them to folders as this is the only thing it didn't do.
I know this is really missing, and honestly, i would need it as well. But it's no simple thing as i would have a lot of logics to modify. I'm keeping it somewhere in my head though.

Sorting ascending and descending doesn't work or doesn't sort correctly.
yep, i worked on a fix last week end, i'll post it soon.
The background image must be set with the correct proportion.
You mean the original size ?
Is there any way for this to load them in the background when opening FB?
i have 138 and the script loading time is 302ms.
If you Ctrl+Shift+Right click and hit reload, the console should tell you how long it takes to load.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-29 23:25:07
Playlist Organizer (Jscript Panel 3)
v1.9.4
30-6-2023

Version change:
- Completely changed the sort functionality. Should work 100% now. If you see bugs, please let me know

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-06-30 04:51:42
Sort: Ok

Set Background to front cover : NO (the image takes up the entire area of ​​the panel and does not respect the original proportions).

Very frequent error:

JScript Panel 3.2.25 (Playlist Organizer v1.9.4 date 30/6/2023 by Seb + inspiration and abstracts from marc2003 + great help from metal_termite.)
JavaScript runtime error
Unable to retrieve property 'pl' of a null or undefined reference
File: C:\foobar2000 Portable\......\foobar2000\pl_organizer\pl_organizer.js
Line: 82, Col: 9

selected.pl = this.display[index].pl;
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-06-30 05:27:43
@etip

thank you for your great script.

Background front cover
Please add option (so that it fits in the panel)
-correct aspect ratio
(not correct aspect ratio)
Checkmark on/off at the beginning.

on/off
(https://i.imgur.com/hs5ZtdB.png)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-06-30 06:47:14
Very frequent error:
Can you describe what you were doing when these errors came ?
Background front cover
Please add option (so that it fits in the panel)
-correct aspect ratio
(not correct aspect ratio)
Checkmark on/off at the beginning.
I'll work on that this week end ! thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-06-30 07:38:52
Can you describe what you were doing when these errors came ?

You select a playlist located in a folder and manually move the playlist to another folder the crash occurs
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-06-30 10:25:59
Same trouble.
Crash when Drag & Drop (in the downward direction) Playlist to another folder (closed folder).
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-07-01 00:01:39
Playlist Organizer (Jscript Panel 3)
v1.9.5
1-7-2023

Version changes:
- Bug fixes : Crash when dropping a playlist to a closed folder
- Background front cover can now be stretched or centered in the options.

@Airken : Let me know if this is what you were looking for.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-07-01 02:47:48
Version changes:
- Bug fixes : Crash when dropping a playlist to a closed folder
- Background front cover can now be stretched or centered in the options.

Both are OK. thank you very much

Context menu Settings > Apperance > Colors and font > Background > Set background to front cover and "Front cover Centered" Select.

(https://i.imgur.com/pbptdrv.png)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-07-01 07:07:52
Thx.

(https://i.postimg.cc/kRrF7FJX/Screenshot-2023-07-01-080328.png) (https://postimg.cc/kRrF7FJX)

More fix needed.

Move up / Move down It does not work properly.

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-07-01 08:42:58
Move up / Move down It does not work properly.
you're right, it used to work before, i'll look into it. thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2023-07-06 22:05:45
thank you for adding my requested feature! it works great! i like that i can still see the duration tooltip if i hover over the item count, that's clever.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-07-07 20:26:14
Playlist Organizer (Jscript Panel 3)
v1.9.6
7-7-2023

Version change:
Bug fix : Move up and move down should work fine now (took me a while to find and fix it)

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-07-07 20:26:47
thank you for adding my requested feature! it works great! i like that i can still see the duration tooltip if i hover over the item count, that's clever.
you're welcome !
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: KABIKAKA on 2023-07-15 18:44:01
Playlist Organizer (Jscript Panel 3)
v1.9.6
7-7-2023

Version change:
Bug fix : Move up and move down should work fine now (took me a while to find and fix it)

[attach type=thumb]26476[/attach]
I didn't expect to run into problems upgrading foobar2000 v2...
Thank you very much for providing the tool !!
I want to ask a question...
How to adjust the size and color of the moving square?..like a block with default actions.
(https://i.imgur.com/S6SAyuH.png)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-07-16 12:19:17
Playlist Organizer (Jscript Panel 3)
v1.9.8
16-7-2023

Version changes :
- Scrollbar width is customizable to Small/Medium/Big (menu Settings / Appearance / Scrollbar)
- Scrollbar color is customizable with a colour picker (menu Settings / Appearance / Scrollbar)
@KABIKAKA : please note that the whole scrollbar colour changes, not only the block.
- Bug fix with the folder colour (default value was wrong)

I hope i didnt break anything :)

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: KABIKAKA on 2023-07-16 15:08:16
Playlist Organizer (Jscript Panel 3)
v1.9.8
16-7-2023

Version changes :
- Scrollbar width is customizable to Small/Medium/Big (menu Settings / Appearance / Scrollbar)
- Scrollbar color is customizable with a colour picker (menu Settings / Appearance / Scrollbar)
@KABIKAKA : please note that the whole scrollbar colour changes, not only the block.
- Bug fix with the folder colour (default value was wrong)

I hope i didnt break anything :)

[attach type=thumb]26530[/attach]

It's great !
Color and size issues were resolved.
Immediate help is greatly appreciated!!
The size problem, if you can provide a self-defined parameter setting later
Or add a "very big"..It is also possible
I think it might be better..
Because my resolution is 4K... so choosing "large" is still too small.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-07-16 15:10:20
like how big compare to the big option you have now ?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: KABIKAKA on 2023-07-16 15:36:37
like how big compare to the big option you have now ?
Please refer to the picture~
Thanks!
(https://i.imgur.com/RVrlVkP.png)

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-07-16 16:23:58
Playlist Organizer (Jscript Panel 3)
v1.9.9
16-7-2023

Version change :
- Added a 'Very big' option for the scrollbar

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-07-16 16:54:09
Very Big is Very Big. :))
I had no problems with v1.9.8.
foobar2000 v2.1 preview 2023-07-10  | 64-bit
JScript Panel 3 3.3.1 (2023-07-09)
Windows 10/11 Home
Laptop
15.6 inch
Resolution: 1366 x 768 Pixels, 1920×1080 Pixels
system font: Yu Gothic UI
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: KABIKAKA on 2023-07-16 16:59:31
(https://i.imgur.com/m2Pw3SB.png)
The operation is easy to click.
Thanks for the quick update!!

But today I found a new problem..
About "Album Art Viewer" UI display picture .
It will follow the track selected by the mouse to replace the cover.
If no track is selected, it will be automatically replaced with the track cover currently being played.
Semantic translations or descriptions can be difficult to understand.
You can compare the original "Playlist" and "Album Art Viewer" of foobar2000 to understand.
I'm trying to record a GIF if I have time.
This problem is not urgent or serious, just a small problem of picking album previews.

Anyway thank you.
Endless gratitude.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-07-16 19:43:02
Very Big is Very Big. :))
Yeah that's why i created this specific menu "very big"  :D

But today I found a new problem..

I didnt get it tbh, a gif may defininitely help !
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: el-jaguar on 2023-07-17 20:29:14
Late to the party, but the issue I reported was solved, thank you!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: InchPerfect on 2023-07-22 14:14:15
Hey, etip.

Do you know what this means?

(https://i.imgur.com/CVeJVRm.png)

I thought I'd updated to v1.9.9 by putting the extracted files into C:\foobar2000\profile\pl_organizer

This is what I have in there:

(https://i.imgur.com/7pgHhY1.png)

Thanks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-07-22 14:33:09
@InchPerfect

Please use v3.3.0 or later version
JScript Panel 3 3.3.0+  (2023-07-04)
3.3.1
https://github.com/jscript-panel/release/releases
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: InchPerfect on 2023-07-22 15:27:07
Thanks very much, Air KEN.

I've been away and updated a couple of things but forgot to update the rest of the components.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-07-22 15:30:20
There was a big update in JScript Panel 3 v3.3.0.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: InchPerfect on 2023-07-22 19:21:15
There was a big update in JScript Panel 3 v3.3.0.
Oddly. When I used Get updates in Preferences>Components, no update was found for JScript Panel 3.

It found quite a few updates but nothing for that. Now I don't know if that feature really works?


Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-07-22 23:41:29
https://www.foobar2000.org/components
Only Components in ↑ can be Auto Update.

please take a look at this site
https://foobar2000.xrea.jp/?%E6%9B%B4%E6%96%B0%E7%8A%B6%E6%B3%81
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: rednoise on 2023-07-24 00:51:33
@InchPerfect

Please use v3.3.0 or later version
JScript Panel 3 3.3.0+  (2023-07-04)
3.3.1
https://github.com/jscript-panel/release/releases
I've been getting my jscript-panel component from here:

https://jscript-panel.github.io/docs/ (https://jscript-panel.github.io/docs/)

They both show the same version as latest. Is one source different or better than the other?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-07-24 01:13:47
@rednoise
different thread to ask.

https://jscript-panel.github.io/docs/
Download 3.3.1 ← Click ↓
https://github.com/jscript-panel/release/releases/tag/latest Same
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-08-09 08:18:22
Playlist Organizer (Jscript Panel 3)
v2.0.0
09-08-2023

Version change :
- You can now unselect a selected playlist/folder
- Implemented the middle button scroll (click and move down or up). There is a visual threshold. The farther away from the threshold, the faster the scroll goes. Happy to get feedback on this.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-08-09 16:05:54
Autocollapse Crash :

Unable to retrieve property 'lvl' of a null or undefined reference
File: C:....................foobar2000\pl_organizer\pl_organizer.js
Line: 112, Col: 13

var indent = this.display[i + this.offset].lvl * 23;

Requests:

possibility to vary the transparency of the front cover in the background

(https://i.postimg.cc/21rqy8hy/Screenshot-2023-08-09-165537.png) (https://postimg.cc/21rqy8hy)

Arrange the highlighted selection in active and inactive scroll bar playlists:

(https://i.postimg.cc/jnD1zbfJ/Screenshot-2023-08-09-165819.png) (https://postimg.cc/jnD1zbfJ)

(https://i.postimg.cc/mzXqzDPs/Screenshot-2023-08-09-165905.png) (https://postimg.cc/mzXqzDPs)

(https://i.postimg.cc/fVm62Drc/Screenshot-2023-08-09-165929.png) (https://postimg.cc/fVm62Drc)



Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-08-09 16:21:27
Playlist Organizer (Jscript Panel 3)
v2.0.1
09-08-2023

Version change :
- Bug fix for the autocollapse feature (it was there since the beginning and only affected the shift from no collapse to collapse)

X

@ApacheReal : Good catch for the bug, thanks. I'll see what i can do re the transparency topic, i have to say i didnt quite get your other point.
Ps : I really like your skin, good work
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bobbsterman on 2023-08-24 08:01:16
First: thanks! foo_plorg was slowly becoming less and less stable and I finally had to abandon it. This is an excellent replacement! Not sure where to report bugs etc, so I'm doing it here:

Bug 1:
Icons for folders (both "folder" and "caret") and currently playing are missing. See pic. Strangely works on one Windows device, but not the other... Tried with fresh install, and with exact copy of Appdata from the working one. Either way, missing.

Bug 2:
Node indentation is very inconsistent/buggy. It appears that indenting on playlists don't correctly update as you nest or unest the folders they are in. They only consistently/correctly update once you "drop" the playlist into its containing folder. See pic.
Steps to reproduce: Turn on node indenting. Place folder within folder (each with some playlists in them). Drop a playlist from the most nested folder into the same folder it is already in – its indent will update (but not other playlists in that folder). Now unest that folder – that same playlist will remain indented... etc.

Request 1:
Option to disable playlist search with the Shift key (or ideally, option to remap/unmap that key).

Request 2:
As you type letters, jump to the playlist starting with those letters (just as foobar's default playlist view does with songs and many file explorers do with files).

Request 3:
Allow remapping/adding hotkeys for various things (e.g. creating new folder).


Thanks so much again!

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-08-24 08:20:59
Ps : I really like your skin, good work

msg me in private for link youtube, subscribing to the channel is welcome.

https://www.youtube.com/@solomusica277
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-08-31 16:22:09
Sorry for replying late, I’m on vacation far away from home :)

Bug 1:
Icons for folders (both "folder" and "caret") and currently playing are missing. See pic. Strangely works on one Windows device, but not the other... Tried with fresh install, and with exact copy of Appdata from the working one. Either way, missing.

You need to install this font (https://github.com/FortAwesome/Font-Awesome/blob/4.x/fonts/fontawesome-webfont.ttf?raw=true).


Bug 2:
Node indentation is very inconsistent/buggy. It appears that indenting on playlists don't correctly update as you nest or unest the folders they are in. They only consistently/correctly update once you "drop" the playlist into its containing folder. See pic.
Steps to reproduce: Turn on node indenting. Place folder within folder (each with some playlists in them). Drop a playlist from the most nested folder into the same folder it is already in – its indent will update (but not other playlists in that folder). Now unest that folder – that same playlist will remain indented... etc.
Let me know if the font solves the issue.

Regarding your requests, i am not going to follow up on them.
I can improve the search box (which is quite primitive) upon your requests but I’m not going to change the logic unless i have more demands toward it.

Best
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bobbsterman on 2023-09-03 23:21:45
Thanks etip!

(I thought that was actually a very quick response!) Installing the font fixed the missing icons, but sadly not the indenting (see pic).

Re: search box. Mostly I just don't want it to keep appearing and grabbing focus every time Shift is pressed (it often is since many of my foobar hotkeys use Shift). A simple option to rebind it would fix this.
Also, to clarify, I wasn't suggested changing the logic of the search engine: I was suggesting something independent of it. I.e. even when the search box is not present, while focused on the playlist organizer, pressing any alphanumeric key will jump to (and cycle through, alphabetically) playlists starting with that key. The same way file explorers do (and foobar's internal playlist view does). Just an idea! Would be cool, but not vital :)

While we're on non-vital suggestions, I've got one more: separate dark and light mode appearance options (see pic for mismatch). Relevant registry key for Windows:
SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize,AppsUseLightTheme

Again, just a friendly suggestion, no pressure :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bobbsterman on 2023-09-04 16:57:30
Quick update: upon restarting foobar, I notice that your panel does change switch automatically between light and dark mode. Not sure what happened yesterday then – another bug? I'll let you know if I can reproduce it.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bobbsterman on 2023-09-07 22:52:28
Figured out how to reproduce:
1. Open foobar in dark mode (or switch to dark mode while it's open)
2. Exit foobar
3. Change to light mode
4. Open foobar

Your panel doesn't seem to successfully check if we're in light mode upon restarting foobar? It does check if we're in dark mode though (i.e. the reverse bug – mistakenly light panel while in dark mode upon restart – never occurs).
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-09-08 06:37:45
Bobbsterman,
Frankly i do not deal with light/dark mode.
@marc2k3 do you know if it's dealt by the component ?
Thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-09-08 09:58:57
When dark mode is toggled, the on_colours_changed callback is called and there's generally no need to track dark mode if you use window.GetColourCUI or window.GetColourDUI. Check most included samples and they respond to dark mode being toggled as you would expect.

If you don't use those methods, there is a window.IsDark property which returns true/false. It was only after adding it that I realised it's not really necessary and I don't use it at all. :P

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-09-08 10:24:06
Thank you for the explanation Marc.
I think I’m checking window.GetColourCUI and window.GetColourDui but as the colors are customizable, I’m sticking to the custom colors regardless of the dark/light mode.
I have the target to implement a « theme » management option eventually so it may be the answer to that topic.



Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-09-08 10:44:50
I think tracking UI colours should always be the default. No one would ever complain about dark mode not being supported because it just works. Providing independent options is absolutely fine but IMHO, it should always be opt-in.

One thing to note is that when using Default UI, there is no selected text colour which is why I use a DetermineTextColour function in the smooth and JS Playlist scripts (it's in helpers.txt for anyone to use). You supply it with the selected background colour and it returns black or white so it's always readable. Pretty much all Default UI components use it and I took the C++ code from the SDK and converted it to javascript so you get identical results.

An example of it being used is here...

https://github.com/jscript-panel/component/blob/f968cfe19536599706607988b8aeefa00e2add24/samples/smooth/common.js#L351-L363
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-09-08 10:51:19
I agree, I’ll make sure i have an option to set up the « default » values.

I thought the window.GetColourDui with the type = 0 was the text color. Is it not ?

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-09-08 11:01:08
The variables used there just point to numbers. There is no difference.

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

Everything defined on that page is available to any script that includes helpers.txt
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-09-10 09:54:23
Playlist Organizer (Jscript Panel 3)
v2.0.2
10-09-2023

Version change :
- The background image's opacity can be customizable using the following left click menu : Settings/Appearance/Colors and font/Background/Opacity%.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-09-10 15:47:44
Playlist Organizer (Jscript Panel 3)
v2.0.2
10-09-2023

Version change :
- The background image's opacity can be customizable using the following left click menu : Settings/Appearance/Colors and font/Background/Opacity%.

[attach type=thumb]27018[/attach]

Test Video:

https://www.youtube.com/watch?v=f1Grhh4h-B8  :))
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-09-25 22:02:23
Playlist Organizer (Jscript Panel 3)
v2.0.3
25-09-2023

Version change :
- Added a "Theme management" functionality.
A new file will be created in the fb.ProfilePath (next to the "pl_organizer.txt" file) to store the themes' data.

This is still beta although i did a few tests, please let me know if you find bugs.
Any feedback is welcome.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bobbsterman on 2023-09-26 05:06:07
Nice update, thanks!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2023-10-03 07:04:01
i was wondering if there's a way to make it so that if you drag and drop some MP3s (or search results or etc) to a blank space in the panel, it could create a new playlist? ideally with a name that makes sense (like detecting if there's artist/album in common and name it that if so), but I'd even accept just "new playlist".
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-03 21:09:38
Playlist Organizer (Jscript Panel 3)
v2.0.4
03-10-2023

Version change :
- Added functionality to automatically create a (regular) playlist when songs are dropped into an empty space of the panel.
The playlist will be named `New playlist` or have numbers appended if there are existing playlists with the same name.

X

Ps : I will think of a mechanism to name the new playlist, as described below, but later.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2023-10-06 02:18:21
heck yeah!! thanks so much! this is absolutely good enough for me, renaming is trivial on my end (plus it's often unpredictable what i want for a name anyway).
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-12 18:41:33
Hello,

this looks like a very good tool. Unfortunately, I can't figure out the installation instructions. I use foobar V2 64bit. Can you please describe again exactly what to install and how?

I.e. I don`t know how to find the fb.ProfilePath + "\pl_organizer.
What is to do then?
What I have already installed because it was easy is JScript Panel V. 3.3.5

Thanks

Saitenschwinger
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-12 20:45:21
Hi there,
Please take a look at the post below :
https://hydrogenaud.io/index.php/topic,123820.msg1024058.html#msg1024058 (https://hydrogenaud.io/index.php/topic,123820.msg1024058.html#msg1024058)

Dont forget to install the FontAwesome as described here :
https://jscript-panel.github.io/docs/ (https://jscript-panel.github.io/docs/)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-13 10:52:23
Thank you. I have of course read the thread here carefully before, but I can not figure it out, because for me there is missing information:

1. I don't have a path "C:\foobar2000\profile\pl_organizer", not even "C:\foobar2000".  Do I have to recreate that manually just like that?
2. How does foobar find this path? Foobar is located in C:\programs\foobar2000 for me. But there is no profile folder there either.
3. Where are the files inputbox.js and Main.js placed? Or do I only need the content of main.js?
4. How can i open the main.js file to copy out the content. Is it ok to use Notepad++ to do this?
5. How is the fontawesome-webfont.ttf installed? In Windows or somewhere in JavascriptPanel? In your link there is no description how to install the font, only requirements and installation of JavaScript and the download link of the font.

So an accurate and complete installation guide might help. Thanks again for the help.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-10-13 11:01:07
If you had a portable install then you'd browse to wherever the foobar2000 folder is. It's probably not c:\foobar2000 for everyone.

If you have a standard install, then paste this in windows explorer address bar...

Code: [Select]
%appdata%\foobar2000-v2

This is where you need to create a folder named pl_organizer and where you should extract the files.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-13 13:02:34
Thank You for Your reply. This already answers my questions 1-3. May I still ask about 4. and 5?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-10-13 15:20:22
For the font, just right click>Install.

And you can open the .js file in Notepad++ or even bog standard windows notepad (don't double click but right click>edit)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-13 16:49:15
Thank you, it works!

How can I rename the tab of "JScript Panel 3", e.g. on "PL-Organizer"?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-13 19:58:48
How can I rename the tab of "JScript Panel 3", e.g. on "PL-Organizer"?
I have found it in CUI-Preferences...!

Thank You for developing this great new PlugIn!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-14 11:47:42
Next issue: Folders automatically duplicate in the PlayList organizer panel, see screenshot. If you remove one of them, the others stay there, but their content is emptied.

Windows 11
foobar V2.0 (x64)
JavaScript Panel 3.3.5
Colums UI 2.1.0
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-15 09:04:06
hi @Saitenschwinger ,
Can you provide a bit of context, how did that happen, can you think of something particular that may create that issue ?
You cannot create a folder with an already existing name (at least i thought),  so how these folders got created ?
thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-15 11:43:38
Hi @etip,

that's a good question! I created these folders and changed their names again afterwards. What I noticed now: With these two folders there was one playlist each, whose name was identical to the folder name. This caused this undesirable behavior. In addition, the playlists whose names were identical to the folder name were no longer visible, so that sometimes you don't notice the error immediately.
I have now changed the names of the folders and now it works.

For organizational reasons, however, it would have been convenient for me to name the folders this way.

That it would be senseless to name several folders or several playlists with the same name is clear. But since we are talking about folders and not playlists, what would be wrong with making it possible to bypass this restriction?

If this is not possible from a programming point of view or if it is too complex, at least an error message would be helpful if you would rename folders that contain playlists with an identical name.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-15 12:34:21
thanks @Saitenschwinger,
I think you're pointing out 2 bugs :
1/ renaming a folder to the name of an existing folder shouldn't not be allowed.
2/ Creating a playlist with a name of an existing folder creates a folder.

The #2 may lead to other undesirable behaviors.

I'll check into it and hopefully post a fix later today.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-15 19:36:10
Playlist Organizer (Jscript Panel 3)
v2.0.5
15-10-2023

Version change :
- Bug fix : you cant rename a playlist or a folder to an existing name (from either a playlist or a folder).

The fact that you cant have a folder name with the same name as a playlist is not by design. I'll investigate this but at that stage, i'm not sure i'll modify it.

X

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-10-16 03:37:01
@etip
Hi :)

Playlist Organizer (Jscript Panel 3) v2.0.5 (2023-10-15):
Is there a problem if "scrollbar.js" is not included?

(https://i.imgur.com/oIR9h2J.png)
(https://i.imgur.com/Ault6ZF.png)

Created Playlist (Album List) → Displayed in "Playlist Manager".
There is a Playlist that is not displayed in "Playlist Organizer".
It may be because I deleted it once and created a Playlist with the same file name.
"Restore" does not restore everything.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-16 06:47:05
hi @Airken
My bad, i did it wrong, here is the right zip file.

X

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-10-16 07:20:05
Many Thanks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-16 15:56:48
thanks @Saitenschwinger,
I think you're pointing out 2 bugs :
1/ renaming a folder to the name of an existing folder shouldn't not be allowed.
2/ Creating a playlist with a name of an existing folder creates a folder.

The #2 may lead to other undesirable behaviors.

Hi @etip,

thanks for your bugfix!
I think there is still a small misunderstanding.
Ad 1/: Renaming a folder to the name of an existing folder was not allowed before. There was no bug.
I have - as written - renamed folders after their creation to the name of a playlist contained in it. There was no error message but the undesired behavior. This is the bug.
Ad 2/: see 1/.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-16 20:52:27
@Saitenschwinger
Yes, by design, having 2 folders with the same name was not allowed but the renaming function let it happen. It's now fixed.

Now as i said : "The fact that you cant have a folder name with the same name as a playlist is not by design. I'll investigate this but at that stage, i'm not sure i'll modify it."
This is however not feasible at the moment (both the create & the rename functions prevent having 2 same names).

Best
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-17 16:41:18
There are worse things in life. Thanks for this cool extension and for your help!

All the best to you
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-18 13:45:40
Hi @etip,

I would have two more questions:

1) Is there any way to remove this line (see screenshot). I do not need it.

2) Is there a way to show the duration of the playlists instead of the number of songs?

Thanks
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-18 15:26:49
Question 1 has been resolved. I have just found it.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-18 22:03:00
re question 2, you dont have the duration (you have # or size or both).
However if you hover on the playlist, the duration should show up.

Edit : i said should but i dont see it, it's a bug, it used to be there. I'll post a fix :)

Edit 2 : it actually works, you have to hover the size or # to see the duration, it was an earlier request to put it there.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-10-19 12:21:39
Is it possible to have the conversion to SMP?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-10-19 15:18:58
Hi @etip,

I know the change due to this request regarding hovering the mouse over size or#. That works. It's good and better than nothing.But it would be more practical for me to show the duration of the playlists instead of size or#. Is it complicated to program? Can I edit this by myself in Notepad++ in one of your files?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-20 19:21:16
Playlist Organizer (Jscript Panel 3)
v2.0.6
20-10-2023

Version change :
Added the ability to show the duration of the playlists. In Settings/Appearance/Playlist stats there is now the choice to show the playlist duration instead of size/#/size & #.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-10-21 00:57:29
Hi :)

And I'm sorry many times.
Not v2.0.6 (Main.js).

Main.js:
2023-10-15
v2.0.5

v2.0.5 (15-10-2023) Main.js
MD5: 93b062f50437577e3ae8db1c3cdc8750

v2.0.6 (20-10-2023) Main.js
MD5: 93b062f50437577e3ae8db1c3cdc8750

(https://i.imgur.com/3joVxHC.png)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-10-21 06:11:32
It's an oversight, the main doesn't change, you can put

// @version "2.0.6 date 20/10/2023"

What matters is the change in the pl_organizer.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-10-21 06:21:52
??

> What matters is the change in the pl_organizer.

I already know.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-21 09:35:36
my bad (again !) and thanks @Airken for pointing it out.

new zip below

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-10-21 09:53:19
Many Thanks. :)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-22 16:47:10
Playlist Organizer (Jscript Panel 3)
v2.0.7
22-10-2023

Version change :
- Added the choice of the background image (front, back, disc, icon or artist). If an image is missing, default is set to front.
menu : Settings/Appearance/Colors and font/Background/Choose cover.
The choice can be attached to a theme (you have to update one).

edit : Saw a bug, will update it later
edit 2 : should be ok now

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ApacheReal on 2023-10-22 17:43:31
Artist
(https://i.postimg.cc/7Jrz72Hx/artists.png) (https://postimg.cc/7Jrz72Hx)
Logo Radio
(https://i.postimg.cc/qtYyJFW6/logo-radio.png) (https://postimg.cc/qtYyJFW6)

 :))
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-10-23 05:50:38
Hi.
Playlist Organizer (Jscript Panel 3) v2.0.7
foobar2000 v2.0 64-bit/foobar2000 v2.1 preview 2023-10-13 64-bit,
(Portable installation)

Panel crashes when playing a track after changing the playlist.
Click Reload to go back.

Spoiler (click to show/hide)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-23 06:17:13
hi @Airken
Are you using the version i edited ? i had that same crash before i edited the post and thought the edit had fixed it.
thanks
Edit : If you are using a theme, maybe update the theme to the version with the background choice.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-10-23 06:39:15
Thank you for your reply

> Are you using the version i edited ? i had that same crash before i edited the post and thought the edit had fixed it.

Yes, I tried it on 2 PCs.
However, after overwriting it, it no longer crashes.
I'll take a look at the situation.

Thanks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-10-23 07:02:24
Reply #361 (https://hydrogenaud.io/index.php?PHPSESSID=v9tce2geuc644cghdbl056o562&topic=123820.msg1034408#msg1034408):

> Are you using the version i edited ?

Did you re-upload it?
Oops...
I didn't notice.
I was able to confirm.
pl_organizer.js
1.) MD5: 0434ba74f240f65927ee8e643eb62535
2.) MD5: 7e1e1e8c0471c96e6adf0485e672f5ce

Anyway, I fixed it by overwriting it.
Many Thanks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-23 08:21:09
Thanks for confirming !
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Bardware on 2023-10-28 19:44:04
Thank you so much for this plugin.
I'm wondering about the number which I guess should be the number of titles in the playlist. I have this playlist with 1520 titles, the plugin shows 11520. The other playlist has 2199 titles, the plugin displays 21199. I didn't try to understand the JavaScript code, but there's one digit 1 too many in these cases.

All the best,
Bard
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-29 08:14:11
Hi Bard,
Does that happen for every playlists or only these 2 ?
In Settings/Appearance/playlist Stats can you play with the Thousand separator and see if it has any impact ?
Thank you
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Bardware on 2023-10-29 13:39:52
In Settings/Appearance/playlist Stats can you play with the Thousand separator and see if it has any impact ?

Indeed, setting the Thousand separator solved the issue. The display was always correct for smaller playlists.
Thank you and keep up the good work.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-10-29 14:34:21
great news and thank you.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: cwb on 2023-11-10 22:36:39
Does this happen to anyone else?

When I rename a playlist the renamed playlist doesn't stay in the folder it is in; it automatically goes to the bottom of the playlist and folders. Requiring me to drag the renamed playlist back to where it was.

Using version 2.0.7 of etip's Playlist Organizer.

I jumped from using version 1.9.5 of the script to 2.0.7 so I do not know if I would get the same behavior with the versions in between those two.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-11-11 00:20:16
@cwb : It does happen to everyone else indeed.
I'll post a fix tomorrow and thanks for pointing that out.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-11-11 09:30:41
Playlist Organizer (Jscript Panel 3)
v2.0.8
11-11-2023

Version change :
- Fixed a bug : Renaming a playlist would put the renamed playlist at the bottom of the list. Now it stays where it was.

X
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: cwb on 2023-11-11 09:57:22
Playlist Organizer (Jscript Panel 3)
v2.0.8
11-11-2023

Thank you
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Saitenschwinger on 2023-11-27 18:50:53
Hi @etip,

I've seen you have solved my request No. 2 from my post #350.  Thank you!!

Best  Saitenschwinger

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bloniaq on 2023-11-28 10:40:47
Hello. Great job Sir. This is a must-have plugin for me. Especially since you worked out more levels of folders.

Is there a way to configure what happen when track is dragged and dropped to a playlist on tree? For me my active playlist is changing to the destination playlist (the one I copied track to), while I would want have been on a source playlist (the one I copied file from). I couldn't find a setting to define this behavious, although in JScript Panel I saw a on_drag_drop function - so I assume it could be already developed. Is that so? If not, please consider this as an idea for the future.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2023-11-28 14:40:17
Yup, the component supports it. If etip considers this, they would just need to edit the action.ToSelect property inside on_drag_drop to be false
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-11-28 20:28:22
yes, i'll post an update later, the .ToSelect property is indeed set to true.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-11-28 21:49:23
or you can set this property to true in line 511. Next version will be modified as well.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: white_magic on 2023-12-02 01:33:39
Does v2.0.8 not need "panel_pl_organizer.js"? Because I don't see it in the zip file.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Air KEN on 2023-12-02 04:48:41
@white_magic

What does it mean?
When you unzip pl_organizer2.0.8.zip, it is there properly.

(https://i.imgur.com/uu3sCGZ.png)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ed.j on 2023-12-29 23:14:23
I have been lurking on this forum for ages and gleaned tonnes of useful information from it - but finally registered to say THANK YOU @etip for this excellent plugin. I have a few comments but will leave them a couple of days to let me fully explore/test as it's the first time I've used JScript. Thanks once again.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ed.j on 2023-12-29 23:37:41
or you can set this property to true in line 511. Next version will be modified as well.

In order to stop changing the Playlist View, should it be changed to false on line 502 as well? Seems to work but I'm not sure if that is going to break something else at the same time...
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2023-12-30 08:55:39
Hi @ed.j ,
Line 502 is about when you create a playlist from a drag&drop (you drop into an empty area). It was an earlier request. You can set to 'false' if you dont want the plugin to switch to that newly created playlist (it will not impact anything else).

Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: ed.j on 2023-12-30 12:55:43
Hi @ed.j ,
Line 502 is about when you create a playlist from a drag&drop (you drop into an empty area). It was an earlier request. You can set to 'false' if you dont want the plugin to switch to that newly created playlist (it will not impact anything else).

Awesome thank you.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bloniaq on 2024-01-14 11:17:57
Hi. Thanks for help with my last question - I successfully configured drag and drop.

Although I have notice some bug. For big playlist there is a wrong number of tracks shown in tree in a weird way.
Playlist with 6022 elements appears in tree as 61022, playlist with 19717 is shown as 191717. Also folder of playlist with sum of 1243 tracks is shown as folder of 11243 tracks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: cwb on 2024-01-14 13:39:05
Hi. Thanks for help with my last question - I successfully configured drag and drop.

Although I have notice some bug. For big playlist there is a wrong number of tracks shown in tree in a weird way.
Playlist with 6022 elements appears in tree as 61022, playlist with 19717 is shown as 191717. Also folder of playlist with sum of 1243 tracks is shown as folder of 11243 tracks.

See Bardware's post at the below link and etip's reply.

https://hydrogenaud.io/index.php/topic,123820.msg1034615.html#msg1034615

Does etip's reply help?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: bloniaq on 2024-01-14 14:58:00
Yes indeed. Problem solved. Thanks.
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: metal_termite on 2024-01-18 21:24:44
Is it just me or has anyone else noticed the vertical centering of text in the selection bar is off?

The first image is from the playlist jscript panel

(https://i.imgur.com/EAhEXcE.png)

The second image is from the default playlist view

(https://i.imgur.com/EBCDrzF.png)

So it looks like the playlist view (and Windows) vertically centers text based on the uppercase height of a font, where the baseline is always the bottom of an uppercase font. However, it looks like the plorg Jscript takes into account the top height of the font and tail of a lowercase font, which makes it look off center.

Is it possible to fix this to be like the second image?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: スラッシュ on 2024-01-19 04:15:52
hi! after installing windows 11 (sigh...) i am now faced with the following error when i try to play a song:

Code: [Select]
JScript Panel 3.3.29 (Playlist Organizer v2.0.8 date 11/11/2023 by Seb + inspiration and abstracts from marc2003 + great help from metal_termite.)
JavaScript runtime error
Invalid procedure call or argument
File: G:\foobar2000 x64\profile\pl_organizer\pl_organizer.js
Line: 153, Col: 29
any idea what might be causing this?

EDIT: i looked at the line in question and tried some stuff and seem to have fixed it: i think maybe the actively playing color setting/icon had become un-set?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: teleomorph on 2024-04-01 03:11:01
I've looked through this thread but I can't find simple installation instructions anywhere.

Can someone tell me where to put the 4 js files?  In which folders specifically within AppData\Roaming\foobar2000-v2?

(and yes, I do already have JSP3 installed)

Thanks


Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: anamorphic on 2024-04-01 14:30:56
^ Make a new folder "pl_organizer" and extract files there. Add JSP3 panel to layout and click to open editor, Tools > Import button, find "pl_organizer" folder, (possibly need to change filter to "All files (*.*)" to see .js files) and import "main.js".
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Jul2323 on 2024-04-01 19:10:31
i install version  2.0.8 . and error :

'_pl_organizer' is undefined
File: <main>
Line: 14, Col: 1

PS: i open the main.js in JP3 .
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Juancar2 on 2024-04-01 23:08:14
i install version  2.0.8 . and error :

'_pl_organizer' is undefined
File: <main>
Line: 14, Col: 1

PS: i open the main.js in JP3 .

The zip contains 3 files :
main.js file which is the main panel script
panel_pl_organizer.js
pl_organizer.js which is the main code

The last 2 files are to be copied in the fb.ProfilePath + "\pl_organizer" folder
X
You need to create a JScript 3 panel, its code has to be the main.js file (copy/paste).

Jscript Panel 3 link : https://jscript-panel.github.io/docs/


Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: teleomorph on 2024-04-02 04:09:32
Thank you!!

^ Make a new folder "pl_organizer" and extract files there. Add JSP3 panel to layout and click to open editor, Tools > Import button, find "pl_organizer" folder, (possibly need to change filter to "All files (*.*)" to see .js files) and import "main.js".
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: teleomorph on 2024-04-02 04:19:19
I was getting the same error, but just realized the mistake I made was leaving the folder titled pl_organizer2.0.8, instead of changing it to just pl_organizer.

i install version  2.0.8 . and error :

'_pl_organizer' is undefined
File: <main>
Line: 14, Col: 1

PS: i open the main.js in JP3 .
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: Jul2323 on 2024-04-02 14:13:25
I was getting the same error, but just realized the mistake I made was leaving the folder titled pl_organizer2.0.8, instead of changing it to just pl_organizer.

i install version  2.0.8 . and error :

'_pl_organizer' is undefined
File: <main>
Line: 14, Col: 1

PS: i open the main.js in JP3 .

Thanks you work ....
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: teleomorph on 2024-04-04 05:25:11
Feature request:

Would love to see a "revive dead items in playlist" function.  Really valuable when moving files around to different directories/drives.  And there doesn't seem to be option for this in yet in x64 Foobar v2. 

(If I'm wrong and it exists, let me know.)
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: marc2k3 on 2024-04-04 11:12:47
Playlist Fix: https://jscript-panel.github.io/other/playlist-fix/
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: teleomorph on 2024-04-04 16:40:15
Playlist Fix: https://jscript-panel.github.io/other/playlist-fix/

Awesome!! Thank You!
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: teleomorph on 2024-04-04 16:52:08
I'm encountering an apparent bug.

Playlists keep getting removed from one particular folder. It happens whenever I restart Foobar. (And I think it even happens while app is open, but not sure.)

And it's not every playlist. There's a couple that stay in the folder, but all others keep getting automatically moved back outside folder.  Other folders do not seem to have this issue.

Anyone else experience this?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: teleomorph on 2024-04-05 18:27:31
Just creating a new folder to replace the previous one solved it.  So it's not an important bug.

I'm encountering an apparent bug.

Playlists keep getting removed from one particular folder. It happens whenever I restart Foobar. (And I think it even happens while app is open, but not sure.)

And it's not every playlist. There's a couple that stay in the folder, but all others keep getting automatically moved back outside folder.  Other folders do not seem to have this issue.

Anyone else experience this?
Title: Re: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3
Post by: etip on 2024-04-15 17:00:12
just curious, what was the name of the folder ?