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

ListenBrainz-SMP


An implementation of ListenBrainz for foobar2000 using Spider Monkey Panel, which allows to retrieve/set feedback for tracks within foobar2000 library and create playlists based on user or site-wide recommendations statistics.



Features
  • Love/Hate tracks. Or clear any feedback set.
  • Find loved/hated tracks from server on library. (*)
  • Create playlist fron Top Listens, either by user or site-wide. (*)
  • Create playlist based on user's recommedations: 'Top artist', 'Similar artist', 'Raw recommendations'.(*)
  • Non-found tracks on library can be replaced with YouTube links (requires foo_youtube).
  • Requires an user token.

(*) Involves content resolution by Artist, Title or Recording MBID. Displays found matches.

To send listens on playback
Listens syncing is not managed by this script. It's recommended to use foo_listenbrainz2.

Compatible with (toolbar)
  • Search-by-Distance-SMP: creates intelligent "spotify-like" playlist using high-level data from tracks and computing their similarity using genres/styles.
  • Playlist-Tools-SMP: Offers different pre-defefined examples for intelligent playlist creation.
  • Device-Priority-SMP: Automatic output device selection.



Installation
See _TIPS and INSTALLATION (txt) and the Wiki. Not properly following the installation instructions will result in scripts not working as intended. Please don't report errors before checking this.

Download latest release (or nightly releases) at github:
https://github.com/regorxxx/ListenBrainz-SMP

Re: ListenBrainz-SMP

Reply #1
https://github.com/regorxxx/ListenBrainz-SMP/releases/tag/v1.0.0-beta.10

Quote
[1.0.0-beta.10] - 2023-06-27
Added

    Feedback: love/hate feedback can now be saved as tags (in addition to the online syncing). Tag is configurable; 'FEEDBACK' by default.
    Playlists Recommendations: added Playlists recommendations for the user associated to the token (found at https://listenbrainz.org/user/[USERNAME]/recommendations/). For ex. Daily Jams, Top Discoveries of [YEAR], Top Missed Recordings of [YEAR], ... Automatically refreshed every 30 min or after clicking on the button (list is refreshed the next time the menu is opened).
    Playlists Recommendations: daily jams are automatically enabled when the user sets the token, token is retrieved from other panels or by using a new menu entry at Playlists recommendations submenu. It's done by following 'troi-bot' user. Must only be done once. This playlist is just a mix of music already listened to.
    Playlists Recommendations: added setting to only find matches by MBID. Greatly speedups the process of searching matches in library.
    Similar users: recommendations by similar users. A mix from the ones available at 'User recommendations' is chosen for a random similar user. Meant to discover similar music to the one you like.
    Track Recommendations: added entries to find similar artists or recordings to the focused track's artist. Also by multiple tags and folksonomy. Tracks output are preferred by higher rating and not live tracks (if possible). Delete '[foobar_profile]\js_data\presets\global\globQuery.json' and '[foobar_profile]\foobar2000\js_data\presets\global\globTags.json' files after installation.
    Track Recommendations: supports -full- tag retrieval from WilB's Biography script. i.e. genres, styles, locale tags, etc. are added to the file tags on the submenus as available values. Bio tags state is displayed at tooltip, warning when tags are not found (usually requires some seconds).
    Track Recommendations: supports 'locale' tag retrieval from World-Map-SMP, independently of Bio panel. i.e. it looks at the local database for matches by artist (so it works even for artists not found by Bio panel, multi-value artists tags and artists manually tagged by user on the panel). Bio and World Map tag retrieval can coexist, duplicates are removed in any case.
    Track Recommendations: supports 'LASTFM_SIMILAR_ARTIST' tag retrieval from foo_uie_biography, independently of Bio panel. Bio and foo_uie_biography tag retrieval can coexist, duplicates are removed in any case.
    Track Recommendations: supports 'SIMILAR ARTISTS SEARCHBYDISTANCE' tag retrieval from Search by Distance-SMP, independently of Bio panel. Duplicates are removed in any case when merged with other similar artists tags. This tag must be pre-calculated, since it's retrieved from files or database, and its based on similar artists from your library (instead of charts/popularity/other people's listening habits).
    Forced query: added forced query to pre-filter library for all lookups. Greatly speedups the process of searching matches in library.

Changed

    YouTube: YouTube searches are now cached (during the same session). i.e. matches are found much faster for tracks already searched.
    YouTube: YouTube searches now have 'MUSICBRAINZ_TRACKID', 'MUSICBRAINZ_ALBUMARTISTID', and 'MUSICBRAINZ_ARTISTID' tags if available.
    Feedback: report will also compare online values against the file tags (if available) and show total number of loved, hated and mismatched tracks.
    Feedback: retrieving loved/hated tracks from library will also output library tagged tracks (if available), without duplicates by MBID.
    Feedback: menu entries will be disabled when selection count is higher than the API recommendations.
    Feedback: in case sending feedback to server fails (usually due to rate limits), connection will be retried once a few ms later. Any error will be reported via console/popups.
    Feedback: only updates tracks on server if the current feedback differs, this way the timestamp does not get changed.
    Feedback: improvements when handling tracks without MBIDs.
    Feedback: when network is not available, feedback will be cached and send later -every 10 min- during the same session or on future sessions.
    Playlists: matches on library -for playlist creation- are now preferred by higher rating and not live tracks (if possible).
    Playlists: optimizations finding tracks on library.
    Playlists: standardized playlists names, similar to playlist created by Last.fm-SMP.
    Remove duplicates: when removing duplicates, tracks left for comparison are now preferred by default higher rating and not live tracks. Delete '[foobar_profile]\js_data\presets\global\globQuery.json' and '[foobar_profile]\foobar2000\js_data\presets\global\globTags.json' files after installation.
    ListenBrainz: key for the token is cached during the same session.
    ListenBrainz: user name is cached during same session.
    ListenBrainz: updated getFeedback method (with POST), without limits on data size.
    UI: all reports are now formatted as tabulated tables, making them easier to read.
    UI: tooltip now reports if user playlists recommendations are available and feedback for the selected track.
    UI: button is now animated during all asynchronous tasks (including daily jams retrieval).

Removed
Fixed

    Feedback: retrieval of tracks with feedback on server was incomplete due to API limits of number of items get per request. Now requests are paginated, untill all results are get.
    ListenBrainz: Lookup for missing MBIDs setting was not honored (always active).
    YouTube: rare errors parsing some titles/artists on YouTube.
    UI: tooltip flickering while pressing Shift/Ctrl over a button in icon-only mode.


Re: ListenBrainz-SMP

Reply #3
This was requested some time ago.
Next version will have customizable tag remap for the 'track recommendations' submenu (in fact the entire entry list is customizable), along a new recommendation mode.

Re: ListenBrainz-SMP

Reply #4
https://github.com/regorxxx/ListenBrainz-SMP/releases/tag/v1.1.0
Quote
[1.1.0] - 2023-10-05
Added

    Track Recommendations: tag remapping is now available (configuration) along customizable entries (advanced configuration) for 'Tracks recommendations'.
    Track Recommendations: new submenu at 'Tracks recommendations to get popular tracks by the chosen similar artist, like the one found at Last.fm tools.

Changed

    Configuration: expanded user configurable files at '[FOOBAR PROFILE FOLDER]\js_data\presets\global' with new queries. File will be automatically updated with new values (maintaining the user settings).
    Configuration: improved the user configurable files update check for missing keys.

Removed
Fixed

 

Re: ListenBrainz-SMP

Reply #5
v1.2.0 - Auto-update + toolbar customization
https://github.com/regorxxx/ListenBrainz-SMP/releases/tag/v1.2.0

