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-Tools-SMP (Read 121512 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Playlist-Tools-SMP

Reply #450
From here: https://hydrogenaud.io/index.php/topic,120979.msg1055396.html#msg1055396

Quote
I ran into errors with the script files not being found and had to use _switchPaths as per the flow chart on github. Can't say if that would have anything to do with the font not being found as the error does thow the absolute path, but I thought I'd mention it anyway.
I think all errors point to a general installation problem. Problems with paths were not present on last SMP releases, or it was supposed to be solved. But if you really followed the instructions and SMP gives errors, then you have to use the switchPaths hack.

I have looked at it and it's a bit outdated. Replace the old bat file with the new one. It's updated will all the current file structure. If that was the problem, then that should fix everything. Don't forget to install everything again, since the bat hack is not reversible. You have to install files again (overwrite old ones) and then reapply the [new] bat file (there is no need to touch anything within foobar, neither reinstall panels).

(Note this only applies to these collection of scripts related to a toolbar, all others have packages which may be installed directly.)

Lets see if that makes the font work too.

Quote
The other issue is that "search top tracks from date" won't return any results. It creates a playlist but the playlist is empty. Changing the year and/or the filter query in the button's settings doesn't make a difference. I tried "search top tracks" to compare and that one is working fine and its results are correct. Not sure how to start figuring this one out.
Note the installation is probably wrong. But in case it was right, I expect you read the popup the first time you installed the button. There are requisites for it to work (2 components). Let me know if you have not them installed, since the script should show a warn when they are missing (to be sure that part works).

EDIT: Also please report the current installation path, SMP version (or JSplitter), OS, etc. so I can find why in your particular system relative paths don't work, since they work fine for most people.

Re: Playlist-Tools-SMP

Reply #451
I ran into errors with the script files not being found and had to use _switchPaths as per the flow chart on github. Can't say if that would have anything to do with the font not being found as the error does thow the absolute path, but I thought I'd mention it anyway.
@fr0y0  This reminds me of an old mistake I made: when setting up the script in this window, the script source must be "File". It should NOT be "In-memory" by copying and pasting the whole script into the SMP (or JSplitter) panel script editor.

X

Maybe you'll find some help in the wiki? (if you haven't seen it yet)

Re: Playlist-Tools-SMP

Reply #452
I got everything working. Thank you again for the assitance!

In the end it was a mix of everything. For some reason the font took a whole system restart to work after I opened the .ttf and installed it a second time. Then foo_enhanced_playcount, which I had already installed during my first attempt to get the scripts to work, needed some further convincing to pull my scrobbles from last.fm. I noticed this after realizing that the component simply being present might not be enough as the "top 25 date" script probably needs more specific data, which then also explains why the date-less "top 25" worked fine as it (probably) only needs regular old foo_playcount data.

Re: Playlist-Tools-SMP

Reply #453
I never thought someone would use in memory, will add that on the wiki just to be sure.

@fr0y0
I don't use last.fm so I could not help with that, glad you find the problem. And yep, fonts sometimes require a system restart.

I think I can add an additional check for cases like that, where the component retrieves zero listens, which usually indicates something is wrong.

Did you finally install the script with the switch paths bat or it worked fine without that?

Re: Playlist-Tools-SMP

Reply #454
Hello again regor, I am not sure exactly if Smart Shuffle works like this but when quering results based on two different queries does it first group both the queries and runs a smart shuffle on them (ex. query 1 + query 2 -> smart shuffle) then group and insert it into the playlist or query 1 -> smart shuffle + query 2 -> smart shuffle and at last groups them and insert?

Re: Playlist-Tools-SMP

Reply #455
Sorry, didn't see the post.

I suppose you are talking about pools (?), so you are asking me if the sorting is applied after all groups are inserted or per group, don't you?

It should work this way:
query 1 -> picking method
query 2  -> picking method
...
-> insert method-> sorting method

Note none of the default presets use Smart Shuffle as sorting, except those at "Genre mixes". Maybe that's your "error", you were expecting something which was not used. You can edit the presets to use it though. The default presets may be found at:
\xxx-scripts\presets\Playlist Tools\pools\default.json (editing it will NOT edit the presets within foobar, use the menus for that)

In any case you may use 'Selection Manipulation\Shuffle by tags\Shuffle by artist' to do it afterwards. As far as I have seen it has been working fine on my side al this time (both the standalone feature and its usage within pools if it was enabled). Only thing "missing" right now is handling multi-value artist, to not repeat any of the single artists if possible (instead of joining them as a single value).

Re: Playlist-Tools-SMP

Reply #456
Yeah I was talking about pools, was referring to the script which you provided for my need.
Code: [Select]
{
"readme": "Adds Least Recently Played (LRP) and Lowest Play Count (LPC) tracks.",
"pools": [{
"name": "sep"
},
{
"name": "LRP + LPC",
"pool": {
"fromPls": {
"_LIBRARY_0": 15,
"_LIBRARY_1": 15
},
"query": {
"_LIBRARY_0": "%jsp3_loved% IS 1 AND NOT %jsp3_last_played% DURING LAST 3 DAYS SORT ASCENDING BY %jsp3_last_played%",
"_LIBRARY_1": "%jsp3_loved% IS 1 AND NOT %jsp3_last_played% DURING LAST 3 DAYS SORT ASCENDING BY %jsp3_playcount%"
},
"toPls": "LRP + LPC",
"pickMethod": {
"_LIBRARY_0": "start",
"_LIBRARY_1": "start"
},
"smartShuffle": "ALBUM ARTIST"
}
}]
}

I wanted to know if the shuffling happened after it queries for both _LIBRARY_0 and _LIBRARY_1 or shuffle _LIBRARY_0 then shuffle _LIBRARY_1.

I guess a small diagram explaining my question,
Code: [Select]
shuffle(_LIBRARY_0 + _LIBRARY_1) = LRP + LPC
or
Code: [Select]
shuffle(_LIBRARY_0) + shuffle( _LIBRARY_1) = LRP + LPC

Because if it's the latter I think there might be some duplicates and I would have to resort to manually shuffling afterwards like you had mentioned.

Re: Playlist-Tools-SMP

Reply #457
Yes, it first applies the queries, and sorting is the last step, for ALL joined tracks, as explained above.

Duplicates are already removed when joining the "pools", by TF and exact same file. That's tweaked at 'configuration\duplicates handling'.

Re: Playlist-Tools-SMP

Reply #458
Uploaded to nightly a new button, following this thread:

I did not bother to implement it as a standalone panel (because it would require more work and be useless for me), but created a button script compatible with all my buttons bar scripts, which does the same.
  • Speaker button mutes/unmutes volume.
  • -/+ buttons apply volume down/up, either by single click or pressing for some time.
  • Right button displays the current volume in integer numbers from 0 to 100. Clicking on it allows to input any [integer] value between 0 and 100.

Note the volume bar at top is logarithmic.

 X

I'm also thinking about creating some kind of "display" button which could be added to toolbars to display arbitrary text or TF, similar to the volume display.


Re: Playlist-Tools-SMP

Reply #459
Yes, it first applies the queries, and sorting is the last step, for ALL joined tracks, as explained above.

Duplicates are already removed when joining the "pools", by TF and exact same file. That's tweaked at 'configuration\duplicates handling'.

Lastly, I had just stumbled upon deDuplicate key, any idea if it would further help in removing duplicates or is it something redundant?

Re: Playlist-Tools-SMP

Reply #460
Yes, it first applies the queries, and sorting is the last step, for ALL joined tracks, as explained above.

Duplicates are already removed when joining the "pools", by TF and exact same file. That's tweaked at 'configuration\duplicates handling'.

Lastly, I had just stumbled upon deDuplicate key, any idea if it would further help in removing duplicates or is it something redundant?
That depends on what you call "duplicates". You can set any TF for that key, so for instance, it's possible to have specific sources deduplicated by such TF and then globally by the setting mentioned at top. It's totally redundant if you just want to filter "real" duplicates. Anyway, "real" duplicates are only possible on libraries which contain multiple versions of the same albums, live versions, compilations, etc.  (which is my case). Most people will probably not even care about that.

For ex.

Source 1 -> RATING > 3 -> Deduplicated by artist (so only one track per artist would be available)
Source 2 -> RATING > 5 -> Deduplicated by year (so only one track per year would be available)
-> merge sources -> global setting -> Deduplicated by artist|title|year (so no different versions of same track are output twice)

Note for me: add these replies to the docs to document how every key works

Re: Playlist-Tools-SMP

Reply #461
That depends on what you call "duplicates". You can set any TF for that key, so for instance, it's possible to have specific sources deduplicated by such TF and then globally by the setting mentioned at top. It's totally redundant if you just want to filter "real" duplicates. Anyway, "real" duplicates are only possible on libraries which contain multiple versions of the same albums, live versions, compilations, etc.  (which is my case). Most people will probably not even care about that.

For ex.

Source 1 -> RATING > 3 -> Deduplicated by artist (so only one track per artist would be available)
Source 2 -> RATING > 5 -> Deduplicated by year (so only one track per year would be available)
-> merge sources -> global setting -> Deduplicated by artist|title|year (so no different versions of same track are output twice)

