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 46536 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 #150
Hi,
I apologize for the issue. I will look into it but unfortunately not before beginning of next week as I’m on vacations.

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

Reply #160
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, 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.

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

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

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

Reply #162
(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.

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

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

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

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






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

Reply #165
Thanks !!

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

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

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

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

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

Reply #168
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:

  • foo_jscript_panel3 (now at version 3.2.19) and the recommended font are now installed.
  • While FB2K is closed, go to my profile and delete pl_organizer.txt and replace the three files in the .\pl_organizer file with the latest versions
  • Install foo_jscript_panel3 (now at version 3.2.19) and the recommended font.
  • Open up the jscript panel config editor. Delete all the code from there and paste in the code from your Main.js . Choose OK... it works! However...
  • After closing and reopening FB2K I get the same error I mentioned originally:

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:

  • Right-click on the jscript panel and choose Configure, which opens the editor, then choose Tools | Reset to restore the original panel code
  • After choosing OK I get the original jscript panel window back
  • Delete pl_organizer.txt (I don't even have to quit FB2K)
  • Paste your main.js code into the config editor as I did above.

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?

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

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

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

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

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

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

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

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

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

Reply #173
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"

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

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