Quote
## [1.2.0] - 2023-11-15
### Added
- Auto-update: added -optional- automatic checks for updates on script load; enabled by default. Compares version of current file against GitHub repository. Manual checking can also be found at the settings menu. For buttons within the toolbar every button will check for updates independently (although the toolbar menu has an entry for batch checking). Setting may also be globally switched at '[FOOBAR PROFILE FOLDER]\js_data\presets\global\globSettings.json', by changing 'bAutoUpdateCheck'. It will apply by default to any new installed script (previous scripts will still need to be manually configured to change them).
- Buttons bar: added some safe-checks to panel properties.
- Buttons bar: added custom button hover color and customization.
- Buttons bar: added custom offset for buttons along X/Y axis.
- Buttons bar: added full size mode for buttons, which will use full Width/Height according to Y/X orientation.
- Added setting to disable popups related to features not being supported by the OS (at startup). Found at '[FOOBAR PROFILE FOLDER]\js_data\presets\global\globSettings.json', by changing 'bPopupOnCheckSOFeatures'. By default popups are always shown. This setting will never be exposed within foobar, only at this file.
### Changed
- Configuration: improved user retrieval on mouse over button, limited to run once per 2500 ms.
- UI: toolbar's color menu entries now show the color name along the menu entry. 'none' equals to no color.
- Buttons bar: renamed background buttons to 'Use themed buttons', which depends on the windows theme.
- Helpers: updated helpers.
### Removed
- Configuration: unnecessary logging on mouse over button if no user was provided.
### Fixed
- Feedback: minor fix to cache reports when an upload throws an error.
- Crash without lastfm tools button also loaded.

Spoiler (click to show/hide)

Re: ListenBrainz-SMP

Reply #6
I found some minor cosmetic bug with the icon of the button in the latest github.

Default

X

Unchecking themed buttons

X

Changing the font color

X


Re: ListenBrainz-SMP

Reply #7
I found some minor cosmetic bug with the icon of the button in the latest github.

Default

[attach type=image]29075[/attach]

Unchecking themed buttons

[attach type=image]29077[/attach]

Changing the font color

[attach type=image]29079[/attach]


Can not reproduce it. In fact the icon (which is an image) adopts the font color using a mask.

Are you using dark mode? Which files do you have at 'images\icons\'?

Re: ListenBrainz-SMP

Reply #8

Can not reproduce it. In fact the icon (which is an image) adopts the font color using a mask.

Are you using dark mode? Which files do you have at 'images\icons\'?

Enable dark of light mode doesn't have any effect with the preview version of foobar2000. It says not supported. But anyway with this problem the xxx-folder that i had previously show the icon fine.

The folder

X

the old one is different

X



Re: ListenBrainz-SMP

Reply #10
So now works fine? The mask file is the one needed, if it was missing it didn't work properly.

the _old is the install that i had before this testing, the _new is with the last github zips. I rename the one to use in every scenario

Using the old prefix
X
X
X

With the last downloaded when we start testing wrapped

X
X
X

The _old only have 3 icon, no masks
The _new 5 icons.

The _new show the glitch, the _old works

Re: ListenBrainz-SMP

Reply #11
The old one uses a mask and the new one doesn't. There is no more difference.

Please create a new toolbar panel, add just that single button, send me a gif with the steps to reproduce the bug and a screenshot of the properties of the panel from 01 to 21.

Re: ListenBrainz-SMP

Reply #12
All brand new, remove panels, close program, delete js_data, xxx-scripts folder. Download new set of zips.

Add a buttons panel, add the buttons and uncheck themed buttons.

X

X

Setting text color to white

X



Re: ListenBrainz-SMP

Reply #14
Your entire theme is dark, are you using dark mode?

Nope, It is custom colors set in winecfg. Don't know why, but with the previews, the dark theme doesn't work in foobar.

Code: [Select]
[Control Panel\\Colors] 1708446086
#time=1da6418da379190
"ActiveBorder"="0 128 255"
"ActiveTitle"="41 45 56"
"AppWorkSpace"="34 37 40"
"Background"="21 83 158"
"ButtonAlternateFace"="34 37 40"
"ButtonDkShadow"="41 45 50"
"ButtonFace"="41 45 50"
"ButtonHilight"="100 100 100"
"ButtonLight"="41 45 50"
"ButtonShadow"="100 100 100"
"ButtonText"="255 255 255"
"GradientActiveTitle"="41 45 56"
"GradientInactiveTitle"="53 53 53"
"GrayText"="160 160 160"
"Hilight"="25 83 167"
"HilightText"="255 255 255"
"HotTrackingColor"="25 83 167"
"InactiveBorder"="100 100 100"
"InactiveTitle"="53 53 53"
"InactiveTitleText"="128 128 128"
"InfoText"="255 255 255"
"InfoWindow"="0 0 0"
"Menu"="41 45 50"
"MenuBar"="34 37 40"
"MenuHilight"="41 45 50"
"MenuText"="255 255 255"
"Scrollbar"="34 37 40"
"TitleText"="207 207 207"
"Window"="34 37 40"
"WindowFrame"="100 100 100"
"WindowText"="255 255 255"