Note for me: add these replies to the docs to document how every key works

Currently, I have smartShuffle set to album artist and deDuplicate to album artist as well, is this redundant in this scenario or no?

Re: Playlist-Tools-SMP

Reply #462
It depends on the source settings. If you have a single source, obviously yes. Otherwise, there may be more than 1 track per artist, therefore not being redundant.

I can keep replying, but... why don't you just test it by yourself; I mean, only you can test if things work the way you want.

Re: Playlist-Tools-SMP

Reply #463
It depends on the source settings. If you have a single source, obviously yes. Otherwise, there may be more than 1 track per artist, therefore not being redundant.

I can keep replying, but... why don't you just test it by yourself; I mean, only you can test if things work the way you want.

Sorry for annoying, it looks like I have figured it out. Basically with SmartShuffle alone there is a chance for the same album to end up in the current playlist, but instead of grouping them it spaces them out evenly enough to prevent repetition based on the TF value.

Having deDuplicate further removes the duplicates present in the playlist that way you only listen to that album artist (set as my TF value) once until the pool query gets called again.

 

Re: Playlist-Tools-SMP

Reply #464
Quote
Sorry for annoying, it looks like I have figured it out. Basically with SmartShuffle alone there is a chance for the same album to end up in the current playlist, but instead of grouping them it spaces them out evenly enough to prevent repetition based on the TF value
Yes. It behaves similar (better) to spotify shuffle. You have a readme for smart shuffle at the configuration submenu btw :)  Note smart shuffle does not deduplicate anything at all. Note you may configure how the shuffle works, so it may be applied by artist, but also by date, or whatever...

Quote
Having deDuplicate further removes the duplicates present in the playlist that way you only listen to that album artist (set as my TF value) once until the pool query gets called again.
Yes. Totally independent to smart shuffle (or any other sorting you use on the pool!).

Let me know if you have more doubts.

Re: Playlist-Tools-SMP

Reply #465
Yes. Totally independent to smart shuffle (or any other sorting you use on the pool!).

Let me know if you have more doubts.

Thanks for clearing my doubts, also I just realised that this global filter seems to be applied. Is there a way to remove it? I feel like something from this filtering is preventing the query to work as intended.
Code: [Select]
(NOT (%RATING% EQUAL 2 OR %RATING% EQUAL 1) AND NOT (STYLE IS live AND NOT STYLE IS hi-fi) AND %CHANNELS% LESS 3 AND NOT COMMENT HAS quad)

For testing this is my pool query.
Code: [Select]
{
  "readme": "Adds Least Recently Played (LRP) and Lowest Play Count (LPC) tracks.",
  "name": "test",
  "pool": {
    "fromPls": {
      "_LIBRARY_0": 9999
    },
    "query": {
      "_LIBRARY_0": "%jsp3_loved% IS 1 SORT ASCENDING BY %jsp3_last_played%"
    },
    "toPls": "LRP + LPC",
    "pickMethod": {
      "_LIBRARY_0": "start"
    }
  }
}

Re: Playlist-Tools-SMP

Reply #466
Configuration\queries\global forced query.

It's there since most people will want to set a global filter for all tools, like that one (in my case *). You can tweak it there or disable it for specific tools. All my other scripts have a similar setting btw.

(*) The default query is meant for people using the official playback stats, so it filters anything rated below 3 starts, with more than 2 channels (for external devices) and live versions.

Re: Playlist-Tools-SMP

Reply #467
Configuration\queries\global forced query.

It's there since most people will want to set a global filter for all tools, like that one (in my case *). You can tweak it there or disable it for specific tools. All my other scripts have a similar setting btw.

(*) The default query is meant for people using the official playback stats, so it filters anything rated below 3 starts, with more than 2 channels (for external devices) and live versions.

Thanks a lot! I just disabled the global query for the pool tool, and now the query correctly picks up all the tracks. I think I’ll settle with smartShuffle and deDuplicate. SmartShuffle seems to have an issue with spacing out tracks as the playlist gets smaller and might group them together, which makes sense because it doesn't have enough room to space them properly anymore.

Just to confirm again, when using TF value for smartShuffle (with global forced query turned off) and deDuplicate both of them respect the TF value without adding anything more or less to it if I am not wrong? more or less in the sense that they don't influence the decision but instead rely only on the TF value.

Re: Playlist-Tools-SMP

Reply #468
Quote
I think I’ll settle with smartShuffle and deDuplicate. SmartShuffle seems to have an issue with spacing out tracks as the playlist gets smaller and might group them together, which makes sense because it doesn't have enough room to space them properly anymore.
For sure, it can not do magic xd If there is no possibility to avoid having at least some of them together, it will add them that way.

Quote
Just to confirm again, when using TF value for smartShuffle (with global forced query turned off) and deDuplicate both of them respect the TF value without adding anything more or less to it if I am not wrong? more or less in the sense that they don't influence the decision but instead rely only on the TF value.
The global forced query is only "added" to the source query (and any tool which uses queries per your settings), not at any other place and there is nothing more added anywhere else.

Re: Playlist-Tools-SMP

Reply #469
Hello again, it looks like I had just met with an error
Code: [Select]
Error: Spider Monkey Panel v1.6.1 (Playlist Tools: Playlist Tools: Buttons Bar v1.2.0 by regorxxx)
Index is out of bounds

File: pools.js
Line: 145, Column: 5
Stack trace:
  _pools/this.sortBiasReplace/<@pools.js:145:5
  _pools/this.sortBiasReplace@pools.js:143:22
  _pools/this.processPool@pools.js:423:11
  async*func@playlist_tools_menu_pools.js:120:14
  _menu/this.btn_up/<@menu_xxx.js:677:16
  _menu/this.btn_up@menu_xxx.js:667:24
  @main_menu_custom.js:86:15
  fireEvents/</<@callbacks_xxx.js:191:37
  fireEvents/<@callbacks_xxx.js:187:30

whenever I run this pool query I get the above issue.
Code: [Select]
{
  "readme": "Adds Least Recently Played (LRP) and Lowest Play Count (LPC) tracks.",
  "name": "LRP + LPC",
  "pool": {
    "fromPls": {
      "_LIBRARY_0": 15,
      "_LIBRARY_1": 15
    },
    "query": {
      "_LIBRARY_0": "%jsp3_loved% IS 1 AND NOT %jsp3_last_played% DURING LAST 3 DAYS SORT ASCENDING BY %jsp3_last_played%",
      "_LIBRARY_1": "%jsp3_loved% IS 1 AND NOT %jsp3_last_played% DURING LAST 3 DAYS SORT ASCENDING BY %jsp3_playcount%"
    },
    "toPls": "LRP + LPC",
    "pickMethod": {
      "_LIBRARY_0": "start",
      "_LIBRARY_1": "start"
    },
    "smartShuffle": "ALBUM ARTIST",
    "deDuplicate": {
      "_LIBRARY_0": ["ALBUM ARTIST"],
      "_LIBRARY_1": ["ALBUM ARTIST"]
    }
  }
}

the fix is to remove deDuplicate but any idea what could be causing this issue?


Re: Playlist-Tools-SMP

Reply #470
Can't reproduce such problem. I know how to bypass the error, but I would prefer to understand why it fails, since I don't see any error on the code logic.

I need the console log at the crash and whether you are using the latest or nightly release. If it's the former, use the nightly and report again.

Additionally, if it keeps crashing, replace this file:
[...]\scripts\SMP\xxx-scripts\main\pools\pools.js

Has additional console logging, so I will also need the log when crashing.

Will try to test it on another library though and see if I can find the problem by myself.

Re: Playlist-Tools-SMP

Reply #471
Hi

Just a pair of minor bugs with the last nightly

An error in console

Code: [Select]
Playlist Tools: Readme not found
Z:\home\user\.local\bin\foobar2000\profile\scripts\SMP\xxx-scripts\helpers\readme\selection_time.txt

And a graphical glitch
When you put the cursor over the listenbrainz button the following disappear

video

Re: Playlist-Tools-SMP

Reply #472
Thanks for the hints
Quote
An error in console
Fixed. I forgot to upload the readme of the new select by time tool.

Quote
When you put the cursor over the listenbrainz button the following disappear
That's pretty weird. Can not reproduce it.

I think I know the culprit, there was a memory leak on SMP opening the icon image, so I added caching... and it seems I broke another thing as result. Will investigate it. I suppose it was not present on previous releases and nothing has changed on Wine on that regard.

Please share the panel properties of that toolbar

Re: Playlist-Tools-SMP

Reply #473
That's pretty weird. Can not reproduce it.

I think I know the culprit, there was a memory leak on SMP opening the icon image, so I added caching... and it seems I broke another thing as result. Will investigate it. I suppose it was not present on previous releases and nothing has changed on Wine on that regard.

Please share the panel properties of that toolbar

I start to notice after the update and I use it very often. Also I forgot to say you that when click there is no menu.
It is only with listenbrainz, others wok well

Re: Playlist-Tools-SMP

Reply #474
Uhm... that looks like an entirely bugged button and not an error on my side. Try reinstalling it to see if it's fixed. For sure I don't have any of those problems and specially no menu on click can not be related to the thing I said.

BTW with your settings, it works fine on my side.