HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: L3v3L on 2023-02-26 10:19:47

Title: Last-List-SMP
Post by: L3v3L on 2023-02-26 10:19:47
Last List (https://github.com/L3v3L/foo-last-list-smp)

This is a Spider Monkey Panel for foobar2000 that allows you create a playlist from a Last.fm url.
Any tracks not found in your library will be added to the playlist as a youtube link.

Some examples of pages to use the script on:

Required:

Roadmap:

Links:

Title: Re: Last-List-SMP
Post by: regor on 2023-02-26 10:37:59
Great :)

Some questions/suggestions:
- This looks pretty similar to the listenbrainz thing I did, but for last.fm. Does last.fm use Musicbrainz IDs at all? You could match with those too. (not sure if it's relevant to identify different versions of songs)

- You can create a XSPF playlist with the results. That way results are not hardcoded, work on any library and it will always try to match againt library / youtube if possible. (I did something similar for importing Listenbrainz playlists).

- Youtube links are scrapped from last fm or created with a query artist+track? (I would want to implement the second on the listenbrainz version)

- I saw you created it as a button, I could rewrite it to be compatible with my buttons toolbar. It's done in 5 min really, so people can simply add your button to the toolbar instead of creating a whole new panel for the button. (you can easily have both versions at github, since it's just adding a new button file which points to the original one, and people can choose which one to use).

-You can add some kind of query filtering. Like... first try to match non live tracks, if there are no results, then allow live tracks. This is usually preferred in most cases. (it could be user configurable too)

- Matching with regexp.

- Duplications removal (but just saw its on your comments). You can just reuse my code, which does it by TF values.
Title: Re: Last-List-SMP
Post by: L3v3L on 2023-02-26 10:46:43
Great :)