Re: ListenBrainz-SMP

Reply #16
X

X

X

X

Re: ListenBrainz-SMP

Reply #17
xd Following the same steps than you, it works perfectly fine.

It's either a wine thing, or the winecfg settings affect the mask in some way. Have zero idea what's going on.

Try enabling pseudo-transparency, or setting the bar color to the same color than the wincfg.

Re: ListenBrainz-SMP

Reply #18
xd Following the same steps than you, it works perfectly fine.

It's either a wine thing, or the winecfg settings affect the mask in some way. Have zero idea what's going on.

Try enabling pseudo-transparency, or setting the bar color to the same color than the wincfg.

Nah, no luck. the weird thing is with the same setting and the backup xxx-script the icon look fine and also the others. But anyway, I set the buttons to themed and reacy.

Well, only setting themed and changing the text color I get this

X

Only after reset looks fine

X

My system really dislikes that icon XD

Re: ListenBrainz-SMP

Reply #19
xd Following the same steps than you, it works perfectly fine.

It's either a wine thing, or the winecfg settings affect the mask in some way. Have zero idea what's going on.

Try enabling pseudo-transparency, or setting the bar color to the same color than the wincfg.

Nah, no luck. the weird thing is with the same setting and the backup xxx-script the icon look fine and also the others. But anyway, I set the buttons to themed and reacy.

Well, only setting themed and changing the text color I get this

[attach type=image]29186[/attach]

Only after reset looks fine

[attach type=image]29188[/attach]

My system really dislikes that icon XD
Maybe that's the thing. A png file not compatible with your wine system (?)

I can create a test script, with only the png file and painting it on a blank panel to check what's going on. If it's just a matter of the png file, then maybe it can be solved.
Old versions uses just the icon without mask, but it was only black and could not use the font color.

Re: ListenBrainz-SMP

Reply #20

Maybe that's the thing. A png file not compatible with your wine system (?)

I can create a test script, with only the png file and painting it on a blank panel to check what's going on. If it's just a matter of the png file, then maybe it can be solved.

Could be worthy if you changed the icon recently.

These are the ones that I get in the backup. The ones that display fine.

Nah, I overwrite them without sucess, must be the mask

Re: ListenBrainz-SMP

Reply #21
Overwriting does nothing, since now a mask is always applied.

Put this script at xxx-script and load it on a panel. Send me an screenshot.

The first one should be white (on a white background it can not bee seen), the second one black, the third one green and the last one is no mask. If any of those fail, then it's a wine thing.

Re: ListenBrainz-SMP

Reply #22
Overwriting does nothing, since now a mask is always applied.

Put this script at xxx-script and load it on a panel. Send me an screenshot.

The firt one should be white (on a white background it can not bee seen), the second one black, the third one green and the last one is no mask. If any of those fail, then it's a wine thing.

It crashes
Code: [Select]
Error: Spider Monkey Panel v1.6.1-mod ({2B889C02-D8C6-4B4D-801F-C8A3512F38FF})
iconMask is null

File: png mask.js
Line: 13, Column: 3
Stack trace:
  @png mask.js:13:3
  fireEvents/</<@callbacks_xxx.js:149:37
  fireEvents/<@callbacks_xxx.js:145:30


Re: ListenBrainz-SMP

Reply #24
Are you installing it on the folder with the listenbrainz files? Obviously with the original png files.

yep. in xxx-scripts\png mask.js

but didn't close and open foobar because is downloading the last.fm data with foo_enhanced_playcount.

could be this?