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-Manager-SMP (Read 7111 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Playlist-Manager-SMP

Reply #25
Yes, the file is there (in xxx-scripts\helpers), and the bug still appears even with the last SMP version.
But if it affects just me I can patiently wait for the next versions, where it hopefully will be fixed...

(Not sure where I should report this bug, anyway... Here I can't find any (recent / open) thread referring to this issue. Do you mean this one? I'm a bit lost when it comes to coding and stuff...)

Re: Playlist-Manager-SMP

Reply #26
At its thread or github (your link):
https://hydrogenaud.io/index.php?topic=116669.0

Have no idea what's going on, since it works on my side on win 10 and win 7 pcs but another user had problems at win 7.

Re: Playlist-Manager-SMP

Reply #27
Oh, I see that you've already reported it, thanks.
By the way, I'm on win 10.

Re: Playlist-Manager-SMP

Reply #28
I was having this exact problem with the World Map script. The file is there but I get the same error message saying it doesn't point to valid file. For some reason, the release version of the script seems to work fine for me. I'm using Windows 10 as well.

Re: Playlist-Manager-SMP

Reply #29
Have updated the repository with a new feature to automatically add tags to tracks added to playlists (see changelog) with TF expressions, a set value or JS functions.This:
https://hydrogenaud.io/index.php?topic=121331.msg1001055;topicseen#new
Also an important bugfix on autosaving (not applying on filtered playlists).

If anyone want to test it, download the files directly from the repository not the releases. Please have in mind the relative path bug on SMP has not been solved yet, so I have no idea if it will work for you!
(it's recommended to also download the latest files from the rest of my scripts in that case, since I have changed all with major changes)


Re: Playlist-Manager-SMP

Reply #31
This plugin is awesome! 1 minor detail that took me a while to figure out though. I specified my playlist path as this: "D:\Google Drive\Music\Default". It kept saying it couldn't find any playlists, which made no sense since when I had it open said folder, I saw all my .m3u8 files. Then I tried adding a trailing slash, so I made it: "D:\Google Drive\Music\Default\" and that fixed it. Would it be possible to check if the last character includes the slash, and if not, just append it? Or perhaps make mention of that in the info panel as part of the can't find any playlists standard message that otherwise populates it? Great work btw, this is exactly what I needed.

Re: Playlist-Manager-SMP

Reply #32
This plugin is awesome! 1 minor detail that took me a while to figure out though. I specified my playlist path as this: "D:\Google Drive\Music\Default". It kept saying it couldn't find any playlists, which made no sense since when I had it open said folder, I saw all my .m3u8 files. Then I tried adding a trailing slash, so I made it: "D:\Google Drive\Music\Default\" and that fixed it. Would it be possible to check if the last character includes the slash, and if not, just append it? Or perhaps make mention of that in the info panel as part of the can't find any playlists standard message that otherwise populates it? Great work btw, this is exactly what I needed.
Yep, easy enough. That's a "problem" with paths at many places though, not only this script or that specific function. Will check the path inputs of most of my scripts to solve it.

Btw the latest SMP dev build seems to fix the relative paths bug, so I will update the github repositories with proper releases asap.

Quote
regor, I followed your steps from here https://hydrogenaud.io/index.php?topic=121331.msg1001029#msg1001029 but automatically adding tags to tracks added to playlists it's not working for me . Either it's a bug or I'm doing something wrong http://sendanywhe.re/AR38O8Y7
Can't see the link sorry. (you can attach gifs here too btw)


Re: Playlist-Manager-SMP

Reply #34
Sorry, here is the gif
You must use double quotes instead of ' x 2. That's how javascript json works. Do it and it should work ;)

And... I will try checking if the input uses ' and replacing it with " to avoid this. Or at least warn about it in the popup.

EDIT: last commit should replace ' ' with " automatically.

Re: Playlist-Manager-SMP

Reply #35
This plugin is awesome! 1 minor detail that took me a while to figure out though. I specified my playlist path as this: "D:\Google Drive\Music\Default". It kept saying it couldn't find any playlists, which made no sense since when I had it open said folder, I saw all my .m3u8 files. Then I tried adding a trailing slash, so I made it: "D:\Google Drive\Music\Default\" and that fixed it. Would it be possible to check if the last character includes the slash, and if not, just append it? Or perhaps make mention of that in the info panel as part of the can't find any playlists standard message that otherwise populates it? Great work btw, this is exactly what I needed.
After checking, I'm sorry to say that's something already checked if you use the menus. '\' is added at the end if you omit it. Either you are using a really old version or you added the playlist paths directly at properties (and therefore any path integrity check is user's responsibility).

Re: Playlist-Manager-SMP

Reply #36
Have updated the repository with a few fixes, the previous improvement with quotes and a few new tools to export playlists (copy playlist file to, copy playlist file +tracks, copy playlist file + convert tracks).
See this: https://hydrogenaud.io/index.php?topic=121367

After setting the DSP, output and TF filename expression, the playlist manager is fully integrated with foobar converter... allowing to export entire playlists (and maintain their order) in one click. Can be used as a 'one way sync' tool for portable players, etc.

Spoiler (click to show/hide)

I mixed the output of multiple exports steps in the same folder, but you get the idea...

Re: Playlist-Manager-SMP

Reply #37
Thanks, it works now. Great new features , btw

Re: Playlist-Manager-SMP

Reply #38
Changed a bit the last convert feature to allow an arbitrary number of presets (instead of only 1). Also the list shows the DSP, TF and path (disk letter + folder name). I think it's much better now since it allows multiple outputs without needing to re-configure it or asking for user input every time.

Spoiler (click to show/hide)

* (DSP) and (FOLDER) means those var are set with user input instead of predefined.

Re: Playlist-Manager-SMP

Reply #39
And another suggestion here, although maybe it can't be done with SMP. It's possible to automatically copy a tag (or more) to another tag when songs are added to library? (something that this old component can do https://hydrogenaud.io/index.php?topic=68139.0 , but it can only accomplish one task, not more)
So, let's say I want to copy the Date tag to another tag, Date2, and Artist tag to Artist2
I know it can be done with masstagger but obviously it would be easier like this, automatically


Edit : just noticed this cool color code for DR, in this gif https://hydrogenaud.io/index.php?topic=30361.msg1001484#msg1001484 Can you share it ? :)

One for bitrate :

$ifgreater(%bitrate%,128,$ifgreater(%bitrate%,320,$rgb(0,0,250,0,0,250)%bitrate%,$rgb(0,250,0,0,250,0)%bitrate%),$rgb(250,0,0,250,0,0)%bitrate%)

Re: Playlist-Manager-SMP

Reply #40
I couldn't edit the last post so : cool color code for PLR and DR in this gif https://hydrogenaud.io/index.php?topic=120979.msg1001391#msg1001391 Can you share it ? :)

Edit :
Also it seems the latest dev build doesn't solve the problem :
Error: Spider Monkey Panel v1.5.2-dev+b064066b (Playlist Manager: Playlist Manager v0.2 by XXX)
include failed:
Path does not point to a valid file: helpers\helpers_xxx.js

File: <main>
Line: 27, Column: 1
Stack trace:
  @:27:1


Re: Playlist-Manager-SMP

Reply #41
And another suggestion here, although maybe it can't be done with SMP. It's possible to automatically copy a tag (or more) to another tag when songs are added to library? (something that this old component can do https://hydrogenaud.io/index.php?topic=68139.0 , but it can only accomplish one task, not more)
So, let's say I want to copy the Date tag to another tag, Date2, and Artist tag to Artist2
I know it can be done with masstagger but obviously it would be easier like this, automatically


Edit : just noticed this cool color code for DR, in this gif https://hydrogenaud.io/index.php?topic=30361.msg1001484#msg1001484 Can you share it ? :)

One for bitrate :

$ifgreater(%bitrate%,128,$ifgreater(%bitrate%,320,$rgb(0,0,250,0,0,250)%bitrate%,$rgb(0,250,0,0,250,0)%bitrate%),$rgb(250,0,0,250,0,0)%bitrate%)
That's already within the manager features. Create an autoplaylist with 'ALL', add auto-tags for tracks where date2 is date, and artist2 is artist. Done. Note auto-tagging will only copy values (merge), never remove previous one (and date and artist is never deleted).

About the DR thing... it's supposed it's already shared on the relevant repositories (not here but Playlist Tools or Search by Distance). (*)

About the SMP bug, please report it at the SMP thread. According to TheQwertiest's log at github, it had something to do with unicode strings on paths. Maybe it would help if you report the full path where you added the scripts.

(*) Will also create another repo for all scripts, presets, etc. for AutoHotkey, Masstagger, Notepad++, Picard, UI, ...

Re: Playlist-Manager-SMP

Reply #42
Just updated the repository. The last changes should hopefully greatly improve tracks' relative path handling even for non standard playlists, therefore improving their loading time too.

### Added
- Relative Paths: new menu entry for playlists which allows to convert (force) all paths to relative paths, stripping all but filenames. i.e. the tracks are expected at the same Dir the playlist resides in. Meant to be used after tracks conversion, exporting, etc.

- Exporting Playlists: new menu entries for playlist exporting, allowing to just copy the playlist file, the playlist file along its tracks (thus converting the paths to relative paths too) or the playlist file plus the tracks converted using DSP presets. The latter option is configurable on the header menu at top 'Export and convert...'. Meant to be used for exporting playlists in one step, not having to edit playlists manually after converting files to match the new files... Can also be used as a 'one way sync' utility at servers, portable players, etc.

- Duplicates: New tool to find duplicated items on playlists without loading them (R. Click, 'Check playlists consistency...' menu).
### Changed
- Loading playlists, checking items on library and finding dead items now evaluates relative paths whether they start with .\ or not. Playlists created with the manager always use '.\', but this improves compatibility with playlists created with other software or manually.

- General speed improvements loading playlists, checking items on library and finding dead items.
### Fixed
- Dead items: the menu entry to find dead items on playlists now skips streams (http or https).
- Checking if all items on a playlist are in the library now works as expected when some items -file paths- are duplicated.

Re: Playlist-Manager-SMP

Reply #43
A minor quality of life update.

### Added
- Tooltip & Duplicates: While pressing shift over a playlist, apart from the playlist info, a warning will be given if the current selection is already present on the destination playlist (to avoid adding duplicates). Note Shift + L.Click is the action associated to sending current selection to a playlist file.
### Changed
- Tooltip: Pressing shit, control or both will show on the tooltip the action which will be performed on playlists. If usage info is enabled on tooltips, then only the current action associated to the keys will be shown while pressing them (so it becomes obvious which one is from the list); otherwise -disabled- nothing will be shown until a key is pressed.
- Tooltip: Adjusted max width to 600 px before splitting lines.

Spoiler (click to show/hide)

Re: Playlist-Manager-SMP

Reply #44
Another minor update on repo.

### Added
- Skip duplicates: new option to skip duplicates when adding selected items to a playlist. Checks both, if any of the new items is already on the playlist file and if the current selection contains duplicates. Console log shows when this happen without additional warnings or functionality changes (they are simply skipped). Configuration can be toggled at header menu. Only applies when sending selection directly to a playlist file (does not prevent adding duplicates via auto-save).
### Fixed
- Adding current selection to a playlist file (Shift + L. Click) when it's loaded and it's also the current playlist no longer reinserts tracks, thus duplicating them.

Re: Playlist-Manager-SMP

Reply #45
"It's possible to automatically copy a tag (or more) to another tag when songs are added to library? (something that this old component can do https://hydrogenaud.io/index.php?topic=68139.0 , but it can only accomplish one task, not more)
So, let's say I want to copy the Date tag to another tag, Date2, and Artist tag to Artist2"

"That's already within the manager features. Create an autoplaylist with 'ALL', add auto-tags for tracks where date2 is date, and artist2 is artist. Done. "

@regor , sorry, it seems you have a dumb foobar user here :) I couldn't manage this a few days ago. I followed your advice , I created the autoplaylist with 'ALL', then  Automatically add tags to tracks ..... and then I don't know what to add there in that window that opens

Re: Playlist-Manager-SMP

Reply #46
"It's possible to automatically copy a tag (or more) to another tag when songs are added to library? (something that this old component can do https://hydrogenaud.io/index.php?topic=68139.0 , but it can only accomplish one task, not more)
So, let's say I want to copy the Date tag to another tag, Date2, and Artist tag to Artist2"

"That's already within the manager features. Create an autoplaylist with 'ALL', add auto-tags for tracks where date2 is date, and artist2 is artist. Done. "

@regor , sorry, it seems you have a dumb foobar user here :) I couldn't manage this a few days ago. I followed your advice , I created the autoplaylist with 'ALL', then  Automatically add tags to tracks ..... and then I don't know what to add there in that window that opens
Code: [Select]
[{"date2":"%date%"},{"artist2":"%artist%"}]
As noted, first item (key) is the tag name, second item (value) is the thing you want to add to the tag. You may add an arbitrary value, another tag, TF expression or predefined javascript functions.

Use it first on a standard playlist (set autotag first), then add a test track. After that remove the tags.
Then create an autoplaylist which should only apply to that track (use title as query) and check it works. (read the popups for autoplaylists on config)

Remember to enable Tracks Autotags on config. Note you may switch the functionality for different playlist types. Readmes will appear when clicking. Will add a few examples on the global switch popup and readme on next release.

Btw just uploaded a small bugfix for the feature (using shift + l. click to add tracks to playlist applied auto tag even if it was disabled on config), just in case you notice that... it's already fixed.

Re: Playlist-Manager-SMP

Reply #47
Thanks, that was easy, I was thinking about something else, about that example with add date added to playlist :  [{"addedDate":"JS:todayDate"},{"Playlist Name"}] , haha
It worked , I added a few songs to library and it adds the tags but when I made a final attempt, I have this error and it's the same even if I reload the script or restart foobar ( I tried on a test configuration , so no problem for me) :

Error: Spider Monkey Panel v1.5.2 (Playlist Manager: Playlist Manager v0.2 by XXX)
UpdateFileInfoFromJSON failed:
Invalid JSON info: mismatched with handle count

File: playlist_manager_list.js
Line: 585, Column: 14
Stack trace:
  _list/this.updateTrackTags@playlist_manager_list.js:585:14
  _list/this.updateTags@playlist_manager_list.js:622:10
  _list/this.update/<@playlist_manager_list.js:987:15
  _list/this.update@playlist_manager_list.js:976:10
  _list/this.init@playlist_manager_list.js:1569:8
  _list@playlist_manager_list.js:1643:7
  @playlist_manager.js:78:12

This is from console :

Playlist manager: reading from files
Playlist Manager: Auto-tagging enabled, retrieving tags for new tracks...
Playlist Manager: Auto-tagging tracks...
foo_spider_monkey_panel:
Error: Spider Monkey Panel v1.5.2 (Playlist Manager: Playlist Manager v0.2 by XXX)
UpdateFileInfoFromJSON failed:
Invalid JSON info: mismatched with handle count

File: playlist_manager_list.js
Line: 585, Column: 14
Stack trace:
  _list/this.updateTrackTags@playlist_manager_list.js:585:14
  _list/this.updateTags@playlist_manager_list.js:622:10
  _list/this.update/<@playlist_manager_list.js:987:15
  _list/this.update@playlist_manager_list.js:976:10
  _list/this.init@playlist_manager_list.js:1569:8
  _list@playlist_manager_list.js:1643:7
  @playlist_manager.js:78:12


I'm not sure 100%, but I think this error appeared after I removed a song from the library. I made a autoplaylist ALL , with all the songs from the library, and aplied your query [{"date2":"%date%"},{"artist2":"%artist%"}]

Edit : it seems it happens when I enable Autoplaylists (at start up)  : Tracks Autotag and actions - Automatically tag added tracks on - Autoplaylists (at start up)

Re: Playlist-Manager-SMP

Reply #48
Thing is I can not reproduce your problem with a query which checks an specific title. Have not tried with all. It may be that updateJSON tries to save tags to a non existing file because your database has not been refreshed yet after deleting the file, although testing that I found no problems.

If you add this code at line 585 (at playlist_manager_list.js) it should avoid a possible crash in some situations (in particular the error you got). Although files not being present requires more checks.
Code: [Select]
		if (handleList.Count !== tagsArr.length) {console.log('Auto tagging failed due to size mismatch between handle list and tags array'); return;}
X

In any case this only "skips" the problem, I have to found why you got a list of tracks different to the list of tags to be applied.

EDIT: I think I know what the problem is. Wait for another fix.

Re: Playlist-Manager-SMP

Reply #49
Added a fix on repo to what I think is the source of the problem. Try it and tell me if it solves it. The crash in any case should be gone with the safeguard I wrote before (which is also included).

Alternatively just download this file. -EDIT  see below-