Some questions/suggestions:
- This looks pretty similar to the listenbrainz thing I did, but for last.fm. Does last.fm use Musicbrainz IDs at all? You could match with those too. (not sure if it's relevant to identify different versions of songs)

- You can create a XSPF playlist with the results. That way results are not hardcoded, work on any library and it will always try to match againt library / youtube if possible. (I did something similar for importing Listenbrainz playlists).

- Youtube links are scrapped from last fm or created with a query artist+track? (I would want to implement the second on the listenbrainz version)

- I saw you created it as a button, I could rewrite it to be compatible with my buttons toolbar. It's done in 5 min really, so people can simply add your button to the toolbar instead of creating a whole new panel for the button.

-You can add some kind of query filtering. Like... first try to match non live tracks, if there are no results, then allow live tracks. This is usually preferred in most cases. (it could be user configurable too)

- Matching with regexp.

- Duplications removal (but just saw its on your comments). You can just reuse my code, which does it by TF values.

PM'd you
Title: Re: Last-List-SMP
Post by: L3v3L on 2023-02-26 22:13:11
Updated:
https://github.com/L3v3L/foo-last-list-smp/releases

Title: Re: Last-List-SMP
Post by: L3v3L on 2023-03-01 21:47:49
Updated: (v0.6)
https://github.com/L3v3L/foo-last-list-smp/releases

Title: Re: Last-List-SMP
Post by: L3v3L on 2023-03-03 17:39:43
Updated: (v1.0)
https://github.com/L3v3L/foo-last-list-smp/releases

If you have been holding off updating, this one is the one to get, full of new features.

Some highlights:

Credits to regor for all the help and the helper scripts.
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-03 18:42:09
I got this
Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({BCCA5F42-2417-40A3-96AF-3086324B6C7E}: foo-last-list-smp v1.0 by Ivo Barros)
g_theme is null

File: button.js
Line: 63, Column: 17
Stack trace:
  SimpleButton/this.draw@button.js:63:17
  drawAllButtons@button.js:98:20
  on_paint@button.js:118:5
Title: Re: Last-List-SMP
Post by: L3v3L on 2023-03-03 19:04:05
@paregistrase

are you able to load the sample script that comes with spider monkey panel called:

Code: [Select]
basic\SimpleThemedButton.js
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-03 19:24:58
@paregistrase

are you able to load the sample script that comes with spider monkey panel called:

Code: [Select]
basic\SimpleThemedButton.js
No
Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({BCCA5F42-2417-40A3-96AF-3086324B6C7E}: SimpleThemedButton by T.P Wang)
g_theme is null

File: SimpleThemedButton.js
Line: 52, Column: 17
Stack trace:
  SimpleButton/this.draw@SimpleThemedButton.js:52:17
  drawAllButtons@SimpleThemedButton.js:78:20
  on_paint@SimpleThemedButton.js:94:5

I forgot to said to you that I'm running it with wine-linux.
I remember that I got problems with the buttons in regor's script before and he makes some changes when it load in wine. Don't know if could be same problem.
Title: Re: Last-List-SMP
Post by: Air KEN on 2023-03-04 04:28:51
@paregistrase

Please change  foo_spider_monkey_panel v1.6.1
https://github.com/TheQwertiest/foo_spider_monkey_panel/releases

------
Previous garbled problem. Can you help?
segoe-ui-linux
https://github.com/mrbvrz/segoe-ui-linux
https://github.com/mrbvrz/segoe-ui-linux#how-to-install-it
Title: Re: Last-List-SMP
Post by: marc2k3 on 2023-03-04 04:46:52
Regarding themes, the window.CreateThemeManager in SMP utilises a windows API called OpenThemeData and I'm almost certain I've seen this working on WINE before?? It might be a search term to use if anyone wants to check WINE changelogs/bugs.

edit: seems like the SMP docs are incomplete....

https://theqwertiest.github.io/foo_spider_monkey_panel/assets/generated_files/docs/html/window.html#.CreateThemeManager

It should be documented that the method returns null if it fails. This generally doesn't happen on windows so long as you pass a valid class name and are not using windows 7 classic where theming is completely disabled.

another edit: the theming code is probably unchanged since ye olde WSH panel mod days which supported windows XP. Not really sure why it wouldn't work in WINE??
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-04 05:06:34
@paregistrase

Please change  foo_spider_monkey_panel v1.6.1
https://github.com/TheQwertiest/foo_spider_monkey_panel/releases

------
Previous garbled problem. Can you help?
segoe-ui-linux
https://github.com/mrbvrz/segoe-ui-linux
https://github.com/mrbvrz/segoe-ui-linux#how-to-install-it

Do you have it working with that version?

Edit; I test with v1.6.1, Also fail.

Right now, I'm using
Spider Monkey Panel v1.6.2-dev+7c0928bf by TheQwertiest
Based on JScript Panel by marc2003
Based on WSH Panel Mod by T.P. Wang
Build: 15:49:00, Feb 24 2022

I just want to be sure before  because I lost the archive and right now there is no dev build available to download.

About Segoe UI:

I never used this script.
I just downloaded the font from here (http://windows 10 fonts), Iput it in /home/<user>/.local/share/fonts and rebuild font cache with "fc-cache -f -v"
After that the font can be selected in wine and foobar.
Also you can take a look here (https://hydrogenaud.io/index.php/topic,121786.msg1023231.html#msg1023231) to make Segoe UI fall back to others fonts to display others languages correctly.



Title: Re: Last-List-SMP
Post by: Air KEN on 2023-03-04 05:16:23
v1.6.2: Cannot be used in other scripts.

Wine 7.1/8.0/8.2
Xubuntu, Linux Mint 21.1

> I just want to be sure before  because I lost the archive and right now there is no dev build available to download.
Yes, I know
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-04 05:23:14
v1.6.2: Cannot be used in other scripts.

Wine 7.1/8.0/8.2
Xubuntu, Linux Mint 21.1

> I just want to be sure before  because I lost the archive and right now there is no dev build available to download.
Yes, I know

It also crashes with 1.6,1
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-04 05:29:29
Regarding themes, the window.CreateThemeManager in SMP utilises a windows API called OpenThemeData and I'm almost certain I've seen this working on WINE before?? It might be a search term to use if anyone wants to check WINE changelogs/bugs.

edit: seems like the SMP docs are incomplete....

https://theqwertiest.github.io/foo_spider_monkey_panel/assets/generated_files/docs/html/window.html#.CreateThemeManager

It should be documented that the method returns null if it fails. This generally doesn't happen on windows so long as you pass a valid class name and are not using windows 7 classic where theming is completely disabled.

another edit: the theming code is probably unchanged since ye olde WSH panel mod days which supported windows XP. Not really sure why it wouldn't work in WINE??

No idea. Others samples load. But SimpleThemedButton.js and this script fail.
Title: Re: Last-List-SMP
Post by: regor on 2023-03-04 10:01:05
This is a known problem on Wine, already reported it long time ago. Buttons on Unix must be drawn manually, not using theme manager.
https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/172

Anyone can re-use my buttons helper which does manage Wine fine and replicates the Win theme manage behavior (and improves it with animations, multiple drawing styles, etc.). And yes, it should have been added to the FAQ or docs.

For people using Playlist Tools or any of my other button-scripts,  L3v3L and I have been working together to make it compatible with my toolbar. Will release an update today, and people can just load last-list-smp as a button within my buttons toolbar (compatible on wine). Only requisite is to have the package imported on SMP (not loaded on a panel).

I only reuse their web-scraping file, so some features may differ.
Spoiler (click to show/hide)

EDIT: already uploaded the update.
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-04 14:55:00
This is a known problem on Wine, already reported it long time ago. Buttons on Unix must be drawn manually, not using theme manager.
https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/172
Anyone can re-use my buttons helper which does manage Wine fine and replicates the Win theme manage behavior (and improves it with animations, multiple drawing styles, etc.). And yes, it should have been added to the FAQ or docs.
For people using Playlist Tools or any of my other button-scripts,  L3v3L and I have been working together to make it compatible with my toolbar. Will release an update today, and people can just load last-list-smp as a button within my buttons toolbar (compatible on wine). Only requisite is to have the package imported on SMP (not loaded on a panel).
I only reuse their web-scraping file, so some features may differ.
Spoiler (click to show/hide)
EDIT: already uploaded the update.

Great.
I started to use "ListenBrainz" (importing last.fm and such) and was thinking how convenient will be to have a last.fm button in the same toolbar that do what the Last-list-smp do....
And voilà
(https://i.imgur.com/r6SyMIA.png)
Thanks

Title: Re: Last-List-SMP
Post by: regor on 2023-03-04 16:27:31
Ups, will fix wrong rendering of png icons on black background
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-04 16:37:22
Ups, will fix wrong rendering of png icons on black background

The icon
I didn't even notice. too busy enjoying my new personal radio station  ;D
Title: Re: Last-List-SMP
Post by: L3v3L on 2023-03-06 00:01:01
Updated: (v1.1)
https://github.com/L3v3L/foo-last-list-smp/releases 
please if you like it, star it on github.

Some highlights:
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-06 03:04:02
Still crash as independent panel

Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({F752751E-F30F-4371-A23B-87461CC73B72}: foo-last-list-smp v1.1 by Ivo Barros)
g_theme is null

File: button.js
Line: 63, Column: 17
Stack trace:
  SimpleButton/this.draw@button.js:63:17
  drawAllButtons@button.js:98:20
  on_paint@button.js:118:5
Title: Re: Last-List-SMP
Post by: regor on 2023-03-06 08:18:12
Still crash as independent panel

Code: [Select]
Error: Spider Monkey Panel v1.6.2-dev+7c0928bf ({F752751E-F30F-4371-A23B-87461CC73B72}: foo-last-list-smp v1.1 by Ivo Barros)
g_theme is null

File: button.js
Line: 63, Column: 17
Stack trace:
  SimpleButton/this.draw@button.js:63:17
  drawAllButtons@button.js:98:20
  on_paint@button.js:118:5
(?) Nothing has changed, obviously it will crash forever while using window.CreateThemeManager('Button') activeX on wine, like the button sample on SMP. The fix is on Wine developer's side or SMP providing an alternative.

Just saying, don't expect it to be fixed on new releases XD Unless the SMP sample is sent to the trash and buttons are drawn with 100% SMP code like I did.
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-06 09:03:59

(?) Nothing has changed, obviously it will crash forever while using window.CreateThemeManager('Button') activeX on wine, like the button sample on SMP. The fix is on Wine developer's side or SMP providing an alternative.

Just saying, don't expect it to be fixed on new releases XD Unless the SMP sample is sent to the trash and buttons are drawn with 100% SMP code like I did.
Ok, I understand it wrong. I thought that you will be replacing the button with your code.
Can still use the toolbar button.
Very useful to discover new music easily.
Very addictive too ;)
Title: Re: Last-List-SMP
Post by: regor on 2023-03-06 11:14:55

(?) Nothing has changed, obviously it will crash forever while using window.CreateThemeManager('Button') activeX on wine, like the button sample on SMP. The fix is on Wine developer's side or SMP providing an alternative.

Just saying, don't expect it to be fixed on new releases XD Unless the SMP sample is sent to the trash and buttons are drawn with 100% SMP code like I did.
Ok, I understand it wrong. I thought that you will be replacing the button with your code.
Can still use the toolbar button.
Very useful to discover new music easily.
Very addictive too ;)

Ehm no. I said you can find a wine/toolbar compatible version on my own scripts. (on the last update of Playlist Tools), reusing L3v3l's package.

Apart from that, I offered other developers to use my code for buttons instead of the current SMP samples, but that's up to them.
If you check the thread, there is no indication that would happen at any point. So right now is just a suggestion by my side. I'm not going to replace other developer's code  ;)

Related to the provided SMP samples, it was also issued on June 22, and there has been no answer on a year. There has been zero interest on updating any of the outdated samples provided on SMP since years (or adding new ones), so...
Title: Re: Last-List-SMP
Post by: paregistrase on 2023-03-06 17:52:42

Ehm no. I said you can find a wine/toolbar compatible version on my own scripts. (on the last update of Playlist Tools), reusing L3v3l's package.

Apart from that, I offered other developers to use my code for buttons instead of the current SMP samples, but that's up to them.
If you check the thread, there is no indication that would happen at any point. So right now is just a suggestion by my side. I'm not going to replace other developer's code  ;)

Related to the provided SMP samples, it was also issued on June 22, and there has been no answer on a year. There has been zero interest on updating any of the outdated samples provided on SMP since years (or adding new ones), so...

I get it now, simply a misunderstanding from my part.

Yeah, I look back a bit in previous posts because I started to have a dejá vu feeling. This crash was discussed, the clipboard fails too. You do the new buttons for your scripts, the clipboard function was removed for wine because it crashed. Then someone, could be mark?, do a fix from the clipboard. A dev version of SMP was posted (v1.6.2-dev+7c0928bf ({ECD3EE08-6384-481A-AC50-7FC86600CEFE). With this one, a can use the copy and paste (in v1.6.1 - Hotfix is simply disabled). TheQwertiest said that he was going to release a fix for the hotfix, but then the real life hit him, and he was forced to take a break from the development and this fix never saw the daylight.

A year has passed.....time is fast  ;) Real life is b***h, I hope TheQwertiest could solve his problems (that is the important thing) and will have a new SMP with all pending fixes.

Anyway, I'm very pleased with the current situation, some issues still remain in wine, but overall I can use a lot of thing now that was a no no before.

So I want to send a big thanks to all of you.

Enough sensitivity, I'm hijacking the thread






Title: Re: Last-List-SMP
Post by: L3v3L on 2023-03-06 22:25:19
Updated: (v1.2)
https://github.com/L3v3L/foo-last-list-smp/releases 
please if you like it, star it on github.

Some highlights: