Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Playlist Organizer (aka foo_plorg) replacement on Jscript Panel 3 (Read 51140 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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

Reply #175
thanks Marc,
tbh i'm not that familiar with JSON but i will investigate.

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

Reply #176
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

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

Reply #177
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.

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

Reply #178
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.

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.

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

Reply #179
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

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

Reply #180
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

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

Reply #181
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

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

Reply #182
@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';


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?


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.





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.


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

Reply #183
@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.


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

Reply #184
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.

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

Reply #185
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.

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

Reply #186
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?

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

Reply #187
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.

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

Reply #188
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 :)

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

Reply #189
Up to folder B for now. I would like to request folder C.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 PRO, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

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

Reply #190
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

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

Reply #191
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.

 

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

Reply #192
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.

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

Reply #193
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

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

Reply #194
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.

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

Reply #195
@iridescentaudio : Thanks for the feedback, i can make the "playing a song" optional if you wish.


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

Reply #197
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

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

Reply #198
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

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

Reply #199
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).