[PLUGIN] SmartQueue

You’re aware there is no longer a .cargo folder with V1.1.5, but blissify is stored in /home/volumio/blissify?

You don’t have to work on it, I am just reporting issues.

Also with my own compiled Blissify, the error remains.

Yes sorry

No problem, i’m just sharing my thought, I hope you’ll continue to report as you’re one of my best reporter :upside_down_face::rofl:

Ok thank you, At this point, the only next move i see could be to harden permission/ownership/privilege of files/folder/processes but I definitely don’t understand why, on two freshly reseted device, behavior could be this different ! (and it’s important for me to understand before any fixing attempt).
I wish some @volumio @nerd @balbuze could support and give direction with their great experience :hugs:

@volumio , @nerd and @balbuze,

To avoid you need to read 122 comments, this one sums it all.

The problem left on the rPi4 is running below command from within the plugin. it fails on permission errors. Can’t sudo it from the plugin as it will start complaining on passkey…
/usr/bin/pgrep python3 | xargs -r /bin/kill -15

which must become, but the kill is problematic.:
/usr/bin/pgrep -f /smartqueue.*py | xargs -r /bin/kill -15

Technically speaking:

Signal 15 is a request to the program to terminate. If the program has a signal handler for SIGTERM that does not actually terminate the application, this kill may have no effect. This is the default signal sent by kill.

Is the signal 15 valid here?

/usr/bin/pgrep python3 | xargs -r /bin/kill -15 works BUT Wheaten already signify me that this command would be problematic because not sufficiently discriminating regarding python3 processes
I’ve work on it and replaced it in upcoming release by a proper /usr/bin/pkill - f /unit/core*.*py that do execatly what my logic want

I believe the main problem is elsewhere, i.e on fresh install

  1. On wheaten rpi 4, command
    /usr/bin/python3 /data/plugins/user_interface/smartqueue/unit/corechooser.py only pass manually if sudo before (while sudo not mandatory on primo/rpi3,x86 with original script)

  2. After that, On wheaten rpi 4, when script finally pass with sudo
    PermissionError: [Errno 13] Permission denied: ‘/home/volumio/bliss.m3u’, but this is logical since he changes proprietary by passing command 1) with sudo

So the main question is: why 1) specifically on rpi4 ??

It’s partial working now, by modifying corechooser.py, removing all entries of:
/usr/bin/pgrep python3 | xargs -r /bin/kill -15

Which only causing issues when hitting the save, as it spawns identical processes.

thx for this, hope upcoming “pkill” version will work on every machine

and also modified bliss.py
replaced:

--seed-song

with:

--seed-song 30

As I got in a Prince loop. 2 Tracks is OK, but 90% were tracks from Prince. Modifying the value seems to do the trick.
Before you ask:

Ok, Ok

I am going to fast.
Prince is 32 Albums, so when Bob Marley (82 Albums) makes the cut…
Let’s first get the right sorted out. :wink:

I was off topic, need to evaluate this --seed-song 30, maybe another parameter to play with

Can’t find any logic on what the 30 means, but so far no repeating artists. I am keeping it in.

At least at this point, the plugin does what I expect from it and why I want it :slight_smile:

Only hope when Beta starts, we get more users providing their feedback.

Rights issue is not only bound to the rPi4, also to the Motivo (CM4)

Error executing corechooser.py: Command failed: /usr/bin/python3 /data/plugins/user_interface/smartqueue/unit/corechooser.py
kill: (1115): Operation not permitted
kill: (17605): Operation not permitted

Ok I had to verify and I can confirm that --seed-song 30 is equivalent to

Confusing matter.
In your code the value is passed via tracksn, if I am correct, but adding --seed-song 30 seems to have a more variety in the generated tracks, even though the value for tracksn is set to 5 (which is also the amount of tracks added).
Well if if the release is stable, you already mentioned to make it more diverse by code.

I believe you but how do you change command to get --seed-song 30 and only 5 tracks added ?
do you replace str(tracksn) by 30 … or add 30 somewhere else ?
[“/home/volumio/blissify/blissify”, “playlist”, “–distance”, “cosine”, “–seed-song”, “str(tracksn)”, “–dry-run”],
Pelochon-street site is not clear regarding this and I didn’t find relevant examples for the moment
I may ask him

Just in the file bliss.py:
original:

["/home/volumio/blissify/blissify", "playlist", "--distance", "cosine", "--seed-song 30", str(tracksn), "--dry-run"],
["/home/volumio/blissify/blissify", "playlist" ,"--seed-song", str(tracksn), "--dry-run"],

changed:

["/home/volumio/blissify/blissify", "playlist", "--distance", "cosine", "--seed-song", str(tracksn), "--dry-run"],
["/home/volumio/blissify/blissify", "playlist" ,"--seed-song 30", str(tracksn), "--dry-run"],

But it seems the setting limits the returned lines:

First 3 runs are mostly not that random

hi,
–seed-song 30 is in place, at least it works
Still need to find the most reliable way to kill nomoreusefull program/script, I’m facing issues using pkill…

One important thing, this is not a randomization plugin, this is a similar mood plugin to smoothen play list, we want to avoid track repetition but if the nicest thing to play after Bob track 100 is Bob track 208, let’s do it (at my sense)

Thus said, a “don’t repeat artist before x track” option could be easily implemented later

Hi, @Wheaten, I may need you confirm it works the same by your side as on my primo and rpi3
Thx by advance

Unfortunately,

Will be on holiday till mid September. No testing until my return.
I won’t travel with my NAS :wink: