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 70479 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.


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

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

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

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

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

Reply #404
just curious, what was the name of the folder ?

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

Reply #405
Very good component  :) though sometimes it still crashes a bit so I gotta open the pl_organizer.txt and correct it by myself.

But I'm looking forward to a function that I can customize how to show the playlist names, like that organizer before giving us an option to enter something like regular expression, codes or wildcard characters for playlist name rendering. (but not stored)
Now I gotta modify your pl_organizer.js a bit to add that function by myself.

It's also better if this organizer could come with an HTTP remote server or connect to popular Foobar2000 HTTP controller or apps. It's based on Jscript so I guess it's a bit easier to be shown via HTTP server. The HTTP control components now can only show the Foobar2000 official playlist manager, but can't show the previous organizer nor your Jscript organizer, the organizer can't benefit me when I remote control my Foobar2000 with my devices.

That playback status icon... huh.. I personally prefer something like a play button rather than a musical note. But that's alright. If you could give us more options of different playback status icons, or even let us import an .ico or image file for custom playback icon, would be better.

And the up and down arrow icons on the scrollbar can't show.

Greatly appreciated, you've done a very good job!


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

Reply #407
And the up and down arrow icons on the scrollbar can't show.

Install this font.

https://github.com/FortAwesome/Font-Awesome/raw/4.x/fonts/fontawesome-webfont.ttf
Has already installed before. Only the folder icons and playback icon are shown correctly, up/down scrollbar icons are shown yet.
As for the playback status icon, a musical note looks a bit weird to me in my personal opinion. I rather prefer something like just a simple play button:
X
or a speaker like icon:
X



MOD: changed attachment type

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

Reply #408
Hi,
it's not an icon, it's a char from the FontAwesome library (Audio Char)
You can change it to one you like : It's line 65 of pl_organizer.js.

Best

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

Reply #409
Hi,
it's not an icon, it's a char from the FontAwesome library (Audio Char)
You can change it to one you like : It's line 65 of pl_organizer.js.

Best

I found 2 quite good chars in the site you provided:
https://fontawesome.com/icons/play?f=classic&s=solid
https://fontawesome.com/icons/volume-low?f=classic&s=solid

Thank you, I'll try, but I still suggest an option in your context menu which lets us choose one like your folder chars.
Thx a lot.

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

Reply #410
First of all, thanks to etip and all other contributers for creating this plugin, i was really suffering trying to find a good replacement for playlist folder management. Even better, using Jscript Panel seems to make the code editing and contributing easier.

I have some features that i want to implement (slowly), so i started adding them.

I've added the ability to Move playlists inside a Folder that has subfolders in it, previously it wasn't possible to move to a Folder if it had any subfolders (could only move to that folder's subfolders).

To test, you need to have a folder created, and then another subfolder inside that folder.
Right click on a playlist, then select the option "Move To" and then select the Folder, a new option <Root of Folder> will now appear (above any subfolders of that folder), picking it will move the playlist to the Folder.

Code wise, the change is in the pl_organizer.js file, a couple of lines where the "Move to" menus are generated.
---
Request for etip: it would be nice if you (or someone else with thread access) would update this thread's initial post to have the latest (official) zip file version of the plugin.

Thanks to all and i hope to not be introducing any bugs  :))

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

Reply #411
First of all, thanks to etip and all other contributers for creating this plugin, i was really suffering trying to find a good replacement for playlist folder management. Even better, using Jscript Panel seems to make the code editing and contributing easier.

I have some features that i want to implement (slowly), so i started adding them.

I've added the ability to Move playlists inside a Folder that has subfolders in it, previously it wasn't possible to move to a Folder if it had any subfolders (could only move to that folder's subfolders).

To test, you need to have a folder created, and then another subfolder inside that folder.
Right click on a playlist, then select the option "Move To" and then select the Folder, a new option <Root of Folder> will now appear (above any subfolders of that folder), picking it will move the playlist to the Folder.

Code wise, the change is in the pl_organizer.js file, a couple of lines where the "Move to" menus are generated.
---
Request for etip: it would be nice if you (or someone else with thread access) would update this thread's initial post to have the latest (official) zip file version of the plugin.

Thanks to all and i hope to not be introducing any bugs  :))

I got this error when right-clicking
Updated JScript Panel to the latest version

JScript Panel 3.8.5 (Playlist Organizer v2.0.8 date 11/11/2023 by Seb + inspiration and abstracts from marc2003 + great help from metal_termite.)
JavaScript runtime error
Unable to get property 'AppendMenuItem' of undefined or null reference
File: C:\Users\Tetriser\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 641, Col: 25

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

Reply #412
First of all, thanks to etip and all other contributers for creating this plugin, i was really suffering trying to find a good replacement for playlist folder management. Even better, using Jscript Panel seems to make the code editing and contributing easier.

I have some features that i want to implement (slowly), so i started adding them.

I've added the ability to Move playlists inside a Folder that has subfolders in it, previously it wasn't possible to move to a Folder if it had any subfolders (could only move to that folder's subfolders).

To test, you need to have a folder created, and then another subfolder inside that folder.
Right click on a playlist, then select the option "Move To" and then select the Folder, a new option <Root of Folder> will now appear (above any subfolders of that folder), picking it will move the playlist to the Folder.

Code wise, the change is in the pl_organizer.js file, a couple of lines where the "Move to" menus are generated.
---
Request for etip: it would be nice if you (or someone else with thread access) would update this thread's initial post to have the latest (official) zip file version of the plugin.

Thanks to all and i hope to not be introducing any bugs  :))

I got this error when right-clicking
Updated JScript Panel to the latest version

JScript Panel 3.8.5 (Playlist Organizer v2.0.8 date 11/11/2023 by Seb + inspiration and abstracts from marc2003 + great help from metal_termite.)
JavaScript runtime error
Unable to get property 'AppendMenuItem' of undefined or null reference
File: C:\Users\Tetriser\AppData\Roaming\foobar2000-v2\pl_organizer\pl_organizer.js
Line: 641, Col: 25

Thanks for warning me, i haven't checked with the latest version, I'll look into it.

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

Reply #413
yes, this script does not work. It's safer to go back to my latest version.
Frankly i didnt bother getting the "move to" --> root menu as this is a feature that you can do using drag & drop.
Best

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

Reply #414
yes, this script does not work. It's safer to go back to my latest version.
Frankly i didnt bother getting the "move to" --> root menu as this is a feature that you can do using drag & drop.
Best
Thanks for your input etip, and glad to see you back :) Thanks for all the work on the plugin.

I believe I've fixed it, along with an error that would occur when trying to "Move to..." the first folder (or a folder with an internal id of 0, invisible to the program user but visible in the pl_organizer.txt file). Thanks for notifying me of the bug and for your patience.

Here's the bugfix version: 2.0.8.1.1. The bug didn't have to do with the Jscript Panel3 version update, but due to my mistake when coding.

To install or update, do the usual process: overwrite the .js files from the zip into your "pl_organizer" folder in the foobar2000v2 user folder, and don't forget to load the new Main.js file again (right click on the JScript Panel, over an "empty" area outside of any playlist or folder, go into the "Configure..." menu, then press the "Tools" button, choose "Import", navigate to the "pl_organizer" folder, where it says "Text Files (.txt)" click and choose "Jscript Files (.js)" and choose Main.js, press "Open", then in the configure window, press "Apply" then "Ok".

For safety, I suggest making frequent backups of your "pl_organizer.txt" file that's in your user folder "C:\Users\<your username>\AppData\Roaming\foobar2000-v2"

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

Reply #415
Thank you for your script @pj_foobarziest, even if the extension does not (yet) work.

It's a pity that your script doesn't work or doesn't offer what you announced in your first post. Because the functionality to reach deeper folders via the menu command “Move to” by right-clicking still does not work, but at least the “red screen of crash” that appear when right-clicking has been eliminated, only the functionality seems to be identical to that of the original for me. In any case, reinitializing by selecting Main.js again did nothing.

I would appreciate being able to reach at least one more level easily, two would be even better. As it is, I am forced to overfill the first root level more than is good for the overview.

Windows 10 Pro, with all updates
foobar2000 2.24 x64
JSP3 3.8.5

Michelist

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

Reply #416
i stopped developing this "move-to" menu the day i launched the unlimited number of sub-folders feature.
Meanwhile, you can use drag&drop to move any playlist in any folder, so you do not need the menu.
Let me know if the drag&drop doesnt work or if you cant use it for some reasons
thanks

@pj_foobarziest  : please stop posting scripts that are not working, or pm me before so i can check. I dont really understand how they can work on your foobar.


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

Reply #417
i stopped developing this "move-to" menu the day i launched the unlimited number of sub-folders feature.
Meanwhile, you can use drag&drop to move any playlist in any folder, so you do not need the menu.
Let me know if the drag&drop doesnt work or if you cant use it for some reasons
thanks

@pj_foobarziest  : please stop posting scripts that are not working, or pm me before so i can check. I dont really understand how they can work on your foobar.

Will do in the future, thanks for offering to help. The script i've posted has been working perfectly on my computer since the first time i've posted  it, but for some reason, it's not working with other people, probably some conflict with the pl_organizer.txt playlist file that i made work in earlier tests then somehow broke. I need to improve my testing environment to detect these problems, probably with a separate fresh install.

Quote from: Michelist
It's a pity that your script doesn't work or doesn't offer what you announced in your first post. Because the functionality to reach deeper folders via the menu command “Move to” by right-clicking still does not work, but at least the “red screen of crash” that appear when right-clicking has been eliminated, only the functionality seems to be identical to that of the original for me. In any case, reinitializing by selecting Main.js again did nothing.

I would appreciate being able to reach at least one more level easily, two would be even better. As it is, I am forced to overfill the first root level more than is good for the overview.

Windows 10 Pro, with all updates
foobar2000 2.24 x64
JSP3 3.8.5

Michelist

Thanks for your input! Sorry it doesn't work, I'm looking further into it.
I do plan on adding the feature that you mention, the "infinite sub folder" move-to as well, since I also have many subfolders-in-subfolders and require that functionality. The current code only supports 2 levels of depth i think.

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

Reply #418
Re-reading my code, i just realized that if you want to "move-to" --> root, you have to keep the Crtrl key pressed, completely forgot.
I'll look into the infinite folder, although the drag&drop feature is much better ...

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

Reply #419
I can of course move the folders manually using drag & drop, but this becomes impractical when the entire window is already filled with folders. In this respect, it is better to create folders immediately in the folders in which you want to place them.
The main problem for me is when moving playlists to folders that can no longer be reached by the Move to command, because I usually create a playlist in the root folder of the playlists and then move it from there to the corresponding categories and sub → sub-categories.
As a DJ with well over 1 million tracks in the media library, you can't get by with just a handful of folders.

Michelist

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

Reply #420
Re-reading my code, i just realized that if you want to "move-to" --> root, you have to keep the Crtrl key pressed, completely forgot.
I'll look into the infinite folder, although the drag&drop feature is much better ...

That's cool, please add it to the User Manual! And other undocumented features you may find!

So guys, i've been unable to replicate your problems, can't break the code in my machine. I've created portable fresh installs of foobar with the same version as Michelist and can't find a way to break it, and tried renaming my foobar2000_v2 profile folder, so a new empty one is created, installed my script and it doesn't break. I'm suspecting it's maybe a characters problem, or a folder name problem, or a too many playlists problem, or something local to each user.


So I have the following requests if you want to help me find the problem:

Couple of questions for you to check, sorry if they're condescending but i need you to make sure:
- are you using foobar2000 v1 or v2? (i already know Michelist is using v2)

- are you sure you placed the "pl_organizer" folder in the folder
        C:\Users\<YOUR USERNAME>\AppData\Roaming\foobar2000-v2\
    and **NOT** in the user-components folder
        C:\Users\<YOUR USERNAME>\AppData\Roaming\foobar2000-v2\user-components\

    - or, if you're using a portable foobar2000, place the "pl_organizer" folder inside the "profile" folder
        <your portable foobar2000_v2 install folder>\profile\

and that you've overwritten the "pl_organizer" files with that latest update i posted.



- Very important! if you have an Error window, please post the *file* and *line* stated in the Error window!


!!!Request!!!!
- if you're comfortable with it, send me your pl_organizer.txt playlists file in a private message:
   C:\Users\<YOUR USERNAME>\AppData\Roaming\foobar2000-v2\pl_organizer.txt
this contains your folder structure, ordering, and the name of your playlists, so you'll be sharing that with me, but it will help debugging!


Another approach - test the program with an empty playlists folder and pl_organizer file, and post the results (error message, line and file, etc):
    - first, close all instances of foobar2000_v2.
    - create a backup of your playlists folder
        C:\Users\<YOUR USERNAME>\AppData\Roaming\foobar2000-v2\playlists-v2.0\
    - and a backup of your pl_organizer.txt file
        C:\Users\<YOUR USERNAME>\AppData\Roaming\foobar2000-v2\pl_organizer.txt

    - then, rename the playlists-v2.0 folder to something else (i usually add an underscore at the end, playlists-v2.0_ ) so the program doesn't pick it up and creates another empty playlists-v2 folder. Also, rename the pl_organizer.txt file in the same way, add an underscore at the end.
    - with the playlists folder and pl_organizer.txt file renamed, open foobar2000.

    - check if there's an error, send me it.

    - you can now close foobar, delete your empty pl_organizer.txt file and playlists-v2 folder, and restore the previous ones by renaming them, removing the end underscores.


Without your help, I really can't progress past this point to help you unless I reorder (refactor) the code to make it more error resistant, and hope that fixes it (which is a good practice anyway).

Thanks and happy holydays

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

Reply #421
the code you posted before cannt work on your machine, as soon as you right click, an error has to pop out.
Debugging it the way you suggest above will not change a thing.
I can of course move the folders manually using drag & drop, but this becomes impractical when the entire window is already filled with folders. In this respect, it is better to create folders immediately in the folders in which you want to place them.
The main problem for me is when moving playlists to folders that can no longer be reached by the Move to command, because I usually create a playlist in the root folder of the playlists and then move it from there to the corresponding categories and sub → sub-categories.
As a DJ with well over 1 million tracks in the media library, you can't get by with just a handful of folders.

Michelist
I'm sorry but i will not modify my script. I've looked into it and i'd need to do a recursive loop to create dynamic menus and i dont really know how to dispose these dynamic menus. I'm afraid, if you have a lot of folders and sub folders, this will take too much memory.

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

Reply #422
the code you posted before cannt work on your machine, as soon as you right click, an error has to pop out.
Debugging it the way you suggest above will not change a thing.

Please send me your error message, indicating where the line where the error occurs. Thanks

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

Reply #423
I'm sorry but i will not modify my script. ...
That is okay for me. The thing, the reason for me asking, was the announcement of @pj_foobarziest's first posting which, if it would work, would be very comfortable for me to use. 

... I'm afraid, if you have a lot of folders and sub folders, this will take too much memory.

I thought it would be the amount of playlists, not the amount and depth of the folders and their stacking, but you will know what you are saying.
But okay, I guess your assumption may/will be true for the majority of users of current Consumer-PCs, but so far I did not hit the wall with my old 24-core graphics workstation and its 96GB RAM.¹ I believe to have a comfortable “buffer”, with my little beast. ;-)
For me, foobar2000 runs smoothly like a kitten, as one software among many, without bitching.

But it is okay, you should not develop for only a single user's very special needs. Over the decades I have learned and am able to adapt.

Michelist

¹ Which will soon be replaced by a much better workstation with at least four times the RAM.

 

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

Reply #424
That is okay for me. The thing, the reason for me asking, was the announcement of @pj_foobarziest's first posting which, if it would work, would be very comfortable for me to use. 
I'm still working on your requests because I want it as well, as well as the multiple folders, will attempt to publish soon. I'm reworking the code to be more robust, and easier to maintain and detect failures.

... I'm afraid, if you have a lot of folders and sub folders, this will take too much memory.
I don't think this will be a problem, Windows does these menus in a very lightweight fashion, seeing how the menus are literally being created in memory only when the user right-clicks (when you invoke your "this.contextMenu()" function) and being destroyed at the end of the same function, instead of pre-caching at the start of the program and destroying at the end, which would indicate heavier requirements. So they're probably just basic rectangles with mouse detection on top. I will attempt to do a stress test with thousands of sub-menus and look at how the memory and cpu perform.

Quote from: Michelist
But it is okay, you should not develop for only a single user's very special needs. Over the decades I have learned and am able to adapt.
Never be afraid to ask, if it's useful for you it will probably also be useful for 100, 1000 or a million more people, and the dev probably simply never thought of it, or tried and couldn't implement it. I'll monitor this thread in the future and add things if I can.

But okay, I guess your assumption may/will be true for the majority of users of current Consumer-PCs, but so far I did not hit the wall with my old 24-core graphics workstation and its 96GB RAM.¹ I believe to have a comfortable “buffer”, with my little beast. ;-)
For me, foobar2000 runs smoothly like a kitten, as one software among many, without bitching.

¹ Which will soon be replaced by a much better workstation with at least four times the RAM.
You're either into video editing or AI work with these RAM requirements :D