HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: WilB on 2016-10-18 00:29:03

Title: Biography Discussion
Post by: WilB on 2016-10-18 00:29:03
JScript Biography

Requirement: JScript Panel 1.1.0+ (https://github.com/19379/foo-jscript-panel/releases)

Installation:  Add a JScript Panel to the layout in the usual way. Click the JScript panel (or right click and choose configure) to open the editor. Use the tools button to import the script. Always check near to the end of this thread for the latest download link

FEATURES

Fetch and display artist biographies & album reviews from last.fm + allmusic. Optionally show allmusic album rating

Fetch and displays artist photos + display foobar2000 covers

Auto-fetch album covers from last.fm. Default is off (enable in biography.ini.). If enabled, searches when foobar2000 is unable to load a cover according to display\album art\front cover preferences. For the fetched cover to display enter the correct search pattern therein, e.g. for default settings add "cover.*" without the quotes

Compatible with default user interface (DUI) & columns user interface (CUI) 
 
Supports transparency (requires CUI & panel stack splitter or similar)

All-in-one display

Set preferred source order

Simple toggles:

Left button click: switches mode: artist vs album

Middle button click: switches between text or image and dual auto mode (provided artwork, text etc exists). Toggle also on right click menu

Force update of sources on right click menu

Layout styles: picture top, left, bottom or right in dual auto mode. Optional image borders & shadows. Layout auto-adjust off/on can be used to change the text position in dual auto-mode

Smooth scrolling of text

Discrete scrollbar; can be resized / hidden. Mouse wheel: page or standard 3 line scrolling (page = default; change in panel properties)

Colours and fonts: set in foobar2000 preferences for DUI or CUI

Extra custom colour options are in panel properties

Font size: set with DUI playlist font or CUI list font. Or use mouse-over with CTRL + mouse wheel to zoom the font size (resets if UI list font size changed)

Relative image size: set in panel properties or use mouse-over with CTRL + mouse wheel to change

Panel properties has further options. Access panel properties by right click

Server settings are in biography.ini: foobar2000(profile)\yttm\biography.ini

If more than one copy of JScript biography is installed, one will be auto-picked as the server. The right click menu will show if a panel is acting as the server. In the unlikely event that a server fails to automatically set or you remove the panel acting as server, re-initialising any panel should set that panel to act as server (e.g. open panel properties, OK & close)

Although the script is based on one I have been using for many years, it should be regarded as a "beta, due to significant code changes required to make it suitable for release. I will likely be busy for the next few weeks and will deal with any issues then.

Biography 0.1 (https://hydrogenaud.io/index.php/topic,112913.msg929674.html#new)

Enjoy
Title: Re: Biography Discussion
Post by: shortdude123 on 2016-10-19 16:43:59
Thanks man! Looks promising, but it keeps crashing for me!

"JScript Panel (biography v0.1 by Wilb): Microsoft JScript runtime error:
Object expected
File: <main>
Line: 378, Col: 135
<source text only available at compile time>"

is the error I got on the last crash. 
Title: Re: Biography Discussion
Post by: tedgo on 2016-10-21 11:08:27
Thanks for this :)
Works very fast and doesn't consumpt as much cpu power as the obsolete Biography view plugin.

But it crashes for me too when i create a new empty playlist or remove an existing one...

And i'd love to have the possibility to save the artist images and biographies on my local machine to make the panel offline usable, too.
Title: Re: Biography Discussion
Post by: PeteG on 2016-10-21 15:19:25
Thanks to WilB for the script!

And i'd love to have the possibility to save the artist images and biographies on my local machine to make the panel offline usable, too.
The script autodownloads as the default setting, saving plain text and bitmaps in subfolders to the %AppData%\yttm folder.
The settings are described in the biography.ini file in said folder and adjusted in the [Auto-Download] section. As mentioned in the first post.

And, yes, creating new playlists always crashes the component at Line: 378, Col: 135. foobar2000 1.3.13, JScript Panel 1.1.6.
Title: Re: Biography Discussion
Post by: marc2003 on 2016-10-21 15:52:43
Here's a version that doesn't crash.

https://gist.github.com/19379/e3034fd6d1d2e32c5f7234e47d3c3e8d

edit: Well I fixed the problems with adding/removing playlists. I've not used it enough to say more than that!


Title: Re: Biography Discussion
Post by: tedgo on 2016-10-21 17:07:07
@PeteG
Thanks for the hint. I must have overseen it...  :-*

@marc2003
Thanks for the fix, i'll try it immediately
EDIT: Oops... i can't... the link doesn't exists... (website not available)
Title: Re: Biography Discussion
Post by: marc2003 on 2016-10-21 17:18:58
Yep, it's dead for me as well. I tried checking their status pages and even twitter is down too.
Title: Re: Biography Discussion
Post by: tedgo on 2016-10-21 17:27:51
It's back again :)
Title: Re: Biography Discussion
Post by: lender1257 on 2016-10-23 14:32:00
thanks to WilB for the script; i think this has potential.
i've tested a little bit with the fixed-beta-version of marc2003.

an issue (maybe someone can confirm):
if in biography.ini the parameter "image [artist]" is 0 (all others are 1), the album-review will be shown, the bio won't.
album-review is saved to disc, bio not.

another thing to discuss:
autodownload, means to me: always display data in panel
                                             if autodownload is 1, then save data to disc too
                                             if autodownload is 0, then only display in panel (without storing data to disc)
i think that's why nothing will be displayed, when autodownload-parameters are all 0.
Title: Re: Biography Discussion
Post by: lender1257 on 2016-10-23 15:36:27
another issue found:
after artist-change sometimes (really sometimes, don't know why & when - nothing different found in tagging) the bio + album-review are only stored to disc, without displaying in panel.
after restart foobar, bio + album-review will be shown.

i've stored the artist-name only in %artist%.
%album artist% shouldn't be a problem, because description says:
Checks following metadata fields, in this order: "album artist", "artist", "composer", "performer"

the parameters in biography.ini are set to this:
Biography [Allmusic] Auto-Download=1
Biography [Lastfm] Auto-Download=1
Album Review [Allmusic] Auto-Download=1
Album Review [Lastfm] Auto-Download=1
Image [Artist] Auto-Download=1
Image [Cover] Auto-Download=0
[Paths]
Album Review [Allmusic] Folder Location=%profile%\yttm\review\allmusic\$lower($cut(%album artist%,1))
Album Review [Lastfm] Folder Location=%profile%\yttm\review\lastfm\$lower($cut(%album artist%,1))
Biography [Allmusic] Folder Location=%profile%\yttm\biography\allmusic\$lower($cut(%album artist%,1))
Biography [Lastfm] Folder Location=%profile%\yttm\biography\lastfm\$lower($cut(%artist%,1))
Image [Artist] Folder Location=%profile%\yttm\art_img\$lower($cut(%artist%,1))\%artist%
Title: Re: Biography Discussion
Post by: lender1257 on 2016-10-24 15:29:42
another issue found:
after artist-change sometimes (really sometimes, don't know why & when - nothing different found in tagging) the bio + album-review are only stored to disc, without displaying in panel.
after restart foobar, bio + album-review will be shown.

i've stored the artist-name only in %artist%.
%album artist% shouldn't be a problem, because description says:
Checks following metadata fields, in this order: "album artist", "artist", "composer", "performer"

the parameters in biography.ini are set to this:
Biography [Allmusic] Auto-Download=1
Biography [Lastfm] Auto-Download=1
Album Review [Allmusic] Auto-Download=1
Album Review [Lastfm] Auto-Download=1
Image [Artist] Auto-Download=1
Image [Cover] Auto-Download=0
[Paths]
Album Review [Allmusic] Folder Location=%profile%\yttm\review\allmusic\$lower($cut(%album artist%,1))
Album Review [Lastfm] Folder Location=%profile%\yttm\review\lastfm\$lower($cut(%album artist%,1))
Biography [Allmusic] Folder Location=%profile%\yttm\biography\allmusic\$lower($cut(%album artist%,1))
Biography [Lastfm] Folder Location=%profile%\yttm\biography\lastfm\$lower($cut(%artist%,1))
Image [Artist] Folder Location=%profile%\yttm\art_img\$lower($cut(%artist%,1))\%artist%
i think i've found the error:
bio won't be shown if panel is always active.
if panel isn't active and you switch from another panel to bio-panel (jscript-panel), artist-bio always will be shown

hope that helps
Title: Re: Biography Discussion
Post by: lender1257 on 2016-10-25 15:46:54
2 small issues, i've found today:

1) bio is scrolled to page 2 and title changes in album, bio starts new.
that's only necessary if artist changes (like old biography)

2) bio is scrolled to page 2; after one minute it will start once more




Title: Re: Biography Discussion
Post by: tr0ner on 2016-10-27 16:16:16
thank you so much for this!!!!
Title: Re: Biography Discussion
Post by: WilB on 2016-11-04 22:56:49
New Version: Biography 0.2 beta

CHANGELOG

Fixed playlist handling issue (thanks to marc2003 for the interim fix in my absence)

Fixed various draw issues

Renamed "Auto-Download" to Auto-Fetch" in biography.ini to remove ambiguity:
    Auto-Fetch: 1. Enables web search for that source. Results are cached
    Auto-Fetch: 0. Disables web search for that source. Existing data cached to disc will be loaded. Nothing will load for a source if nothing is saved to disc
Biography.ini will automatically be reset & the previous version backed up to the same location

Biography 0.2 beta (https://hydrogenaud.io/index.php/topic,112913.msg930483.html#new)
Title: Re: Biography Discussion
Post by: lender1257 on 2016-11-05 10:29:24
hi WilB

that's sad, i thought you will change download (fetch):
     0 = fetch and display only (without saving on disc)
     1 = fetch and save on disc

a reason why i don't want to cache bio-data:
if bio is cached, you will always display cached bio; maybe this is an old one.
you can only get newest bio from net by pressing "force update".
i think that's not necessary. i suggest people would like to have always the newest bio too.

please think about it
thanks
Title: Re: Biography Discussion
Post by: jazzthieve on 2016-11-05 13:23:13
I disagree, cached is preferred. Experience has thought that APIs don't last and once it's gone you have nothing to fall back on.
Title: Re: Biography Discussion
Post by: tedgo on 2016-11-05 13:56:46
What about an option to auto-update all x days, where x can be defined in the ini-file?
Should be easy to implement.
Title: Re: Biography Discussion
Post by: WilB on 2016-11-05 17:06:18
New Version: JScript Biography 0.3 beta

CHANGELOG

Small bug fix

Biography 0.3 beta (https://hydrogenaud.io/index.php/topic,112913.msg930519.html#new)

Thanks for the feedback.

@lender1257. I have no plans to change the cache behaviour.

This is for the reason given by jazzthieve and because I don't believe its a good idea to access web-sites more frequently than necessary. Some requests are not a simple one call, e.g. one of the biographies requires 3 calls. Also its not possible to load images without first saving to disc.

But I am mindful of the point you make, lender1257. For this reason the script auto-refreshes the cached data every 28 days and offers force update if you suspect that's somethings not sufficiently up to date.

@tedgo: I had already considered adding the auto-update "x-days" to biography.ini, but decided not to because of the potential for users to make lots of unnecessary web-site calls, but I may reconsider. However, bear in mind the following:

Most info really doesn't change that frequently. Many artists are no longer active and those biographies don't change. I just checked and I have many biographies from last.fm & allmusic that are unchanged in 3-4 years. Even biographies for currently active artists only evolve slowly. I checked a bunch of mainstream currently active artists, and those were only being updated once or perhaps twice a year. Allmusic album reviews don't change, and consequently aren't auto-updated. Last.fm album reviews change only occasionally. So always obtaining the information freshly really isn't necessary. That's the logic underpinning the implementation. Auto-updating every 28 days, with a force update option, seems a reasonable compromise between how frequently the web-site data changes and not accessing web-sites too frequently.
Title: Re: Biography Discussion
Post by: tedgo on 2016-11-05 17:40:58
I know that its often unnecessary to update biographies frequently, but this auto-update would be a compromise for all those who want to be always "up-to-date". I don't need it... ;-)
David Bowie, Robert Palmer, Jimi Hendrix aso. are dead and will be still dead on next update...

But i thought about to check all 90 days for updated bio should be a good compromise.
All who don't want it could leave this option deactivated or raise the " x" to 180 or whatever.

Now all 28 days... is a good compromise, too.
But i'd prefer a longer time between updates and so i would be happy about an option to set the "x days" manually in the ini.

EDIT: or what about an option in the ini to update monthly, quarterly, half-yearly or yearly to avoid unnecessary website calls?
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-06 15:37:48
Hi and thanks for this nice component. :D I have a few comments though.

1. In my case I can't find any yttm folder in my hard drive : it's not in App Data (not in Local, not in LocalLow, not in Roaming). There is only one yttm folder in my foobar2000 folder, with the biography.ini and the foo_lastfm_img.vbs files. So where are my bios and images being downloaded right now ? I'd like to find out !

2. For that same reason, it would be nice to add a "Open containing folder" option in the right click panel drop-down menu. What do you think ?

3. As I've read in this topic, it may be possible to change the default download directory for bios and images. But right now it seems quite difficult, so why don't add it in the right click panel drop-down menu as an easy to change option ?

4. Is there an easy way to change the image cycle time ? Thanks.

5. It would be also nice to have a way to manually cycle images. Several suggestions :
- Semi-transparent arrows on both sides of the image,
- Even better : like on many websites, a row of small dots at the bottom of the image, and clicking on each dot would take us to the corresponding image.
- Also, as a complement to the two previous suggestions, why not cycle by user-definable keyboard shortcuts.

6. How can we set the tag field that will be used for search ? Right now it seems to use %artist%, but my %artist% tag field often has several values like "main artist; featured artist" (e.g. "John Legend; Ludacris"). In such cases JScript Bio will display nothing, so I'd like to use $meta(artist,0) instead.
Even better : have JSCript Bio detect that %artist% has several values, and then display them in the same previously suggested way for images : a row of small dots at the bottom, and clicking on each dot would take us to the corresponding bio : first dot --> $meta(artist,0), second dot --> $meta(artist,1) and so on.

Thanks in advance for your answers. :)
Title: Re: Biography Discussion
Post by: WilB on 2016-12-06 18:35:24
Thanks for the feedback

1, 2 & 3)

To locate the default download folder "yttm" use: the foobar2000 main "File menu" while pressing shift then click "Browse configuration folder". You should see "yttm". Open "yttm". The save folders: yttm\biography & yttm\art_img etc + biography.ini should be visible (provided defaults are unchanged). But if you found biography.ini then you found it already...

To alter the download folder locations, open biography.ini, and change as required. I suspect it's better to edit paths in a single location where you can see what's sets at a glance, and where's there's help info, rather than cluttering the right click menu with 6 path locations that are only rarely changed.

4) Image cycle time: set in biography.ini: [Miscellaneous] section: Image [Artist] Cycle Time (seconds)=15
Change as required.

5) To manually cycle images: use mouse wheel.

6) Titleformat: set in biography.ini: [Titleformat: Search & File Names] section, e.g.
change:
artist=%artist%
to:
artist=$meta(artist,0)

HTH
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-07 02:19:01
Thanks WilB. :)

About the default download folder : I have done as you said, and it took me to a yttm folder within my foobar2000 folder (which is normal since I have chosen a portable installation). The problem is that the yttm folder is empty besides the two aforementioned files ! Don't believe me ? Take a look at the attached pic. ;) So again, where are my bios and images being downloaded right now ?  :o

They must be somewhere, because I have changed the bio server in the biography.ini (to last.fm/fr in order to get french bios), restarted foobar, and then for all my previously played songs the bios remain in english, while for unplayed songs the bios appear in french. Which seems to prove that your script is fetching the bios and images somewhere in my hard drive... but where ?? (PS : if I "Force Update", the english bios are updated in french, of course)

I have tried looking for folders called "biography" in my C: drive, but I've found nothing (FYI I'm the admin of my computer, I can see invisible files and stuff). Only some files unrelated to your component, but no folders (see my second attachment).

Aside from that, I'm OK with the other workarounds. :) I just hope you can consider implementing my two "Even better" suggestions. They could improve your script in case of multiple artists for example. ;)
Title: Re: Biography Discussion
Post by: WilB on 2016-12-07 12:58:12
Nobody else has reported the issue and I've not seen any problems, either with portable or standard installs. One thing that seems strange is that you say you are using a portable installation, yet you are showing an install in Program Files (x86) where normally that would be a standard installation (but I suppose you could put a portable install therein). I have seen some issues where registry etc can link to the wrong foobar2000 installation with unorthodox install methods - which of course you shouldn't use. I am not saying that's what you've done though. Also what are all the biography entries at the end of your second picture?

The script only loads images and text from file. So if nothing is saved it won't load anything. So they must be saved. Try searching anywhere they could be for the artist name for which you are seeing the bio displayed or for recently saved files. It would be interesting to get to the bottom of this in case there is an issue with the folder save parser, although its been used in another script for quite some time. So if you find the files in an unexpected location please post exact info on the folder locations that are set in biography.ini (if you've changed the defaults), exactly what the artist search name was, and the exact save path, so I can see if I can reproduce the issue.
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-07 15:31:06
About foobar folder locations, if I remember well I moved them myself to Program Files (x86).

The five biography entries at the end of my second picture seem somehow to be related to your component. They are apparently URL files, with the following links :
http://www.allmusic.com/artist/anita-baker-mn0000572579/biography
http://www.allmusic.com/artist/michael-jackson-mn0000467203/biography
http://www.allmusic.com/artist/muse-mn0000514563/biography
http://www.allmusic.com/artist/christina-aguilera-mn0000780258/biography
http://www.allmusic.com/artist/lorde-mn000308

These URLs definitely match some of the test artists that I played yesterday (although I played many more).
The weird part is that these URL files seem to be located nowhere in my hard drive :
- As you can see there is no path specified,
- Selecting one of them (by hovering my pointer over one of them) selects ALL of them at once,
- Right-clicking on one of them also selects all of them, and shows a right-click menu with only 6 options : "Open / Open in a new window / Add to bookmarks / Copy / Delete / File info". Selecting Open or Open in a new window just opens the URL I"ve right-clicked on (even if all of them are selected) in my navigator. Selecting File info opens a dialog with no useful info on the file(s).

I have tried several file searches from the root of C: for part of artist names that I played yesterday. I have found only five audioscrobbler URLs corresponding to the five previously quoted URLs. For example :
http://ws.audioscrobbler.com/2.0/?format=json&api_key=[...]&method=album.getInfo&artist=Christina%20Aguilera&album=Stripped&autocorrect=1
http://ws.audioscrobbler.com/2.0/?format=json&api_key=[...]&method=album.getInfo&artist=Lorde&album=Pure%20Heroine&autocorrect=1

FYI I'm running Windows 7 x64. It's a fresh install made some months ago, with no issues at all AFAIK.

This is both very weird, and very frustrating because I can't find the origin of the images and bios that are being displayed right now. So would there be a way for you (for debugging purposes) to provide me a version of your component that displays the exact path of any displayed bio and image ? That would help solve the mystery, I guess. Please help. Thank you. :)
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-07 15:59:26
EDIT : I have rebooted my PC just in case, launched foobar and played an artist that I hadn't for sure played yesterday (Taio Cruz). Your component displays the bio and images. Then I've done a C: search for "taio". The only thing that I've found is another audioscrobbler URL :
http://ws.audioscrobbler.com/2.0/?format=json&api_key=[...]&method=album.getInfo&artist=Taio%20Cruz&album=Departure&autocorrect=1
Title: Re: Biography Discussion
Post by: WilB on 2016-12-07 16:18:27
As a quick test, shift + right click & choose Configure... from the menu. Insert the following so it ends up on line 489 (i.e. it should be immediately after a "return" on the line above).
Code: [Select]
fb.trace("artist: " + a + " LASTFM BIO LOAD FROM FILE: LOCATION: " + lfm_a)
Click Ok to close the window. Show the foobar2000 console. Ensure Biography Source is set to Prefer last.fm and play some music to load a last.fm biography. This should output from where the last.fm biography is being loaded.
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-07 16:38:57
But line 489 happens to be in the middle of a function...
Do you really want me to insert it AFTER the "if" line and BEFORE the "l_text" line ?
Title: Re: Biography Discussion
Post by: WilB on 2016-12-07 16:49:14
Yes that's where it needs to be.
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-07 16:59:10
OK, I have tried it. It seems to work. Here's the relevant console output :
JScript Panel (biography v0.3 beta by Wilb): initialised in 29 ms
artist: Taio Cruz LASTFM BIO LOAD FROM FILE: LOCATION: C:\Program Files \foobar2000 \yttm\biography\lastfm\t\Taio Cruz.txt
JScript Panel (biography v0.3 beta by Wilb): initialised in 28 ms
artist: Taio Cruz LASTFM BIO LOAD FROM FILE: LOCATION: C:\Program Files \foobar2000 \yttm\biography\lastfm\t\Taio Cruz.txt
JScript Panel (biography v0.3 beta by Wilb): initialised in 32 ms
artist: Taio Cruz LASTFM BIO LOAD FROM FILE: LOCATION: C:\Program Files \foobar2000 \yttm\biography\lastfm\t\Taio Cruz.txt
artist: Tank LASTFM BIO LOAD FROM FILE: LOCATION: C:\Program Files \foobar2000 \yttm\biography\lastfm\t\Tank.txt

Now here's the interesting part :
- Notice how "Program Files " has a space at the end
- Notice how "foobar2000 " has a space at the end
- Notice how the .txt files have a space at the end too (they do, really)

Indeed, I have found that my "C:\Program Files " folder has a space at the end. Weird, but well, OK.
I have 3 program folders : "Program Files ", "Program Files (x86)" and "Programmes" (Windows default folder in french for x64 apps, which links to "Program Files")
BUT in my "Program Files " (or "Programmes") folder, there seems to be NO foobar2000 folder ! Look !
Even with "Show invisible files" and "Show protected system files" options enabled, it doesn't change anything. :o
Title: Re: Biography Discussion
Post by: WilB on 2016-12-07 17:27:32
I'm glad you know what's going on. Space after .txt is, I think, just the console output adding it, but the other spaces are likely real.

You get weird things if some software creates folders with spaces at the end & sometimes you can't remove the offending folders, correct the issue or do other things etc without using command prompt. I don't think windows explorer lets you create folders with spaces at the end, but some software can. My scripts take care to trim names of leading/trailing spaces before creating folders.
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-07 17:31:10
Here's the thing : if I manually enter the path "C:\Program Files \foobar2000 \yttm\" in a Windows explorer window, I finally find the Holy Grail ! :o (see attached file).
That folder is invisible to Windows explorer AND Windows search AND Windows command line prompt, even with the "Show invisible files" option enabled. WOW.

What I don't understand, is WHY your script keeps storing its files in "C:\Program Files \foobar2000 \yttm\", when it should be storing them in "C:\Program Files (x86)\foobar2000 (ecoute)\yttm\" ! (which also exists BTW). That's where the problem lies IMHO. I have no foobar installation in "C:\Program Files \foobar2000 ". I have however several foobar installation folders in "C:\Program Files (x86)", and the one where your script is installed is "C:\Program Files (x86)\foobar2000 (ecoute)". That's where your "real" yttm folder is. ;)

Do you think you could correct that, by making sure that your script always stores by default all its files within the only "real" yttm folder where biography.ini resides ? Parsing biography.ini folder path should be enough.
Once you do that, I'll just have to manually delete the "fake" yttm folder, and things should get back to normal.
Thank you. :)
Title: Re: Biography Discussion
Post by: WilB on 2016-12-07 17:44:09
The script uses the JScript parameter: fb.ProfilePath to get the foobar2000 install location.

Try putting this at the end of the script:
Code: [Select]
fb.trace("fb.ProfilePath: " + fb.ProfilePath)
What does it point at?
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-07 17:49:16
here's what it points at (console output) :
fb.ProfilePath: C:\Program Files (x86)\foobar2000 (ecoute)\
Title: Re: Biography Discussion
Post by: mjm716 on 2016-12-08 00:56:39
I can confirm the script is creating a new "Program Files " (note space)

Very annoying and difficult to remove.

 :-X
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-08 02:05:52
Thanks mjm716 ! This was driving me nuts. Let's hope WilB can sort this out ASAP.

Also, please share your method of removing the new "Program Files " with space WITHOUT removing the real "Program Files". I'm saying this because both folders in my computer seem to have the same number of subfolders (45). I would have thought about symbolic linking, except that my real "Program Files" weights about 4 GB while the "Program Files " with space weights only about 50 MB. So I don't know what to do.

Thank you.
Title: Re: Biography Discussion
Post by: mjm716 on 2016-12-08 06:09:09
I had to move the folder to the desktop using unlocker (http://www.emptyloop.com/unlocker/)
Then, again using unlocker, I could delete it from the desktop.

Trying to delete it directly either crashed explorer or would attempt to delete my entire Programs folder.
Title: Re: Biography Discussion
Post by: marc2003 on 2016-12-08 10:10:04
Hehe, this thread has made me realise my own implementation of such a feature was broken as well. At least mine was totally harmless as it never created any folders - it only tried to read from ones that already existed. If the profile path contained brackets, it would have silently failed...

@WilB, don't pass fb.ProfilePath through any title formatting function because it's choking on the brackets in Program Files (x86) and foobar2000 (ecoute). Here's my fix although I suspect yours will be more complex...

https://github.com/19379/foo-jscript-panel/commit/b51740ab758dc769b75b804bbdef44ecb53cb7b4

Title: Re: Biography Discussion
Post by: WilB on 2016-12-08 13:02:59
@marc2003 Yes I realised what the problem was late afternoon yesterday & concur with your finding.

Apologies to anybody affected by the parsing error. I am just testing a fixed version that will be released shortly.

I have previously used this to delete folders with spaces at end of name - at command prompt try typing, e.g.
Code: [Select]
rd /s "\\?\C:\Program Files "
Replace path (i.e. C:\Program Files ) as required & take especial care not to remove anything you want.

It worked for me when I had an issue, but I am not sure if it always works though.
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-08 13:47:44
@WilB & @marc2003 : I'm happy to have helped find a bug. It's always nice to feel useful. :)

@mjm716 : I have Unlocker as well, so I guess I could move the "Program Files " folder to the desktop. But when you try to delete it from the desktop, how can I make sure that it doesn't delete the real "Program Files" (without space) folder ?

@WilB : same question. How to be sure that rd /s "\\?\C:\Program Files " won't delete the real "Program Files" folder as well ?
Title: Re: Biography Discussion
Post by: WilB on 2016-12-08 17:20:42
New Version: JScript Biography 0.4 beta

CHANGELOG

ADD: Option to set cache expiry in line with tedgo suggestion.
ADD: Album reviews & covers: added ability to include partial matches of the album name. This uses last.fm autocorrect for that source else a script algorithm. Default is on.
ADD: Left & right arrow keys can now be used to cycle through artist photos. PgUp & PgDn works for text as before. Panel has to have focus etc
CHG: Multi-value tags will now work without altering biography.ini.
CHG: Some optimisations.
FIX: Path parsing issue that affected a few users.

New options are in biography.ini which will be reset. The previous version will be backed up in the same location.

Download link: Biography 0.4 beta (https://hydrogenaud.io/index.php/topic,112913.msg932099.html#new)

Edit: If you are one of the few who downloaded before 18:12 today (December 8th) please re-download (fixed arrow key bug)
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-08 19:13:21
Thanks ! But please, let me ask this again in the name of the users affected by the parsing issue :
@mjm716 : I have Unlocker as well, so I guess I could move the "Program Files " folder to the desktop. But when you try to delete it from the desktop, how can I make sure that it doesn't delete the real "Program Files" (without space) folder ?
@WilB : same question. How to be sure that rd /s "\\?\C:\Program Files " won't delete the real "Program Files" folder as well ?
I want to be 100% sure that I won't delete or damage my real "Program Files" (without space), which would ba catastrophic...
Title: Re: Biography Discussion
Post by: OoNebsoO on 2016-12-08 19:15:12
Very nice, works lovely.

Have one question about it. If we have two instances if Biography on different panels, while playing a track, can one fetch normally using the %artist% (or $meta(artist,0)) tag, while the second one fetching using..lets say %performer% tag? Some of my classical tracks are tagged with multiple 'artists' such as composers, conductors, performers,etc, and wondered if Biography might be able to fetch art/bio for all of them...

Thanks!
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-08 19:20:05
I have a similar question. I'd like to have 3 Biography panels : 1 for english bio, 1 for french bio, and 1 for pictures.
Right now I guess we'd need two different biography.ini files, because we need to edit biography.ini to change the biography server.
But two biography.Ini files mean two separate yttm directories, and some trouble editing the files, the paths and so on.
So (feature request), would it be possible in a future version, for each biography panel to manually select its own biography server (e.g. by right click) instead of having to modify the one and only biography.ini ?
Thanks again. :)
Title: Re: Biography Discussion
Post by: nikolai4ik on 2016-12-10 06:54:35
Great script!
Title: Re: Biography Discussion
Post by: AFAIK on 2016-12-10 09:46:04
Hi @WilB,
I just login to say thanks for this wonderful script!

I'm not sure if you take feature request but I'll list it anyway :P
1. Change font. Make it possible for users to select a font, that is not depending on CUI or DUI font.
   A font selection dialog is nice, yet just a text field in the `Panel Properties` is alright too.
2. Add a property to specify where to store downloaded data.
   I see the data (texts, images) are stored in `<fb2k_path>\yttm`. IMO that path may not be optimal when using portable fb2k (fb2k folder just gets bigger & bigger). And defaulting to system temp path or user temp path is probably a good idea.
3. Add a property for setting double click to switch between album & artist page, I wanted to mimic old plugin behavior.
4. Ever thought using a public source repository or even github?
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-13 22:31:00
@WilB , sorry to insist, but you haven't answered since the other day.

You may be busy, but I'm especially concerned about the "Program Files " issue. I understand it was a bug. These things can happen, it's not "your fault". :) However, because of this bug, some people lime me are now left with a "Program Files " folder that we don't know how to delete 100% safely.

I don't blame you for that bug. However, since you're responsible for it, we should expect you to give your users a safe way of "undoing" what this bug has done. We need you to provide that solution, and also to explain us why it would be 100% safe. We can't risk losing our real "Program Files" folders : the consequences would be catastrophic for every person involved. :(

Thanks for your understanding, and I look forward to reading you. :)
Title: Re: Biography Discussion
Post by: Jailhouse on 2016-12-13 23:50:48
Have you searched on Google or Bing or the like for an answer?
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-14 00:52:05
No, sorry : it's up to WilB to provide a solution AND most importantly, to guarantee that it works safely.
For that, he may do some testing on his side :
- Install version 0.3 and have it create the wrong "Program Files " folder
- Find a way to remove it 100% safely
- Explain exactly how he did (or even better, provide a batch script or something)

That is definitely up to him, sorry. I'm a user, I'm no expert and I won't take such risks.
Title: Re: Biography Discussion
Post by: WilB on 2016-12-14 02:11:44
It's worth pointing out that it's beta software & as is standard you use at your own risk, taking on responsibility. In your case I believe the reason for a particular problem with Program Files is the non-standard way you installed foobar2000 into that location that exposed an unforeseen bug.

Notice contained within the plug-in:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Nonetheless I have tried to be helpful by posting a solution several posts ago. You want a 100% guarantee with computers & all sorts of different scenarios - I'm afraid I can't give that. If you don't like my way, then somebody else posted a different method. As Jailhouse said, you can always do your own research as well.

But I retested with both these folders present.

"Z:\Program Files "
"Z:\Program Files"

Open command prompt. Click the top left box. Choose edit. Correct the path in the example below as required and paste it in. Press enter. Confirm the action when prompted.

Code: [Select]
rd /s "\\?\Z:\Program Files "

I tried it a few times. It worked for me. You may have to refresh windows explorer to see the correct results.
Title: Re: Biography Discussion
Post by: wcs13 on 2016-12-14 02:31:47
Thanks WilB. I was only expecting some commitment on your side, a proof that you had already tried it at least. I guess now we have that commitment, even if it's not a 100% guarantee.

Yes, we use software at our own risks. You are absolutely right.
That means we can't complain if the software destroys our computer or opens a black hole into a new dimension.
But that doesn't mean that you, as developer, don't have the responsibility to fix the bugs of your software once they are been reported, especially when they have consequences outside of foobar.
And by "fixing" I also mean "fixing the consequences they may have had on your users, provided these consequences can be fixed".
That's what you have done, and so I thank you again for taking responsibility. Good job ! :)

I don't agree with the "non-standard" : foobar can be installed in either user folder or portable mode. Both are supported installation modes, and as such, foobar components must be able to function in either installation mode.

Thanks for your fix. I'll try it ASAP. :)
Title: Re: Biography Discussion
Post by: OoNebsoO on 2016-12-14 10:31:34
@WilB , per chance seen post #41?
Title: Re: Biography Discussion
Post by: WilB on 2016-12-14 11:53:36
Yes I am considering it.
Title: Re: Biography Discussion
Post by: OoNebsoO on 2016-12-15 08:43:02
Oh, excellent. Can't ask for anything more. Hope it's manageable.
Title: Re: Biography Discussion
Post by: IWSNX on 2016-12-17 10:46:14
First of all thanks for your work!

I'm new in this section and I managed to install your script, I also managed to get the album cover from last.fm via your script, but I can't find the option to download an artist picture from last.fm.
Am I blind or is there no option, if not it would be so great if you would add it, I'm searching for a component which can do that for months now.

Thank you very much and any help is welcome!
Title: Re: Biography Discussion
Post by: WilB on 2016-12-17 12:11:43
It should be on by default. But the setting is in biography.ini directly above where you would have switched on the cover setting: Image [Artist] Auto-Fetch=1. Did you click the panel to switch it to artist view? Music files must valid tags.

Artist images saved to the "Image [Artist] Folder Location" can be displayed with other artwork and playlist viewers. One image will be picked for each artist. For this you need to enter a path in preferences\display\album art. Choose the artist tab.

For the default save location, example paths you need to put in preferences>display>album art and search pattern for ARTIST are:

Standard install
Code: [Select]
C:\Users\YOUR USERNAME\AppData\Roaming\foobar2000\yttm\art_img\$replace($cut(%artist%,1),.,_)\$if($stricmp($cut(%artist%,1),.),_$substr(%artist%,2,$len(%artist%)),%artist%)\*
REMEMBER to enter YOUR USERNAME

Portable install
Code: [Select]
J:\foobar2000\yttm\art_img\$replace($cut(%artist%,1),.,_)\$if($stricmp($cut(%artist%,1),.),_$substr(%artist%,2,$len(%artist%)),%artist%)\*
REMEMBER to set the correct drive letter and path to foobar2000

Edit the above base paths if necessary according to your set-up
Title: Re: Biography Discussion
Post by: IWSNX on 2016-12-17 16:29:33
Thank you so much for your fast answer.

That's embarassing I only installed JScript Panel but I didn't find the biography.ini up to now, so now I downloaded the .txt and added it JScript and it works great.
Thank you so much!!!!!  O:)

Just to let you see how it looks now, really satisfied (right upper corner). =)

(https://i.imagebanana.com/img/ky64lptv/thumb/20161217_173531.png) (https://www.imagebanana.com/view/ky64lptv/20161217_173531.png)
Title: Re: Biography Discussion
Post by: Halen on 2016-12-31 09:35:23
Hallo, im have special request - new function. I Want show discogs master releases song according to a key %artist%, %track%.  with playlist. Like this picture ...
(http://thumbnails117.imagebam.com/52370/5b0ec9523690531.jpg) (http://www.imagebam.com/image/5b0ec9523690531)
Title: Re: Biography Discussion
Post by: always.beta on 2016-12-31 10:28:38
Could you add ' expand/collapse ' menu, please?
Title: Re: Biography Discussion
Post by: WilB on 2017-01-05 22:48:50
@Halen A far as I can see, your request depends on your tags and setting in your playlist viewer. JScript Biography doesn't interact with discogs, although this (https://hydrogenaud.io/index.php/topic,50523.0.html) component does.

@always.beta. You can already expand/collapse text and images from menu to occupy whole area or part of the area.
Title: Re: Biography Discussion
Post by: always.beta on 2017-01-06 13:11:29
Sorry. I just realized that I replied to the wrong post, what I mean is Library Tree.
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-01-06 13:16:16
@WilB is there a reason why you don't use musicbrainz.org as a source for bio? Musicbrainz also has an api and its repository of bios is more expansive than last.fm I've found.
Title: Re: Biography Discussion
Post by: WilB on 2017-01-07 14:10:12
I think last.fm is the best all-round one for biographies. They're usually comprehensive, at least for established artists, and they're available in different languages.

One point is how artists of the same name are handled. Last.fm usually returns all of them in one biography, and so a simple name search can be used. Consequently, fetching will work with all music types including radio streams and YouTube tracks. In contrast, MusicBrainz has separate biographies for artists of the same name, meaning extra discrimination is required to get the correct artist, e.g. using the album name or MusicBrainz ID written into the file. This info wouldn't be available with radio streams & YouTube tracks, and so MusicBrainz biographies wouldn't be fetchable with these music types.

I've usually found last.fm to have a wide choice of biographies, and I struggled to find biographies at MusicBrainz that weren't at last.fm. Conversely, I had no difficulty in finding biographies at last.fm not on MusicBrainz. But that might be just due to the nature of my checks... I might consider MusicBrainz further if you provide a list of at least 10 good biographies that are available at MusicBrainz but not at last.fm, so I can do more tests.
Title: Re: Biography Discussion
Post by: quah on 2017-01-07 18:40:15
I just started using Biography.  It seems better at fetching web assets than the other plugins I have played with.  However...

I am having trouble displaying local album art (that is already in the folder of the track).  If I put "Image [Cover] File Name=cover" in my biography.ini, and the image is called "cover.jpg", then that works just fine.  What I really want to do is have a fallback like "Image [Cover] File Name=*", however the asterisk does not appear to work as a wildcard. 

Any suggestions?  Thanks!
Title: Re: Biography Discussion
Post by: WilB on 2017-01-07 19:14:15
"Image [Cover] File Name=cover"

That is the save File Name if you have auto-fetch of album covers enabled (i.e. "Image [Cover] Auto-Fetch=1"). [So don't use "Image [Cover] File Name=*"]

The script will add the extension to the File Name depending on the format of the image. So cover becomes cover.png, cover.jpg etc. The default is to save these in the music folder.

To view them go to foobar2000 preferences\display\album art\front cover

Enter cover*. The wild card will ensure it picks up any extension. Sounds like you already did that.

To display images with other names like folder.jpg that you may already have enter them in foobar2000 preferences\display\album art\front cover, e.g. use something like folder.* or front.jpg. You can have as many entries as you like on separate lines. foobar2000 will use the first one it finds an image for, and so order them according to your preference. If you want a fall-back if nothing is found enter a stub image path therein.

HTH
Title: Re: Biography Discussion
Post by: quah on 2017-01-07 20:03:00
Thanks for the assistance! 

I guess I'm confused about whether Biography supplies art to foobar or the other way around. 

My settings look a bit diferent, perhaps because I use CUI.  I put the filespecs (cover, cover*, *) in Preferences > Display > Columns UI > Artwork.  They seem to work fine because I can see the file coming up in the "Artwork view" panel, but the artwork in the folder does not come up in the Biography JScript panel unless the name matches something in biography.ini. 

My overall intent is to have one big square panel that always displays something.  I think that should be the Biography JScript panel, but I could be wrong there. 

Does this make sense?


Title: Re: Biography Discussion
Post by: WilB on 2017-01-07 23:21:37
Quote
I guess I'm confused about whether Biography supplies art to foobar2000 or the other way around.
If you have asked JScript biography to download cover images (i.e. "Image [Cover] Auto-Fetch=1") it obtains and saves them. So it supplies cover images that can be viewed anywhere in foobar2000, including viewing them in JScript Biography panel.

Biography.ini just sets the save name and location. Nothing else. How the artwork is viewed is down to the artwork viewers and third party plugins, and you have to use their methods to point at the cover images.

Most now use the foobar2000 preferences\display\album art\ settings which can be set as I previously posted, e.g. enter cover.* in the front cover setting.

JScript biography reads front covers using the foobar2000 preferences\display\album art\front cover setting & requires that you use that method for it to show the covers, e.g. enter cover.*

DUI standard artwork viewer works the same way.

CUI artwork viewer will also read those entries. In CUI artwork preferences, set "Built in foobar2000 artwork reader mode" to "Embedded and external artwork"

CUI artwork panel also has its own independent configuration. That configuration is a little different in that you enter without the extension, e.g. just cover. This provides an alternate way of enabling the CUI artwork panel & NG playlist to show the cover images. I don't think it enables many other plug-ins to show covers, e.g. JScript Biography cannot utilise it.
Title: Re: Biography Discussion
Post by: quah on 2017-01-08 16:51:36
Thanks so much, WilB, for the tutorial.  I now have it all working perfectly.  My biggest mistake was that I had not noticed the Album art setting on the main Display preferences pane.

I put together this summary for my own notes and am sharing it here in case anyone else finds it helpful.  Hopefully it is reasonably correct.

Preferences > Display > Album art:
("Album art" is a section on the main Display preferences pane.)


Preferences > Display > Columns UI > Artwork:
("Artwork" is a tab on the main Columns UI preferences pane,)

biography.ini:
(biography.ini is a text file in %APPDATA%\roaming\foobar 2000\yttm\)


Title: Re: Biography Discussion
Post by: Halen on 2017-01-14 18:29:44
This componenet simply GREAT. Thanks a LOT.  :)
(http://thumbnails117.imagebam.com/52641/6293b7526403205.jpg) (http://www.imagebam.com/image/6293b7526403205)
Title: Re: Biography Discussion
Post by: ivancarv.spk on 2017-01-21 02:08:25
Veryyyy Thanksss, How do I change the country / language?  Brazil..
Title: Re: Biography Discussion
Post by: ivancarv.spk on 2017-01-21 02:19:14
Two clicks should switch between Images(with cover) ~  biography. Because we do not always want to see the biography. Question of lack of space too..
Title: Re: Biography Discussion
Post by: ivancarv.spk on 2017-01-21 08:17:54
As you do to remove the image '' No Cover '' and '' No Photo ''?
Title: Re: Biography Discussion
Post by: klepetox on 2017-02-05 18:10:31
Please help,
there must be some error in script or in my configuration. I have slow internet connection a I have noticed that the script permanently downloads data. Task manager shows that script is running simultaneously many more times, 50x, 100x. And it is permanently downloading the front cover image. The cover is downloaded correctly, but script is still running many more times. I suppose that it must download maybe 50-100 MB each time.

This is my configuration:

Code: [Select]
[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=1
Image [Cover] Auto-Fetch=1
[NAMES]
album artist name=$if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0))
artist name=$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))
album name=$meta(album,0)
[PATHS]
Album Review [Allmusic] Folder Location=d:\temp\yttm\review\allmusic\
Album Review [Lastfm] Folder Location=d:\temp\yttm\review\lastfm\
Biography [Allmusic] Folder Location=d:\temp\yttm\biography\allmusic\
Biography [Lastfm] Folder Location=d:\temp\yttm\biography\lastfm\
Image [Artist] Folder Location=d:\temp\yttm\art_img\%artist%
Image [Cover] Folder Location=$directory_path(%path%)
Image [Cover] File Name=Folder - %album%

Title: Re: Biography Discussion
Post by: WilB on 2017-02-05 22:42:21
@Halen Thanks.

@ivancarv.spk Last.fm doesn't appear to have a Brazillian site but biographies are available in Portugese (set Lastfm Biography & Artist Image Server=www.last.fm/pt under [MISCELLANEOUS] heading in biography.ini). Other sources are English only. Double click option also requested by AFAIK and will be in the next release (along with other requested features). "No Cover" and "No Photo" are the final fallback images that show if no others are found. To stop them showing set your own stub images in foobar2000 Preferences\Display\Album Art or Artist. You could also use text only mode.

@klepetox I checked the script and for me its all working fine.

So ensure that you have complied with the following as stated in the first post or documentation:

...searches when foobar2000 is unable to load a cover according to main foobar2000 preferences\display\album art\front cover setting. You therefore have to enter the save location therein. If its not entered, the script will assume the cover isn't present & so will search... Assuming you haven't changed the default save location, you would need to enter "cover.*" without the quotes.

I see you changed the save filename to: Folder - %album% So you would need to add exactly that instead.

HTH
Title: Re: Biography Discussion
Post by: WilB on 2017-02-11 17:25:18
New Version: JScript Biography 0.5 beta (https://hydrogenaud.io/index.php/topic,112913.msg935527.html#new)

Thanks for the feedback.

CHANGELOG

ADD: Option to pick & fetch individual last.fm biographies & photos for multiple fields, each of which is multivalue evaluated. Enable in biography.ini ("Show More Tags"). If there are multiple values, the artist view will show a discreet watermark style button > click to choose name.

ADD: Option to map mouse left button click to double-click (biography.ini).

ADD: Customisable scrollbars (panel properties).

CHG: Zoom. Ctrl + Alt + mouse wheel are now required to zoom the font, image and button sizes on mouse over rather than just Ctrl + mouse wheel.

CHG: Some optimisations.

Ensure comma "," separators are retained where used in panel properties.

@OonesboO & @wcs13 The method used for multi-field/value handling was chosen because it caters for both types of info + gives easy access to all values. It also avoids the need for a second panel. @wcs13 You could use the last.fm bio for French & the other source for English.

@AFAIK
- Custom font: set in panel properties with "_Custom.Font". Enable "_CUSTOM COLOURS/FONTS..." therein to use the custom setting.
- Storage location: set PATHS in biography.ini.

Due to the new requested features, biography.ini will be reset. The previous version will be backed up in the same location.
Title: Re: Biography Discussion
Post by: OoNebsoO on 2017-02-12 16:35:59
Brilliant, @WilB , brilliant!

It's way better than what I imagined might look like, and works with every weird custom tag I throw at it. :D
Title: Re: Biography Discussion
Post by: YOGAM on 2017-02-15 13:19:40
Thanks for your work! I still have to test the new version, but the previous one was already great.

This is probably not off-topic (sorry if I crossed the line  :-* ), but  I was wondering if there was a way to tweak the scrip in order to retrieve "genre/style" informations associated with the artist from LastFM or (even better) from AllMusic,? LastFM is not very reliabble for "genre" information, but Allmusic is much better.
If there was a way to extract these informations in .txt files, it would become quite easy to batch tag a complete music collection with "Genre/style" tags (for exemple using mp3Tag). I'm hoplessly searching for software or a script that would be able to do that kind of task (I tried many things (scripts for Foobar, Picard, script for MP3tag,...), but, so far, I found nothing).

PS : I'm aware Marc2003 created a script in order to display LastFM "genre" informations . But, beside the point LastFM isn't the best source availlable, I noticed the .txt files created by this script can't be used with a tagger software (these .txt files are NOT in plain text).

Title: Re: Biography Discussion
Post by: WilB on 2017-02-15 21:47:15
^ Sounds like that should be in a tagger program & outside the scope of JScript Biography.

New Version: JScript Biography 0.5.1 beta (https://hydrogenaud.io/index.php/topic,112913.msg935699.html#new)

CHANGELOG

Fix for change at last.fm
Title: Re: Biography Discussion
Post by: YOGAM on 2017-02-16 13:49:45

^ I agree it's outside the intended scope of your script.

Yet, the method I suggested is very efficient :
I applied it with a Marc2003's Discography WScript which generates for each artist one .txt file with the MusicBrainz ID number (e.g : "83d91898-7763-47d7-b03b-b92132375c47" for Pink Floyd).

With these .txt files, I could batch tag my whole collection (+7000 artists) using MP3tag. It only took 2-3 hours to generate for each track in my collection, a MUSICBRAINZ_ID tag. This is insanely fast ! (with only a tagger program + a "web source" script, it would have take ages to do the same thing).

I'm aware your script wasn't designed to solve tagging issues ; on the other hand, even if your sole purpose is to display artist informations, it wouldn't be irrelevant to display "genre/style" informations...

Anyway, even if you don't want to add this feature, you're script is great and I'm happy to use it.
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2017-02-19 09:39:02
Hi Wilb
I'm really enjoying your script. Well done and thanks.

I'd like to ask you if it would be possible to include a panel property to switch the panel between preferring the playing track and the selected/focused track. My idea would be to use two biography panels, one for the playing track and one for my focused track.
Title: Re: Biography Discussion
Post by: mjm716 on 2017-02-27 01:09:51
Thanks much for the great script - nice to see data flowing once again into my new albums.

One question/suggestion:

Is it possible to get both bio sources automatically?
e.g. the "Sources" options are actually toggles/check boxes instead of either/or. The user could turn both on or off and display would default to which ever is available and cycle on click?

Title: Re: Biography Discussion
Post by: WilB on 2017-02-27 11:23:00
Quote
Is it possible to get both bio sources automatically?
Both sources are obtained automatically if auto-fetch is enabled for them, which is the default.

Quote
...display would default to which ever is available...
Sources is the preferred source; if first source is not available it tries the other source - so that is the above behaviour.  If I haven't understood your point then please be more explicit. You can set which sources are auto-fetched in biography.ini.

I have already added a text heading that can be clicked to toggle the preferred source that will be in the next version + other requests.
Title: Re: Biography Discussion
Post by: mjm716 on 2017-02-27 16:16:23
fantastic work - thanks much for the clarification!

The only other item on my wish list would be other layout options (such as text over image) but I'm probably on my own for that. ;)

Title: Re: Biography Discussion
Post by: redorb on 2017-02-28 20:48:04
Hello!

This is so confusing.
Read through this thread about fixing the lost Biography.
I also don't have any of the mentioned/required paths and folders on my computer Win7 Ultimate.
I don't have a biograph.ini file anywhere.
foobar2000 is installed to: C:\Program Files (x86)\foobar2000 (not portable) and it's working perfectly.
The only thing I have looking anything like biography is:
C:\Users\***\AppData\Roaming\foobar2000\user-components\foo_uie_biography
Using tedgo's DarkOne v4 theme (I love that theme!) but as already said the Biography won't work at the moment.

@WilB
Maybe it's a big task to get the Biography working on my PC but if you or anyone has time to put in an effort to guide me I'd be really happy.
I really miss the Biography so hoping for a solution.

Also, could anyone show a screendump on how WilB script looks like when active?
Is anyone using tedgo's DarkOne v4 theme it would be nice to see how that looks.

Best regards redorb
Title: Re: Biography Discussion
Post by: WilB on 2017-02-28 22:45:00
I believe that tedgo's DarkOne v4 uses foo_uie_biography. That component no longer works properly, as acknowledged (http://tedgo.deviantart.com/art/DarkOne-v4-360862076) by tedgo the themes author. Development of foo_uie_biography appears to have ceased.

You have posted in the JScript Biography thread, which offers a replacement. To use you would have to replace the foo_uie_biography panel in DarkOne v4 with a JScript panel. You will have to work out how to do that as I am not familiar with DarkOne v4. But in general... Ensure you have installed JScript panel (http://www.foobar2000.org/components/view/foo_jscript_panel). Go to preferences\columns ui\layout, locate foo_uie_biography panel, add a JScript panel to the same parent panel stack splitter, ensure the name & all settings for JScript panel are identical in the panel stack splitter to those used by foo_uie_biography. Click OK to load the columns ui layout. Go back to the parent panel stack splitter. Ensure it has retained all the names & settings (sometimes they don't stick). When all is OK remove foo_uie_biography from the panel stack splitter. It's then a simple matter of importing the JScript Biography script into the new JScript panel as per the first post of this thread. JScript biography looks much the same as foo_uie_biography.

HTH
Title: Re: Biography Discussion
Post by: redorb on 2017-03-01 13:40:46
@ WilB

Thanks for your reply, appreciate that!

I'm stuck at installing JScript panel, it totally messes up things and I can't get pass from there.
The really annoying thing is it's impossible to undo settings in foobar to what is was before.
Luckily it's easy to restore C: drive from an OS image I keep updating regullary.
I think I give up on this, for now at least.
Putting my hopes to tedgo and fixing Biography for DarkOne v4.

Best regards
Title: Re: Biography Discussion
Post by: colagen on 2017-03-01 17:11:55
Hi,
I just uploaded a customized JScript Biography script, you can grab it here http://www.mediafire.com/file/lyqhqzqh76q6yxm/WSHartist_bio_release.js

it add a little bit better looking layout, with a blurred album art as background, titles for the biography and album review, ability to select lastfm prefered server, ability to enlarge the image with one click or on mouse over.

But i won't update it / do support so it's more for WilB, if he want to pick some ideas.
Title: Re: Biography Discussion
Post by: marc2003 on 2017-03-01 17:37:52
Luckily it's easy to restore C: drive from an OS image I keep updating regullary.

That's crazy. If you're messing around with the DarkOne theme, all you have to do is re-import the .fcl file like you did when you first installed the theme. That will reset everything back to how it was originally.
Title: Re: Biography Discussion
Post by: redorb on 2017-03-02 09:28:30
@ marc2003
I know that! Made a lot of tweaks on the theme and couldn't find that specific backup .flc
Usually I'm very organized... :-[  Yesterday I exported settings to a new .flc
But thanks for the heads up.

Best regards
Title: Re: Biography Discussion
Post by: obsidian1066 on 2017-03-07 17:17:29
@colagen Thanks for the script.  I've imported to the "Foobar Mnlt2 Plus 2.0" setup.  It displays bio, review, and art but crashes on every other launch with this message: 

JScript Panel (biography v0.5.1 beta by Wilb)
JavaScript runtime error:
Unable to get property 'GetColorScheme' of undefined or null reference
File: <main>
Line: 4014, Col: 2
<source text only available at compile time>

How do I remedy it?

Thanks again,

obs
Title: Re: Biography Discussion
Post by: WilB on 2017-03-07 19:17:56
There will be a new version of JScript biography shortly that implements the nice ideas of colagen in a fully working way - its actually done - just testing all is working...
Title: Re: Biography Discussion
Post by: obsidian1066 on 2017-03-07 22:04:36
@WilB Great!  Thank you.

obs
Title: Re: Biography Discussion
Post by: WilB on 2017-03-07 23:09:25
New Version: JScript Biography 0.6 beta (https://hydrogenaud.io/index.php/topic,112913.msg936497.html#new)

Thanks for the feedback and colagen for the ideas.

CHANGELOG

ADD: Biographies & album reviews now contain extra artist & album related info (last.fm album reviews unchanged).
ADD: "Prefer Now Playing" to menu > sources. If disabled, the selected track is followed. Operates on a per panel basis.
ADD: "Heading" for text. Enable: menu > layout. Displays artist/album names, info type, info source & rating stars where available. Clickable > toggles preferred source, displaying if available. There are plenty of options in panel properties if required, e.g. font size, metrics, items to display, font colour[set with text highlight], fine tuning etc
ADD: Rating, if available, can now be displayed in the heading, on own line or embedded in the text as before (set in panel properties "Rating...").
ADD: Dark and light theme options. Enable: menu > layout. These pick image colours for the background and synchronise with the image.
ADD: Option to enlarge images on mouse over. Enable: menu > layout. Note that enlarge/shrink both of images and text is still available through single click using mouse middle button as before.
CHG: Outer padding can now be set independently for all image & text borders (panel properties).
ADD: Shortcut for "Server Setting": menu > sources. For example, use to change the last.fm language by setting a different server.
ADD: Option for last.fm server to fall back to trying www.last.fm (English), if the set server is different & no results (set in biography.ini as above).
ADD: Option to lock dual mode as image + text rather than using auto display (panel properties "Layout Dual Style Auto).
ADD: Option to top align images when on left or right of text (panel properties "Layout Dual Style...)
FIX: Regression. Auto resize image cache wasn't always being used.
CHG: Various optimizations

Ensure comma "," separators are retained where used in panel properties.

Some panel properties have changed & redundant removed. This may affect image and text positioning (default unchanged). Export panel properties, before updating, if you need a record.

Due to the new requested features, biography.ini will be reset. The previous version will be backed up in the same location.

Click the link below for a picture showing dark theme with heading displayed (both can be enabled on layout menu)

(http://imgur.com/a/2DmFm)
Title: Re: Biography Discussion
Post by: widerock on 2017-03-08 14:21:14
Thank you for the great plugin.

I have a suggestion. Now, mouse click on the panel switches between 'Artist' and "album" mode.
While I read 'biography or album review', sometimes I mis-click on the panel, and it resulted in the unwanted switching.
So,to prevent that, it would be nice if the click area was limited in the album & artist image area.
Title: Re: Biography Discussion
Post by: WilB on 2017-03-08 17:31:04
Thanks. The issue came up once before and resulted in the option: "Mouse Left Button Click: Map To Double-Click" (biography.ini [miscellaneous heading]). This will prevent single mis-clicks. The setting is in biography.ini.

HTH
Title: Re: Biography Discussion
Post by: mjm716 on 2017-03-08 19:59:22
Hi,

FYI the 0.6.2 script version seems to require JSPanel 1.2 component.

I was running JSPanel 1.1.1 and got the following error:
JScript Panel (biography v0.6.2 beta by Wilb): Microsoft JScript runtime error:
Object doesn't support this property or method
File: <main>
Line: 1058, Col: 133
<source text only available at compile time>

Title: Re: Biography Discussion
Post by: mjm716 on 2017-03-08 22:01:37
IMO the lastfm/allmusic buttons are a bit confusing - it seems that clicking should toggle the source (only if it is available)?

btw, really like the new formatting options - your hard work is appreciated!

(http://i.imgur.com/TDLrHJ6.jpg)
Title: Re: Biography Discussion
Post by: WilB on 2017-03-09 00:27:55
It was Date.now() not being supported by the JScript engine in JSPanel 1.1.1 (it was OK with the JScript9) engine. I'll add a workaround shim as I think even 1.2 can default back to the JScript engine unless at least IE9 is installed. Regarding the toggle button I don't really understand what you mean. Please be explicit, although perhaps by now you have got used to it. I thought it worked well and automatically - showing what's actually displayed -  I also tried what I think you mean and that seemed fine as well.
Title: Re: Biography Discussion
Post by: mjm716 on 2017-03-09 16:40:58
Regarding the toggle button I don't really understand what you mean. Please be explicit,

I think my confusion is that the button seems to be used as a setting (which data source does the user prefer?) instead of an action (switch the data source if available).
 
For example, if I have an album review panel, and there is an "allmusic *****" button, when I click it, I see a "lastfm" button, but the actual review data remains the same except for ">> Album rating: X.X <<" at the beginning.

I would expect to get a completely different review from lastfm if there was one to display? If there is no 2nd review, I would not expect anything to happen on click.

Similarly with the bio, if I see "allmusic" information, when I click the button, the data did not change (in my test case), but the button state did (switches to "lastfm"). I would expect that button state change to happen only if there was secondary information to display.

Am I missing something?

The disconnect is that if it is a preference setting, how would I access an alternate data source? would I have to change my preferred source and then force reload?
Title: Re: Biography Discussion
Post by: WilB on 2017-03-09 17:21:35
I can't reproduce that behaviour (except for rare occasions when last.fm have the other review on their site). The button should work as you expect & synchronise with the source.

Have you changed the save [PATHS] in biography.ini? It sounds like you haven't got unique save paths and one review is overwriting the other, which I think would give the behaviour you describe. Ensure that the two biographies are saved in different folders. Similarly ensure that the two album reviews are saved in different folders. Restart foobar2000 after changing biography.ini. Check the save locations of a few files to validate all is working properly.
Title: Re: Biography Discussion
Post by: mjm716 on 2017-03-09 19:22:53
Have you changed the save [PATHS] in biography.ini?

Thanks! that was it!
I did not have sub-directories for each source.
Title: Re: Biography Discussion
Post by: widerock on 2017-03-10 00:14:37
Thanks. The issue came up once before and resulted in the option: "Mouse Left Button Click: Map To Double-Click" (biography.ini [miscellaneous heading]). This will prevent single mis-clicks. The setting is in biography.ini.

HTH
There it is. Thanks for the help.
Title: Re: Biography Discussion
Post by: MojoBass on 2017-03-11 04:20:07
Hello WilB,
Thanks for this great plugin!!
Is there any chance for an optional 'Crop' functionality in Image Only mode as seen at the 'now playing (basic)' script from Marc2003 (see here (https://github.com/mzso/js-marc2003/blob/master/samples/now%20playing%20(basic).txt))? It covers the full display area of the frame (and cuts off part of the artwork at the edges to fit actual frame size) - I like it..
Regards, MojoBass
Title: Re: Biography Discussion
Post by: WilB on 2017-03-19 17:45:56
New Version: JScript Biography 0.7 (https://hydrogenaud.io/index.php/topic,112913.msg936953.html#new)

CHANGELOG

ADD: Option to crop images so they are space filling (menu > layout > image).

Minor technical fixes and refinements.
Title: Re: Biography Discussion
Post by: colagen on 2017-03-20 12:07:49
Great, thanks for all those additions.
Maybe you could add also new position options for the image : you can split the options between horizontal alignment and vertical alignment, and on both categories you can let the user choose between left / center / right and top / center / bottom (and vertical>center would be grayed if horizontal>center is selected of course : )
Title: Re: Biography Discussion
Post by: redorb on 2017-03-22 15:15:18
Got the JScript Biography 0.7 working.

There is an issue with tedgo's DarkOne v4 theme though.
Look at these images, rollover (http://web.comhem.se/u5127956/foobar_biography.html). Some things get's broken.

Maybe this is not so easily solved? I really wanna keep DarkTheme.
Hoping tedgo will have a go at it eventually.

Regards
Title: Re: Biography Discussion
Post by: WilB on 2017-03-22 22:54:57
@colagen. Your request will be in the next release.

@redorb. I'm not exactly sure what point you're making. Both images have the same aspect ratio, i.e. square. I tried it in DarkOne v4.0 and it was fine. If what you mean is that the image isn't aligned at the top like the other image, then you seem to have some image padding set. Try setting the Layout outer Padding Image Left, Right, Top & Bottom to 0 (Biography > Right Click > menu > panel properties) & make sure the panel is wide enough to accommodate the full height of the image.

HTH

(http://i.imgur.com/eK7Ntx8.jpg)
Title: Re: Biography Discussion
Post by: redorb on 2017-03-23 07:56:14
@WilB
Nothing wrong with the album art images or text shown in Biography panel.
Things marked in red rectangles gets broken.
To get out of Biography panel I have to point exactly right on the thin red vertical buttons that are barely visible.
Look at updated image in link.
Tried a ton of things and I can't get it right.

Regards
Title: Re: Biography Discussion
Post by: marc2003 on 2017-03-23 08:16:48
I suspect you didn't make a note of the panel stack splitter settings that were applied to the old panel before replacing it with a new one. Try re-importing the old .fcl file and take a look / ask Tedgo for help.
Title: Re: Biography Discussion
Post by: WilB on 2017-03-23 13:13:24
To save messing around any further here is a modified version of DarkOne v4.0 with JScript Biography. I hope its all OK as all I did was to check that JScript Biography was set-up.

All original credit to tedgo.

To use:
1) You HAVE TO install tedgo's DarkOne v4 according to tedgo's instructions here. (http://tedgo.deviantart.com/art/DarkOne-v4-360862076) This is required so that all the necessary stuff is in place. From tedgo instructions: ensure you BACKUP YOUR EXISTING COMPONENTS, CONFIGURATION FILES AND THEMES BEFORE EXECUTING THE SELF-EXTRACTING ARCHIVE!

2) Import the below fcl file: foobar2000 preferences > columns ui > main tab

HTH
Title: Re: Biography Discussion
Post by: WilB on 2017-03-23 14:28:12
^^^^^
3) You also need to install JScript panel 1.1.0+ (http://www.foobar2000.org/components/view/foo_jscript_panel) before trying to load the above fcl file, if you don't already have it.
Title: Re: Biography Discussion
Post by: redorb on 2017-03-23 14:50:34
Yay!!
Thank you so much for going the extra mile! I really appreciate that!!
The .fcl you posted works like a charm, and now I have the Biography panel working!! :D
Some of my tweakings got lost but that I know how to fix.
Like showing the album art in the small "Playing" (http://web.comhem.se/u7848007/foobar_biography.html) window, change to a different font and such.

Again many many thanks for your assistance! WilB... your my new hero!

Kind regards
from redorb in sweden

Edit: Removed the link in message Reply #101
Title: Re: Biography Discussion
Post by: WilB on 2017-03-23 18:25:41
New Version:  JScript Biography 0.7.2 (https://hydrogenaud.io/index.php/topic,112913.msg937167.html#new)

CHANGELOG

ADD: Extra alignment options for image (menu > image > alignment).

CHG: Various menu refinements due to accumulated extra options. The "Playlists" shortcut is no longer shown by default (can be re-enabled in panel properties: "Menu Show Playlists"). The "Biography Server" identifier now requires "shift + right click" to display.
Title: Re: Biography Discussion
Post by: redorb on 2017-03-23 18:43:05
Thanks for the update!

regards
Title: Re: Biography Discussion
Post by: redorb on 2017-03-23 18:52:17
Thanks for the update, works like a charm!

regards
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-03-23 19:13:49
@WilB I like how you added top tags, similar artists and top albums to the bio a few versions back. A question, I'm sure the LFM api also provides overall playcounts (not the personal user playcount)  and amount of listeners stats. Could you include those as well? Perhaps with a switch in biography.ini for those who don't prefer seeing that information?
Title: Re: Biography Discussion
Post by: redorb on 2017-03-25 09:39:43
Hello!

I'm really pleased with the Biography Script which works like a charm!!
Biography jpg images are stored here:
C:\Users\***\AppData\Roaming\foobar2000\yttm
As I often, daily, listen to my music the images quickly pile up, eating HDD space.
I try to keep he OS drive as clean as possible and my question is:
Is there a way to point the yttm folder using another path to another HDD?

Thanks...
Title: Re: Biography Discussion
Post by: redorb on 2017-03-25 11:48:19
I found out how to change the Biography path!!
It was explained in this thread...  :-[
Just edited the biography.ini and all is good!

regards
Title: Re: Biography Discussion
Post by: aeidein on 2017-03-26 06:39:13
Thanks for this great script!  I put it in a toggle-able panel:

(http://i.imgur.com/vhGTCCu.png)

A few questions:


Title: Re: Biography Discussion
Post by: WilB on 2017-03-28 18:31:37
New Version: JScript Biography 0.7.3 (https://hydrogenaud.io/index.php/topic,112913.msg937387.html#new)

CHANGELOG

ADD: Display of last.fm statistics (scrobbles, listeners) where available, in last.fm web page format (to maintain language support). Shown at end of text. Their display can be disabled in panel properties ("Statistics Last.fm...").

ADD: Text display options to panel properties. "Text Spacing Pad", can be used to adjust line spacing and "Text Align Always Top".

@aeidein. Rating can be displayed on a separate line or embedded in the text or shown in the heading. Set with " Rating..." in panel properties. You can choose the display mode, e.g. set as image only or text only (menu or middle click). Setting applies to both artist and album views - I have no plans to change that behaviour. The "Layout Outer Padding Text Bottom" can affect the top space since the text block including the heading is normally vertically centered - so it spaces equi-distant top / bottom if the pads are the same. I've added an option to always top align the text which will stop that behaviour (see above). You will only see a change in text only mode or in dual image + text mode with right / left layout (in dual top / bottom layouts the image is sized so that the text is a flush fit). Regarding line spacing, I've added that option as well (see above). There's also "Heading Metrics..." in panel properties that does what it says.
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-03-28 19:35:42
New Version: JScript Biography 0.7.3 (https://hydrogenaud.io/index.php/topic,112913.msg937387.html#new)

CHANGELOG

ADD: Display of last.fm statistics (scrobbles, listeners) where available, in last.fm web page format (to maintain language support). Shown at end of text. Their display can be disabled in panel properties ("Statistics Last.fm...").

Awesome, thanks.
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-03-29 13:24:32
I noticed with v0.73 that I get less results than the previous version. I have a portable install that uses v0.72 and another one with v0.73 on some artists (mostly those with low listeners/scrobbles and no bio filled in) the information doesn't get downloaded. v0.72 doesn't seem to have this issue.
Some examples of artists that don't work on v0.73 but do on v0.72:

Aaly Trio (https://www.last.fm/music/AALY+Trio)
Madhu, Vaishali & Shoma (https://www.last.fm/music/Madhu,+Vaishali+&+Shoma)
80s Stallone (https://www.last.fm/music/80s+Stallone)
Maria Pierantoni Giua (https://www.last.fm/music/Maria+Pierantoni+Giuahttp://)

For Madhu, Vaishali & Shoma I filled in the bio to see if that was the trigger but that doesn't seem to be the case and 80s Stallone already had its bio filled in.
Can you reproduce?
Title: Re: Biography Discussion
Post by: redorb on 2017-03-29 15:44:53
Thanks!

regards
Title: Re: Biography Discussion
Post by: tr0ner on 2017-03-29 16:46:53
Thank you again for creating this!!
It finds and downloads most covers automatically and works like a charm.

One idea: some albums are tagged with additional info like "Deluxe Edition", "Limited Edition" etc. and the scipt does not find the cover because of that.
 Maybe you could add an option in the right click menu to manually change the search term if there is no cover found?

Title: Re: Biography Discussion
Post by: WilB on 2017-03-29 17:13:54
@jazzthieve The examples you quoted either don't have or have a very short actual biography. I had changed the detector for whether a biography existed & essentially if it didn't exist or was short, i.e. likely to be "We don't have a wiki here yet...", or something similar, it was rejected and none of the other extra info saved either.

Anyway I have changed it to a better detector, so very short bios should now be found, and it will also now include the extra info even if there is no actual biography. That will be in the next release. I probably need to test it further though...

@tr0ner. Are "Deluxe Edition", "Limited Edition" etc. part of your tags? The script already does some clean up of album names. I could add these to the list of terms that get stripped, so it always searches for the "core" name, which is more likely to find a cover. If there are any other terms worth including let me know.
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-03-29 17:43:04
Yes, I also thought about the shortness or non existing bio to be the reason but v0.72 gave top tags, top albums, similar artist results even if there was no bio present.
I also thought low listener/scrobble count would be the issue but couldn't find much consistency in that either.
Looking forward to your next release.
Title: Re: Biography Discussion
Post by: redorb on 2017-03-29 18:04:46
Thanks WilB for the update, much appreciated!
Title: Re: Biography Discussion
Post by: WilB on 2017-03-29 23:03:24
New Version: JScript Biography 0.7.4 (https://hydrogenaud.io/index.php/topic,112913.msg937421.html#new)

CHANGELOG

FIX: Regression where biographies didn't exist or were very short (in these rare cases, where fetching didn't work with 0.7.3 & a bio hadn't previously been fetched, "Menu > Sources > Force Update" might be needed to obtain the bio).

ADD: Extended album name clean up to strip "Deluxe Edition", "Limited Edition" etc. before searching so that album reviews and covers can be obtained in these cases.
Title: Re: Biography Discussion
Post by: tr0ner on 2017-03-30 09:54:01
@jazzthieve The examples you quoted either don't have or have a very short actual biography. I had changed the detector for whether a biography existed & essentially if it didn't exist or was short, i.e. likely to be "We don't have a wiki here yet...", or something similar, it was rejected and none of the other extra info saved either.

Anyway I have changed it to a better detector, so very short bios should now be found, and it will also now include the extra info even if there is no actual biography. That will be in the next release. I probably need to test it further though...

@tr0ner. Are "Deluxe Edition", "Limited Edition" etc. part of your tags? The script already does some clean up of album names. I could add these to the list of terms that get stripped, so it always searches for the "core" name, which is more likely to find a cover. If there are any other terms worth including let me know.

Thank you very much for your reply and the update of course - I will test it tonight after work.
 There are some more I can think of now:

Remastered
Web
Mono (for some old bands like the Beatles for example )
Expanded Edition
Revisited

I guess it would be hard to add too many terms without limiting the functionality.

Sometimes it also has problems with -feat / featuring or if it is a collaboration album: Artist1 and/+/&/,/- Artist2 for example.
What I noticed in that case is that often the Artist Bio is found and displayed correctly but the cover is not,

But dont get me wrong the script works absolutely fantastic for most of my albums.

Title: Re: Biography Discussion
Post by: redorb on 2017-03-30 16:12:00
Thanks for the update, really appreciate the work you put into foobar biography!
Title: Re: Biography Discussion
Post by: WilB on 2017-04-03 18:06:08
^ You're welcome.

New Version: JScript Biography 0.7.5 (https://hydrogenaud.io/index.php/topic,112913.msg937584.html#new)

CHANGELOG

ADD: Improved implementation of "Album Name Auto-Clean" + made optional. Strips key words, as required, before searching, e.g. Deluxe Version, [2011 - Remaster], Expanded Edition + many more. Improves search results if such phrases are used in album names. Default is off. Enable in biography.ini ("MISCELLANEOUS HEADING").

@tr0ner. I added "remaster", a bunch of other keywords + "Mono", "Revisited" & "Web". The last 3 are only stripped if in parentheses or square brackets else they aren't specific enough. Regarding a few of your searches where the artist name included featured artists, e.g. Artist A Feat. Artist B., and biographies were found but not covers. Artists aren't normally named that way on albums and so variable results with covers would be expected  - the main album artist name would be better. Similarly, for best results with collaborative artists, album artist names(s) should ideally match those used by the sites for the albums. By default, for review / cover look ups, metadata fields are checked in the following order: "album artist", "artist", "composer", "performer".
Title: Re: Biography Discussion
Post by: WilB on 2017-04-05 18:43:06
New Version: JScript Biography 0.7.6 (https://hydrogenaud.io/index.php/topic,112913.msg937664.html#new): Various optimisations.
Title: Re: Biography Discussion
Post by: redorb on 2017-04-07 12:05:29
Thanks WilB!
Title: Re: Biography Discussion
Post by: San_dr on 2017-04-07 20:07:12
Great work! My compliments!
 In my subjective opinion, such a shadow is more expressive.
http://savepic.net/9149094.htm
I propose to replace the line (I suppose so # 922 )
Code: [Select]
if (this.border > 1) gb.DrawImage(sh_img, 0, 0, Math.floor(tw + bor_w2 + imgb), Math.floor(th + bor_w2 + imgb), 0, 0, sh_img.Width, sh_img.Height);
replaced by
 
Code: [Select]
 if (this.border > 1) gb.DrawImage(sh_img, 7, 7, Math.floor(tw + bor_w2 + imgb-7), Math.floor(th + bor_w2 + imgb-7), 0, 0, sh_img.Width, sh_img.Height);
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-04-09 07:23:47
last.fm has added a new interesting feature to their biographies (reminiscent of what Rate Your Music is doing). Will you be adding the information from the factboxes to your bio component Wilb?
Title: Re: Biography Discussion
Post by: Bratman on 2017-04-09 21:50:59
Thanks for making this panel, anything to display album releases?
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-04-10 04:23:46
marc2003 has a musicbrainz jscript panel for that.
Title: Re: Biography Discussion
Post by: Climhazzard1997 on 2017-04-19 16:08:10
Would it be possible to set the display modes for artist bio and album review separately?

I already have an album art viewer, and the art is also displayed in the playlist view, so I have no need for it in the review pane, and would rather have it be dedicated to text. I do however, like the artist picture slideshow.

Also, would it be possible to change how many artist images are downloaded? I wouldn't mind having a few more.
Title: Re: Biography Discussion
Post by: WilB on 2017-04-19 23:05:12
@jazzthieve & San_dr. Requests should be in the next release.

@Bratman. YouTube Track Manager (https://hydrogenaud.io/index.php/topic,105522.msg937386.html#new) can display fully categorised lists of MusicBrainz releases + last.fm top albums, top tracks & top similar songs. It also offers interactive display of those items for similar artists. YouTube-related functionality doesn't have to be used.

@Climhazzard1997

Quote
Would it be possible to set the display modes for artist bio and album review separately?
It's possible, and I did try it, but found changing display modes at the same time as toggling between artist and album styles confusing. Have you considered changing the album art panel to JScript biography & using that to show covers in image only mode? It can easily be toggled to image + review or review only mode (menu or mouse middle click). The separate JScript biography could then be used for the slide show (or toggled to the text biographies). Another possibility is to use one of the panels for images and other for text, with use of simple left click toggles to change artist vs album.

Quote
I wouldn't mind having a few more... artist images.
The script auto-adds new artist images periodically (default every 28 days) [can be disabled in biography.ini]. So the number of images will rise. In that way the script selectively picks from the better images and aims to provide a good spread of images. If that's not adequate, the ability to fetch more each time could be added, but that increases the likelihood of some not so good images...
Title: Re: Biography Discussion
Post by: WilB on 2017-04-20 18:08:54
New Version: JScript Biography 0.7.7 (https://hydrogenaud.io/index.php/topic,112913.msg938253.html#new)

CHANGELOG

ADD: Some further info to last.fm biographies & album reviews, where available.

ADD: Option to display last.fm album ratings. Can be displayed in heading, on own line or embedded in text. Rating are calculated from the metacritic score, as used by last.fm, and are only available for albums having such a score (currently ~10,550 albums in total, starting in ~1999). The metacritic score can be independently shown / hidden. Settings are in panel properties (Rating... and Statistics...).

CHG: Refined image shadow effect as suggested by San_dr + improved shadow smoothing.
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2017-04-21 08:34:12
Hello, a small question. Would it be possible with displaying the artist images show the blur background of the cover ???
Thanks
Title: Re: Biography Discussion
Post by: San_dr on 2017-04-21 14:13:32
спасибо, WilB!
Rapid development, convenient application  :))
Title: Re: Biography Discussion
Post by: WilB on 2017-04-22 17:43:18
^ Done. It should be in the next release.
Title: Re: Biography Discussion
Post by: tr0ner on 2017-04-23 12:07:13
Thanks again for the ongoing development Wil!

Is it possible to setup the plugin to also download covers for albums played over Upnp?
I use Foobar with the component foo_upnp (http://www.foobar2000.org/components/view/foo_upnp) Bubbleupnp on my phone to play albums from my foobar library to various devices in my home.

Title: Re: Biography Discussion
Post by: WilB on 2017-04-24 00:26:54
I don't use UPnP, and don't currently have a suitable test set-up to check whether it's possible or what might be involved. It also seems that foo_upnp development has ceased (https://hydrogenaud.io/index.php/topic,69664.2125.html).
Title: Re: Biography Discussion
Post by: redorb on 2017-04-24 09:43:00
Thanks WilB! Really appreciate your great work on Biography panel!
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2017-04-24 11:54:05
^ Done. It should be in the next release.
Merci!
Title: Re: Biography Discussion
Post by: ocram35 on 2017-04-24 15:44:53
Hi WilB - big fan of your superb job! It enhances so much my music experience, to have these nice comments and one can immerse into the artist and the album. Thanks so much!

I have actually two tabs, one for album review, and one for biography, and I run there two frames, one preferring last.fm info, and then AMG. Love to compare their texts. So I have a good solution to see both.

There is one small issue though. Whenever only one source is available, of course I see the same text twice.This leads to my question - is there an opportunity to have a third preference in sources? It could be called "both if available".

I can send you screenshots how the two texts look quite nice, and give a good reading experience, with the two frames.

In any case, many thanks for your constant refinements and improvements!
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2017-04-27 09:15:17
Hi I have a request...
i use multiply tag for artist...in biography view only the first artist will be display...any chance to change automatic the second or more artist? or by click?
Title: Re: Biography Discussion
Post by: YOGAM on 2017-05-03 20:10:32
Hi, this is slightly off-topic (I hope I didn't cross the line). Here is a way to populate genre tags, using biography + MP3Tag sofware.
The idea is to use .txt files generated by biography script. For this, you have to create an "action" in MP3Tag.

ACTION>Action>New the choose a name for the "Action" script.
in the new window :
NEW > Import text file > FIELD = GENRELASTFM / FILE NAME = location of the text file (exemple: C:\foobar2000\wsh_data\artists\%artist%\lastfm\*.txt)
NEW > Guess value > SOURCE FORMAT = %GENRELASTFM% / GUESS PATERN : %dummy%Top Tags%GENRELASTFM%Top Albums%dummy%
NEW > Format value > FIELD = GENRELASTFM / FORMAT = $cutLeft(%GENRELASTFM%,2)
NEW > Replace > FIELD = GENRELASTFM / ORIGINAL =,/REPLACE BY =;)
NEW > Format Value > FIELD = GENRELASTFM / FORMAT =$cutright(%GENRELASTFM%,4)

Select chosen tracks and apply "action". LastFM genres are now stored in GENRELASTFM tag (exemple for BLUE OYSTER CULT, GENRELASTFM should be "Hard Rock; Classic Rock; Rock; Progressive Rock; 70s; Heavy Metal". However they're not yet reconized by Foobar as multi-value tags.

In order to correct this, select all tracks from one artist then, in PROPERTIES, make a change in the GENRELASTFM tag : for exemple, remove unwanted tags  or just add a space, and then remove it. Then click on OK. The GENRELASTFM tags for that artist are now reconignised as multi-value tag.
You have to do this for each artist (I know this may be quite long, but on the other hand, it's a good way to get rid of unwanted tags (e.g: Seen Live, I Owne this Album, The Beatles, or whatever).

That's all !  :D
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-05-03 21:57:35
This is interesting and it works great but you should have started a new thread for it. I want to ask you more about it but I'm not going to do it here since this is Wilb's thread and it would only make it even more off topic. Can a mod make this into a separate topic please? I'd like to know more about this but it has nothing to do with biography so asking here is inappropriate.
Title: Re: Biography Discussion
Post by: YOGAM on 2017-05-03 22:40:21
I created a new thread here : https://hydrogenaud.io/index.php/topic,114029.new.html
Sorry Will!
Title: Re: Biography Discussion
Post by: culinko on 2017-05-05 10:57:31
Hey WilB, thank you so much for this amazing Biography!

I already tweaked the hell out of it, amazing how many settings you added for us. However I still have a couple of questions/requests for you, in hope that the script can be even more amazing.

1. I'd like to be able to add the date tag to album covers from last.fm. I tried adding "date=$meta(date,0)" or "date name=$meta(date,0) to [NAMES] in biography.ini and then using it in "Image [Cover] File Name" afterwards but unfortunately it didn't work.

2. I use underscores for invalid characters in my local album covers. However, your script uses dashes. Is there a way to change this somewhere so it would also use underscores? I tried using the $replace function for each tag in my local cover art script in preferences->display->album art->front cover but strangely it didn't work.

3. I would like to download only 1 image per artist and not 5. I'd really appreciate if there was an option for this in order to save some bandwidth.

Thank you for considering any of the requests, much appreciated!
Title: Re: Biography Discussion
Post by: WilB on 2017-05-05 13:17:51
@YOGAM. I am pleased that the additions you requested have proved useful.

@ocram35. The "both if available" option should be in the next release. There should also be a "Lock To Single Source" option that provides another way to avoid the text falling back to the same source when only one source is found & both review types (or both bio types) are displayed.

@DJ FRANK G. That feature was added a while (https://hydrogenaud.io/index.php/topic,112914.msg935528.html#msg935528) ago (https://hydrogenaud.io/index.php/topic,112914.msg935552.html#msg935552)... To display biographies for multi-artist tags, enable "Show More Tags" ("Menu > Sources > Server Settings > [MISCELLANEOUS] heading > Show More Tags=1" [can also be accessed by directly opening biography.ini]). If there are multiple values, the artist view will then show a discrete watermark style button > click to choose name. This works by expanding all fields referenced by the artist name definition and includes multi-values.

@aeidein New heading choices in the next release will allow rating display in a button, with the allmusic/last.fm button text hidden.

@culinko

1) The following styles should work.
Code: [Select]
Image [Cover] File Name=cover - %date%
Image [Cover] Folder Location=$directory_path(%path%)\%date%
I think the first is on the lines you wanted and adds the date to the file name. The date can also be added to the path as in second example, but due to a bug you'll have to wait for the next release for that method to work, since I forgot to add the ability to create cover paths that don't already exist. Ensure the foobar2000 album art reader is set to recognise whatever you use.

2) The script conforms to the foobar2000 method for replacement of invalid characters for maximum compatibility with the foobar2000 album art reader (documented here (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:File_operations), except doc has an error in that ? is stripped and not replaced by _) .

For information:
/ \ |: get replaced by a -
* gets replaced by x
" gets replaced with ''
< > get replaced by an _
? is stripped

Note that the foobar2000 album art reader will always do these hard coded replacements, and so you can't apply a replace function to the original character, since its already replaced. If you want to continue with your method & use the foobar20000 method that JScript biography also uses, consider adding an extra pattern to the album art reader so both will work. But my recommendation would be to consider just using the foobar2000 method that the script also uses for maximum compatibility.

3) This issue has come up a couple of times. The ability to set the number of artist images fetched should be in the next release.
Title: Re: Biography Discussion
Post by: culinko on 2017-05-05 17:09:19
Thanks very much for your helpful reply!

I've managed to make the date work with the following: "Image [Cover] File Name=album artist name - album name$if(%date%, '['%date%']')" and then adding the following two strings: "'D:\(my path)\'%album artist%' - '%album%$if(%date%, '['%date%']')'.png'" and "'D:\(my path)\'%album artist%' - '%album%$if(%date%, '['%date%']')'.jpg'" to the Front cover search patterns in Foobar2000. Some of my albums are currently missing the date tag, that's why there is the condition, but I will drop it once I fill up the tags properly some day. Btw. do you know if there is any way in Foobar2000 to include both png and jpg so I'd have just one string instead of two separate ones? I know that you can use a wildcard, such as ".*" (I think it should work?), but I would like to list just png+jpg since I don't think there will be any other formats downloaded anyway.

Thanks for letting me know about the Foobar2000 internal replacement, I didn't know it worked like this. However, I prefer underscores to replace every illegal character (even in the mp3 files), so I will have to do what you suggested: "consider adding an extra pattern to the album art reader so both will work". Unfortunately, I don't understand what do you mean by the album art reader. Isn't the album art reader the entry in "preferences->display->album art->front cover" list? If you can point me in the right direction that would be awesome.

Great that you will add the feature for setting the number of artist pictures in the new version!
Title: Re: Biography Discussion
Post by: WilB on 2017-05-05 17:54:01
1) Wildcard is simplest.

2) "preferences->display->album art->front cover" list - yes that's what I mean by the foobar2000 album art reader.
Title: Re: Biography Discussion
Post by: culinko on 2017-05-06 09:22:09
Unfortunately, by modifying the script in preferences->display->album art->front cover I only managed to make ? " < > work, but not : * / \ |

This was my original string for the local cover art: 'Cover\'%album artist%' - '%album%$if(%date%, '['%date%']')'.jpg'
This is the new string: 'Cover\'$replace(%album artist%' - '%album%$if(%date%, '['%date%']'),'?','_',':','_','/','_','*','_','"','_','\','_','|','_','<','_','>','_')'.jpg'

By reading some of the other topics (https://hydrogenaud.io/index.php/topic,71931.0.html and https://hydrogenaud.io/index.php/topic,70522.0.html) I discovered that some of the replacements apparently happen before I can even use my $replace function, but interestingly enough I am using the $replace function in my Panel Stack Splitter (Columns UI) without any problems: $set_ps_global(album.artist.name,$replace(%album artist%,'?','_',':','_','/','_','*','_','"','_','\','_','|','_','<','_','>','_')) works like a charm. Additionally, Lyric Show 3 plugin for Foobar2000 also replaces all invalid characters (except \) with underscores (and using the $replace function replaces that one as well without any problems). Mp3Tag also lets you specify your replacement character with the $validate function. I also tried to use my global variable from PSS (with $get_ps_global) in the album art reader but it wouldn't work either.

Looking at the topics I linked, looks like I am not the only one who likes to use underscores for every illegal character and I really hope it could be done somehow. Is there anything else that can be done in order to make it work? I would be very grateful if this was possible somehow.
Title: Re: Biography Discussion
Post by: WilB on 2017-05-07 18:13:05
Lyrics3 both saves the lyric files and loads them. That's not what's happening here. The script saves the files but cover images are loaded by foobar2000 album art reader. So the save names have to be compatible with the foobar2000 album art reader & significantly in this case its automatic replacements. Note that automatic replacements are done before processing of the album art search pattern (e.g. see foobar2000 FAQ). PSS can also I believe use the foobar2000 artreader: artreader & artreader_front choices.

I ran some tests to check that the script was working correctly.
I created Z:\foobar2000\cover
Bio server settings were set as:
Image [Cover] Folder Location=Z:\foobar2000\cover
Image [Cover] File Name=%album artist% - %album%$if(%date%, '['%date%']')

I set foobar2000 album art front cover pattern as:
Z:\foobar2000\cover\%album artist% - %album%$if(%date%, '['%date%']').*

I played: "Scorpions - Deadly Sting: The Mercury Years" (album artist - album)
Cover saved as: Scorpions - Deadly Sting- The Mercury Years [1987].png
Note : changed to - in cover file name. Cover loaded correctly.
I ran some further tests with other invalid characters & all was fine
So invalid characters were correctly handled.

Your suggestion of changing all invalid characters to _ created problems with foobar2000 album art reader and seemed to completely fail when the invalid character was ?
For example I tried again: "Scorpions - Deadly Sting: The Mercury Years"
This time, : was replaced by _ The resulting cover name was:
Scorpions - Deadly Sting_ The Mercury Years [1987].png
I changed the foobar2000 album art front cover pattern to:
Z:\foobar2000\cover\%album artist% - $replace(%album%,-,_)$if(%date%, '['%date%']').*
That worked and in this case cover loaded. Note that the replace takes account of the foobar2000 internal replacement of : to - and applies the replace on the -
So if the foobar2000 replacement characters are known, then they can be replaced. So you need a replacement function something like: $replace(%album%,-,_,x,_,'',_) But this is unnecessarily complex.
Also with your suggested underscore method I tried: "Scorpions - Deadly Sting? The Mercury Years" as album artist - album. The cover was named Scorpions - Deadly Sting_ The Mercury Years [1987].png, reflecting a replacement of ? to _ But I could not get the foobar2000 album art reader to load the cover upon playing "Scorpions - Deadly Sting? The Mercury Years". The reason seems to be because foobar2000 replaces ? with nothing before the search pattern is processed and so there's no character to be then able to substitute. There may be way round this that I haven't thought of yet.

For an extreme example see here (https://hydrogenaud.io/index.php/topic,112137.msg924099.html#msg924099).

So while its easy enough to change the script so invalid characters are replaced by _ that complicates or breaks interaction with foobar2000 album art reader.

In summary as far as use of this script is concerned you shouldn't have to worry about doing any replacements in order to load the cover, just use the simple title formatting.

HTH
Title: Re: Biography Discussion
Post by: WilB on 2017-05-08 18:28:54
New Version: JScript Biography 0.8 (https://hydrogenaud.io/index.php/topic,112913.msg939193.html#new)

CHANGELOG

CHG: Dark & light themes: blur image background can now be locked to always use that of the cover. Enable in panel properties (Image Blur...).
ADD: "Prefer Both" sources option ("Menu > Sources > Biography or Review"). If enabled, text contains both biographies or both reviews where available. Heading can be clicked or menu used to toggle order. A title auto-shows in this mode to discern text sources. The title & font style can be set in panel properties ("Title...).
ADD: "Lock To Single Source" option for biographies & reviews ("Menu > Sources > Biography or Review"). If locked, heading can still be clicked or menu used to toggle source, but auto fall back to other source is disabled.
CHG: Improved heading: now supports full title formatting for greater flexibility. More choices including option of line after text. Settings are in panel properties ("Heading...").
ADD: %BIO_ALBUMARTIST%, %BIO_ARTIST% & %BIO_ALBUM% to allow use of "Server Settings" in headings. Specific to JScript Biography.
ADD: Quick Access to change text source. Top menu item. Context specific: N/A in image only mode.
ADD: Improvements as an album art viewer, e.g. cover source can now be selected from "Back", Disc", "Icon", "Artist" as well as the standard "Front" (Menu > Sources > Cover).
ADD: Option to set the number of artist images fetched ("Server Settings" [biography.ini]).
ADD: Option to allow rating display in a button, with the allmusic/last.fm button text hidden (panel properties > heading items > set BtnName to 0 Or delete/change button text in panel properties > ADV.Heading... for the required views).

Due to the new requested features, biography.ini will be reset. The previous version will be backed up in the same location. Note the new title format "NAMES" that have been changed to improve clarity and headings. If save paths are altered from the default, ensure the new "Names" are used.

Some panel properties have changed & redundant removed. This affects the heading settings and 1 minor rating property. Defaults unchanged. Export panel properties, before updating, if you need a record.
Title: Re: Biography Discussion
Post by: culinko on 2017-05-08 19:42:03
Many thanks for your continuous effort and for the new version!

I think you might have misunderstood me, because I only want to use underscores to replace invalid characters so my local album covers (that I already have saved on my hdd) can be loaded. I wasn't talking about the new covers fetched from last.fm with your script. These are fine as-is and can be loaded with the Foobar's album art function.

I guess the difference is that my method with the PSS doesn't use the Foobar's album art function. Basically I just define these global variables in the PSS parent panel:

$set_ps_global(artist.name,$replace(%artist%,'?','_',':','_','/','_','*','_','"','_','\','_','|','_','<','_','>','_'))
$set_ps_global(album.name,$replace(%album%,'?','_',':','_','/','_','*','_','"','_','\','_','|','_','<','_','>','_'))
$set_ps_global(album.artist.name,$replace(%album artist%,'?','_',':','_','/','_','*','_','"','_','\','_','|','_','<','_','>','_'))
$set_ps_global(cover.path,$replace(%path%,%filename_ext%,)'Cover\'$get_ps_global(album.artist.name)' - '$get_ps_global(album.name) '['%date%'].jpg')

And then call it with in the designated PSS panel (with the rest of the global variables like cover positions) like this:

$if(%ps_isplaying%,$drawimage($get_ps_global(cover.left),$get_ps_global(cover.top),$get_ps_global(cover.size),$get_ps_global(cover.size),$get_ps_global(cover.path),nokeepaspect,,))

Here is an example of an album ending with a question mark: http://i.imgur.com/fejLKoH.png.

With this method I am able to replace every illegal character with the underscore and the images will load perfectly. My humble request to you would be if you could somehow (perhaps a setting) let users choose if they prefer using the internal art reader (set by default) or this "other" method. I'm not that knowledgeable about this problematic, but if it can be done with PSS, then I assume JScript panel could use that as well. Cheers!
Title: Re: Biography Discussion
Post by: marc2003 on 2017-05-08 19:56:00
Why can't you use a fixed filename like front.jpg or cover.jpg like normal people?  ;D
Title: Re: Biography Discussion
Post by: culinko on 2017-05-10 00:07:48
Apart from ~600 music albums I have, I also have ~2400 individual songs which are in a single directory. For these songs I want to have their covers also in a single directory, so they'd be easily accessible. Therefore their filenames can't have identical names like cover or front. The skin I've been using since I installed Foobar a couple of years ago (foonight) was using this method to display covers (with $drawimage) even before I modified the skin to fit my needs. And since I use underscores to replace invalid characters in all of my files for consistency (songs, lyrics and covers), I would really like to fully benefit from the usage of Biography script's ability to load local cover art as well. I would appreciate it very much if it can be done.
Title: Re: Biography Discussion
Post by: marc2003 on 2017-05-10 04:52:41
Well that's a very unusual way of organising a collection. You could easily use file operations to arrange the files in one folder per album but I'm sure you have inexplicable reasons as to why you can't do that.

Anyway, the component is certainly capable of doing what you want but it would be entirely up to WilB if he wants to modify his script.
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-05-10 07:24:04
Apart from ~600 music albums I have, I also have ~2400 individual songs which are in a single directory. For these songs I want to have their covers also in a single directory, so they'd be easily accessible. Therefore their filenames can't have identical names like cover or front. The skin I've been using since I installed Foobar a couple of years ago (foonight) was using this method to display covers (with $drawimage) even before I modified the skin to fit my needs. And since I use underscores to replace invalid characters in all of my files for consistency (songs, lyrics and covers), I would really like to fully benefit from the usage of Biography script's ability to load local cover art as well. I would appreciate it very much if it can be done.
Why not use a custom tag field where you can use whatever name you like and circumvent the use of special characters?
Title: Re: Biography Discussion
Post by: culinko on 2017-05-10 13:03:30
Creating a custom tag would just be a band-aid in my opinion. Anyway I prefer to store only official tags (+ musicbrainz tags) in my files, then using scripts in Foobar to display stuff that I need to be displayed in a way which I want it to be displayed. That's the greatness with Foobar, its scripting engine is very robust so it can do basically anything.
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-05-10 13:14:34
"a band aid", that's what I used to think until my collection grew and I had too many albums with the same name sharing album covers.
Title: Re: Biography Discussion
Post by: culinko on 2017-05-10 23:03:01
I could see myself adding musicbrainz release id tags to the covers in addition to their current names or something similar once (if) this issue arises for me. For now let's just wait for WilB's decision. As marc2003 said, the component should be capable of doing what I suggested, so all my hope goes to WilB ;)
Title: Re: Biography Discussion
Post by: WilB on 2017-05-12 12:30:29
@culinko

Have you considered using $findfile with PSS?
From PSS wiki
$findfile(path,[path2,path3,...])
Determinates whether the specified file(s) exist(s) and returns the first file. If you do not have the file does not return anything. (Strictly speaking, "false" returns). Path can be specified. The path allows wildcards.

The below should check both the original path & the path with the foobar2000/JScript Biography replacement of illegal characters. An advantage of this is that covers saved are compatible with both foobar2000 album art reader, if ever you want to use that, as well as your PSS configuration.

Code: [Select]
$set_ps_global(artist.name,$replace(%artist%,'?','_',':','_','/','_','*','_','"','_','\','_','|','_','<','_','>','_'))
$set_ps_global(album.name,$replace(%album%,'?','_',':','_','/','_','*','_','"','_','\','_','|','_','<','_','>','_'))
$set_ps_global(album.artist.name,$replace(%album artist%,'?','_',':','_','/','_','*','_','"','_','\','_','|','_','<','_','>','_'))

$set_ps_global(album2.name,$replace(%album%,/,-,\,-,|,-,:,-,*,x,"",'',<,_,>,_,?,))
$set_ps_global(album2.artist.name,$replace(%album artist%,/,-,\,-,|,-,:,-,*,x,"",'',<,_,>,_,?,))

$set_ps_global(cover.path,
$findfile(
$replace(%path%,%filename_ext%,)Cover\$get_ps_global(album.artist.name) - $get_ps_global(album.name) '['%date%']'.*,
$replace(%path%,%filename_ext%,)Cover\$get_ps_global(album2.artist.name) - $get_ps_global(album2.name) '['%date%']'.*
)
)
I removed ' quotes from the code I wrote as I don't think they're necessary & used wild card for extension. I confirmed that $findfile works as stated although haven't tested the actual code, so it might need tweaking.

There is another way if my memory of PSS is correct where you test if your original path exists using $findfile, & if it doesn't exist try & load the image provided by foobar2000 album art reader; i.e. conditionally set whether to use something like %path%,artreader or $get_ps_global(cover.path) in the $drawimage or $imageabs functions.

If those aren't to your liking, then I can tell you how to edit the code so all illegal characters are replaced with an underscore. It should be a simple one line change. I am reluctant to offer it as an option as someone's sure to set it inadvertently & break things + you can solve the issue, I think, by yourself by a small change to the PSS code as indicated.

HTH
Title: Re: Biography Discussion
Post by: culinko on 2017-05-12 17:29:28
I apologize for this but it seems like you misunderstood me again. I don't want to display my local covers + fetched covers from last.fm in PSS. I just described the "PSS method" I use so you can see how the illegal character replacement worked for me not using the foobar's illegal character replacement. The PSS with cover + some basic info is just another panel I use and it's the first one to be displayed as default.

My issue is how can I use the "pss method" in the JScript panel so the "album" section of your Biography script can display my local covers and also the covers fetched from last.fm. With the "pss method" i mean like an ability to use global variables with the JScript panel for the local cover art or something similar. The covers fetched from last.fm are saved and displayed properly with the one line script in the foobar's album art reader so no need to change anything for them.
Title: Re: Biography Discussion
Post by: culinko on 2017-05-12 18:37:37
Oops, sorry for double posting.
Title: Re: Biography Discussion
Post by: WilB on 2017-05-12 20:02:31
Now I think I understand what you mean.

I can probably add a "Custom Cover Path".

So the script would check the normal path as entered in foobar2000 album art reader.

If nothing found it would then check a custom path that you enter, e.g.
Code: [Select]
Z:\foobar2000\cover\$replace(%album artist%,/,_,\,_,|,_,:,_,*,_,\",_,<,_,>,_,?,_) - $replace(%album%,/,_,\,_,|,_,:,_,*,_,\",_,<,_,>,_,?,_) '['%date%']'

Script will check for .jpg, png & .gif extensions

Please confirm this is what you want before I go any further.
Title: Re: Biography Discussion
Post by: culinko on 2017-05-12 22:00:42
Yes, the custom cover path idea is perfect and it's exactly what I had in mind. But I think the scanning needs to be done in the reverse order. I need it to scan the custom path first because the path from the album art reader also loads the covers fetched from last.fm with your Biography script so they would always be displayed first, so my covers wouldn't. I am still missing some covers of my own so I'd really like the last.fm covers to be fetched and displayed as a fallback.

So I imagine the current behavior is something like this:
1. Display local covers via paths from the album art reader
2. If nothing found, fetch the album cover from last.fm
3. The cover from last.fm is now displayed if your album art reader contains the location where it was downloaded

And ideally I would want it to behave like this:
1. Display local covers via paths from the "custom cover path" variable
2. If nothing found, display local covers via paths from the album art reader
3. If nothing found, fetch the album cover from last.fm
4. The cover from last.fm is now displayed if your album art reader (or the custom cover path) contain the location where it was downloaded

You could even add two custom values instead of one to make it consistent with the regular "Image [Cover] Folder" and "Image [Cover] File Name", but it's not necessary for me personally. I just want other people to avoid any confusion as to why the custom cover has both path and file name in one place. The default value could just be empty (e.g. "Custom Image [Cover]=") so nothing is evaluated for people who don't set it up.

Edit: Can I use relative paths for the value? Or do variables like %path% or %filename_ext% work? Because in order for my custom path to work the value would need to look like this:
Code: [Select]
Cover\$replace(%album artist%,/,_,\,_,|,_,:,_,*,_,\",_,<,_,>,_,?,_) - $replace(%album%,/,_,\,_,|,_,:,_,*,_,\",_,<,_,>,_,?,_) '['%date%']'

or this:
Code: [Select]
$replace(%path%,%filename_ext%,)Cover\$replace(%album artist%,/,_,\,_,|,_,:,_,*,_,\",_,<,_,>,_,?,_) - $replace(%album%,/,_,\,_,|,_,:,_,*,_,\",_,<,_,>,_,?,_) '['%date%']'

This is because my folder structure looks like this:
D:\Music\Cover\%album artist% - %album% [%date%].jpg (for covers that belong to individual mp3s that I have)
D:\Music\"album directory"\Cover\%album artist% - %album% [%date%].jpg (for covers that belong to full albums that I have)
Title: Re: Biography Discussion
Post by: culinko on 2017-05-13 00:49:38
Actually, you are correct in that the custom cover path can be scanned after the album art reader and not before, as long as it happens before it evaluates that there is no image and fetches one from last.fm (point 3). As soon as I will be able to set up the custom cover path value, I can just manually remove all covers that have been downloaded from last.fm to ensure they won't be loaded before my covers this way.
Title: Re: Biography Discussion
Post by: Asimov on 2017-05-13 05:21:46
At last I could make the script working in DarkOnev4 theme with the modified script for DarkOne.
Great works!! Thanks a lot WilB for creating such a nice script.

But unfortunately it is not working now after converting the Windows2012 R2 to Core mode. It is working fine in gui mode.
I tried installing JaveRE in core mode but no luck, in GUI mode it works without installing java.
I am getting this message after crushing:

JScript Panel (biography v0.8 by WilB)
Microsoft JScript runtime error:
Automation server can't create object
Line: 1378, Col: 64
<source text only available at compile time>

Any sort of help from our inmates would be highly appreciated.
Thanks once again for this nice script.
Title: Re: Biography Discussion
Post by: marc2003 on 2017-05-13 10:24:20
These scripts need components which are part of Internet Explorer. As IE is not present in core editions, it won't run. Run a desktop OS and you won't have any problems.

And Java is completely unrelated to javascript. If there were any prerequisites to install to make things work, instructions would be provided.
Title: Re: Biography Discussion
Post by: Asimov on 2017-05-13 10:29:55
These scripts need components which are part of Internet Explorer. As IE is not present in core editions, it won't run. Run a desktop OS and you won't have any problems.

But lyrics view panel is working fine!
Now I need to find how to activate IE in core mode.
Thanks for the feedback.
Title: Re: Biography Discussion
Post by: marc2003 on 2017-05-13 10:32:14
I expect any working components are pure C++ and don't need Internet Explorer.
Title: Re: Biography Discussion
Post by: Asimov on 2017-05-13 10:49:25
I expect any working components are pure C++ and don't need Internet Explorer.

Sorry failed to get your point as I am very novice in this field.
Is it possible to activate internet explorer in Windows 2012 core mode so that the scripts could run?
Title: Re: Biography Discussion
Post by: marc2003 on 2017-05-13 11:16:30
I am very novice in this field.

Well stop trying to be a smart arse then. Run foobar on a normal desktop like everyone else.
Title: Re: Biography Discussion
Post by: Asimov on 2017-05-13 11:20:34
I am very novice in this field.

Well stop trying to be a smart arse then. Run foobar on a normal desktop like everyone else.

Thanks for your wise suggestion!!
Title: Re: Biography Discussion
Post by: WilB on 2017-05-16 17:46:00
New Version: JScript Biography 0.8.1 (https://hydrogenaud.io/index.php/topic,112913.msg939562.html#new)

CHANGELOG

CHG: Various refinements, e.g. moved some heading and title settings from panel properties to layout menu to make layout adjustment easier.

ADD: Image [Cover] Check Custom Paths. Default is disabled which gives automatic loading of covers via foobar2000 album art reader and through checking save location, which should suffice for most users. If enabled, additionally checks custom cover paths first. Aimed at users who have front covers saved with illegal character replacement schemes not supported by the foobar2000 album art reader. To use, enable and set paths in "Server Settings" (biography.ini) > ADVANCED heading.

CHG: Album cover auto-download: made set-up easier. Fetched covers are now automatically loaded from the save location, if the location hasn't been added to foobar2000 album art reader front cover search patterns.
Title: Re: Biography Discussion
Post by: culinko on 2017-05-16 22:30:52
Thank you SO MUCH for this! I appreciate your continuous effort very much  ;) . Works perfectly for me with the following script:

Code: [Select]
$replace(%path%,%filename_ext%,)Cover\$replace(%album artist% - %album%,/,_,\,_,|,_,:,_,*,_,",_,<,_,>,_,?,_) '['%date%']'
Title: Re: Biography Discussion
Post by: mjm716 on 2017-05-20 19:01:33
New Version: JScript Biography 0.8.1 (https://hydrogenaud.io/index.php/topic,112913.msg939562.html#new)

I recently updated to .81 from .76 and reviews are no longer appearing?

I initially did not reset the biography.ini paths, so files were writing to the default yttm folder paths.

For example the band !!! (bio *did* download) & album "Shake the Shudder" (review *did not* download).
However there are reviews for both LFM+AM available and they both exist in my previous .76 custom path.

I updated the biography.ini to match my old path structure and after verifying that it was writing there correctly (new artist images appeared) the AllMusic review still did not display, even though the review file "!!! - Shake the Shudder.txt" does exist.
Therefore it is not downloading new review, nor is the old review file displaying.

UPDATE: actually I just noticed a 404 error for the review in the console, but that doesn't explain why it is not displaying the existing review?

any ideas?
Title: Re: Biography Discussion
Post by: WilB on 2017-05-20 19:18:53
If you are using more than one biography panel please ensure that both are updated to 0.8.1 before updating server settings in biography.ini, to make sure there is no interference from the two versions. Perhaps you also need to update the "NAME" definitions as you didn't mention that. When its all installed & updated just finally check server settings are correct after restarting foobar2000 again.

If that doesn't resolve the issue then I need more info:

Please post the settings in biography.ini & a windows explorer screen shot that enables me to see the exact file path and name its trying to load from. Also please also post a screen shot of the music file properties, i.e. metadata showing the tags for artist, album artist & album.
Title: Re: Biography Discussion
Post by: mjm716 on 2017-05-20 21:11:19
If you are using more than one biography panel please ensure that both are updated to 0.8.1 before updating server settings in biography.ini, to make sure there is no interference from the two versions. Perhaps you also need to update the "NAME" definitions as you didn't mention that.

I did update 2 panels and made sure the biography.ini stuck after a restart.

My biography.ini .81:

Code: [Select]
[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=1
Image [Cover] Auto-Fetch=0
[NAMES]
%BIO_ALBUMARTIST%=$if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0))
%BIO_ARTIST%=$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))
%BIO_ALBUM%=$replace($meta(album,0),'(Live) ',)
[PATHS]
Album Review [Allmusic] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\%BIO_ARTIST%\Allmusic
Album Review [Lastfm] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\%BIO_ARTIST%\Lastfm
Biography [Allmusic] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\%BIO_ARTIST%\Allmusic
Biography [Lastfm] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\%BIO_ARTIST%\Lastfm
Image [Artist] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\%BIO_ARTIST%
Image [Cover] Folder Location=$directory_path(%path%)
Image [Cover] File Name=cover

[MISCELLANEOUS]
Album Name Auto-Clean=0
Album Review [Allmusic] Include Partial Matches=1
Album Review & Cover [Lastfm] Use Lastfm Autocorrect=1
Cache Expiry (days: minimum 28)=28
Image [Artist] Auto-Add New=1
Image [Artist] Fetch Number (maximum 20)=20
Image [Artist] Cycle Time (seconds)=15
Lastfm Server=www.last.fm
Lastfm Server Fallback To www.last.fm=0
Mouse Left Button Click: Map To Double-Click=0
Show More Tags=1
Various Artists=Various Artists
[ADVANCED]
Image [Cover] Check Custom Paths=0
Image [Cover] Custom Path 1=
Image [Cover] Custom Path 2=
Image [Cover] Custom Path 3=
Image [Cover] Custom Path 4=
Image [Cover] Custom Path 5=

.76:

Code: [Select]
[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=1
Image [Cover] Auto-Fetch=0
[NAMES]
album artist name=$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))
artist name=$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))
album name=$replace($meta(album,0),'(Live) ',)
[PATHS]
Album Review [Allmusic] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\artist name\Allmusic
Album Review [Lastfm] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\artist name\Lastfm
Biography [Allmusic] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\artist name\Allmusic
Biography [Lastfm] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\artist name\Lastfm
Image [Artist] Folder Location=S:\Jukebox Hero\foobar2000\wsh_lastfm\artists\artist name
Image [Cover] Folder Location=$directory_path(%path%)
Image [Cover] File Name=cover
[MISCELLANEOUS]
Album Review [Allmusic] Include Partial Matches=1
Album Review & Cover [Lastfm] Use Lastfm Autocorrect=1
Cache Expiry (days: minimum 28)=28
Image [Artist] Auto-Add New=1
Image [Artist] Cycle Time (seconds)=15
Lastfm Server=www.last.fm
Lastfm Server Fallback To www.last.fm=0
Mouse Left Button Click: Map To Double-Click=0
Show More Tags=0
Various Artists=Various Artists
Album Name Auto-Clean=0

thanks for your help - you really go above and beyond with your support

btw, I rolled .ini and scripts back to .76 and it works fine (pulls existing reviews and no 404s)
Title: Re: Biography Discussion
Post by: WilB on 2017-05-21 16:53:03
Those server settings seemed fine. However, there is a discrepancy in the album artist definition, but since that apparently isn't being used (based on the info posted) it didn't seem to matter??? I wasn't able to reproduce the issue you reported:

I tested your posted server settings (after just changing drive letter) in a 2 panel layout with artist: !!! and album: Shake the Shudder
1) JScript Biography 0.7.6 & ini labelled as 0.76 > All bios, reviews & artist images were obtained & displayed properly.
2) Next, imported 0.8.1 into both & copied in your 0.8.1 server settings, saved ini & restarted fb2k. All bios, reviews & artist images loaded & displayed properly. I removed them & upon playing tracks all bios, reviews & artist images were obtained again & displayed properly. No 404s.

So essentially, based on that it should work.
Title: Re: Biography Discussion
Post by: WilB on 2017-06-01 17:42:43
New Version: JScript Biography 0.8.2 (https://hydrogenaud.io/index.php/topic,112913.msg940293.html#new): Minor fixes
Title: Re: Biography Discussion
Post by: redorb on 2017-06-02 10:25:03
Thanks WilB!
Title: Re: Biography Discussion
Post by: rd1452002 on 2017-06-19 08:03:27
Is there any way to use MBID to query last.fm API through this script?
Title: Re: Biography Discussion
Post by: PeteG on 2017-06-23 14:12:47
@WilB

An incidental finding:
I've got two albums with the same name: Discipline.
The script isn't able to parse the name correctly, it's shortened to pline, as in

King Crimson - pline
Janet Jackson - pline

Resulting in no reviews.
Found on my up-to-date standard installation and on a fresh, portable foobar2000 1.3.15 + JScript Panel 1.2.3 + Biography script 0.8.2.
...
Further examination suggests that this odd behaviour was introduced in Biography script 0.7.5.
I haven't got any other albums beginning with Disci...; Disco and Discretion and Disclosure are OK.
Can you shed some light on this minor but strange issue?

And thank very much you for the script! (I still use romor's old vbs script as well for nostalgia's sake more or less.)
Title: Re: Biography Discussion
Post by: YOGAM on 2017-06-23 19:27:45
Hi WilB,
Quite often, you're script can't find a review for an album because there is just no review available on Allmusic/Lastfm. I don't know if you're still trying to impove your (great) script, but if you do, it would be great to allow users to copy/paste missing reviews. Marc2003 biography script used to work like this and it was quite a useful feature I think.
Title: Re: Biography Discussion
Post by: RickSteele on 2017-07-06 13:21:03
Hey WilB, great script.

I'm not too familiar with the capabilities of Jscript, so a quick question... Is it possible to add a drop shadow to the text in this script? Could you or anyone else point me to where I would change that, if that's the case?

I've been using the Panel Stack Splitter and you can do it there, but that's using pretty simple title format scripting. I'm just trying to get this script to match the rest of my setup.

Thanks
Title: Re: Biography Discussion
Post by: culinko on 2017-07-07 17:55:52
Hey, it's me again! ;)

I've been enjoying the script for a while now (it rocks!), but found out an odd thing the other day. Even though I have the number of fetched artist pictures set to 1, sometimes it downloads 5 of them and I don't know why. It might be related to me going through different songs fast (just a wild guess), but I feel like this should be addressed anyway. Unfortunately, I can't reproduce it consistently, but if I check my local files after a listening session, I can always find some artists with 5 images instead of just 1. I can provide more information if needed. Thanks for your feedback.
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2017-07-20 12:55:22
Hi, is it possible to change the blur strength of the background artist or cover pic?
LG Frank
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2017-07-26 09:01:59
Hi WilB
For my view by Band (album artist) I'm using;
View by Band // $if2($swapprefix([$meta(band,0)],A,The), 'Non Album')|$if($stricmp($meta(band,0),various artists),,['('%date%') '])%album%[|Disk %discnumber%]|[%tracknumber% ][%track artist% - ]%title%

This works great for albums without a disk number field ie I get;
1st node: band
2nd node: (date) album
3rd node: track number etc

On an album with a disc number I get;
1st node: band
2nd node: (date) album - Disk 1 ((date) album - Disk 2 etc)
3rd node: track number etc

What I'm aiming for is;
1st node: band
2nd node: (date) album
3rd node: Disk 1 (Disk 2 etc)
4th node: track number etc

I hope the above is clear.
Title: Re: Biography Discussion
Post by: WilB on 2017-07-26 19:01:58
New Version: JScript Biography 0.8.3 (https://hydrogenaud.io/index.php/topic,112913.msg942685.html#new)

ADD: Option to set background blur level used by dark & light themes (panel properties: "ADV.Image Blur Background Level...").
ADD: Option to paste in reviews and biographies: Menu > Sources > "Paste From Clipboard". A flag, either "Custom Biography" or "Custom Review", is used to stop JScript Biography from trying to auto-update any custom biographies & reviews and that should be left in place. "Force Update" overrides the flag. Menu items grayed in image only mode or if no clipboard data or required artist / album names missing.
FIX: Rare cases where album names were being incorrectly processed.

@PeteG. Issue should be fixed (see above).
@YOGAM. Added option to copy/paste missing reviews (see above).
@culinko. I suspect auto-add new images is enabled, which would give that behaviour (see documentation). So all you should need to do is disable that. In biography.ini set: Image [Artist] Auto-Add New=0
@DJ FRANK G. Added option to change the blur strength of the background artist or cover pic (see above).
@Rd1452002. Mostly the script is using protocols that don't support MBID.
@Ricksteele. Shadow effects are possible through altering the appropriate gr.GdiDrawText functions, but I didn't find drop shadow helpful - it resulted in the text being less readable. A second preceding line of text with a 1 pixel x & y offset in an opposing colour or other text draw functions that the component provides can be used for shadow effects.
Title: Re: Biography Discussion
Post by: PeteG on 2017-07-27 00:23:12
New Version: JScript Biography 0.8.3 (https://hydrogenaud.io/index.php/topic,112913.msg942685.html#new)
FIX: Rare cases where album names were being incorrectly processed.

@PeteG. Issue should be fixed (see above).
And so it is! Thanks for the update.
Title: Re: Biography Discussion
Post by: redorb on 2017-07-27 10:19:08
Thanks for the update WilB! Much appreciated!
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2017-07-30 08:51:45
Hi WilB
I use several copies of your Biography script. All is working well except...

I store all my music in T:\Music\. When I get some new music I copy it into S:\Inbox\. I then listen to it to see if I like it and then process and tag it before copying it to T:\Music\. Your script quite correctly gathers artist pictures and biogs. whilst I'm listening to music on my S: drive and at the moment creates folders on the T: drive. What I'd like if for the script to detct that the track is on the S: drive and store the pics and biogs. on the S: drive. Then, if I don't keep the music/artist I don't have to delete the folder creted on the T: drive.

So I thought of setting the folder location in biography.ini to:
Biography [Allmusic] Folder Location=$if($stricmp($left(%path%,1),T),T:\Music, S:\Inbox\AATemp)\%BIO_ARTIST%

but this creates a folder 'C:\Music, S-\Inbox\AATemp\'.

It looks like the setting in biography.ini isn't being parsed by foobar's title formatting function.

Any help would be appreciated.
Title: Re: Biography Discussion
Post by: WilB on 2017-07-30 13:51:05
Essentially the parser in JScript biography doesn't support conditional paths & folders (from the biography.ini help: Conditional folders are not supported). May be the parser could be written differently...
Title: Re: Biography Discussion
Post by: TheRealJakoby on 2017-08-13 22:22:40
thank you so much for this!!!!
Title: Re: Biography Discussion
Post by: YOGAM on 2017-08-14 12:20:37
That's great ! Thanks !!!
Title: Re: Biography Discussion
Post by: miras on 2017-08-22 04:24:23
Hi, great script! There's a way to automatically save artist art inside the track directory? With %artist%.* name? Like album art... or the foo_uie_biography...
Title: Re: Biography Discussion
Post by: WilB on 2017-08-22 22:26:10
Automatically saving artist art inside the track directory is not recommended because:

1) Won't work with all music types, e.g. radio streams and YouTube tracks, since there won't be a valid folder location
2) May duplicate artist images in several locations, e.g. if you have more than one album by the same artist

However, you can set the save location to what you like, e.g.
Code: [Select]
Image [Artist] Folder Location=$directory_path(%path%)\%BIO_ARTIST%
Set using right click > menu > sources > server settings > edit biography.ini > save > restart foobar2000. The example, or something similar, may achieve what you asked. But it involves using %path%, which along with other path related functions, is not recommended because of the save incompatibility with radio streams etc. But if you know you never going to play such sources or similar... Choose a folder location that doesn't contain any other images, since all images are loaded from the set folder. Accordingly, to maintain specificity the script won't save to folders where other images pre-exist. The save filenames for the images are automatically generated and cannot be changed.
Title: Re: Biography Discussion
Post by: miras on 2017-08-24 07:38:00
Oh well, thanks!
Title: Re: Biography Discussion
Post by: WilB on 2017-08-24 15:49:15
New Version: JScript Biography 0.8.4 (https://hydrogenaud.io/index.php/topic,112913.msg944079.html#new)

CHG: Custom save locations. Improved file save parser: now supports conditional paths and folders
CHG: Various optimisations

@Black_Over_Bills_Mothers. Feature requested should now be implemented - see above.
@redorb, TheRealJakoby & YOGAM. You're welcome!
Title: Re: Biography Discussion
Post by: WilB on 2017-08-24 19:17:28
New Version: JScript Biography 0.8.4.1 (https://hydrogenaud.io/index.php/topic,112913.msg944089.html#new): Minor fix
Title: Re: Biography Discussion
Post by: redorb on 2017-08-25 08:20:39
Thanks WilB for the update, much appreciated!
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2017-08-25 10:10:02
Thank you very much. It works like a charm! Cheers
Title: Re: Biography Discussion
Post by: novaca on 2017-08-25 10:43:42
Hello,

I have tag %performer% which is put like a name, surmane and also instrument: Steven Isserlis ~ cello
It couldn´t find any BIO information, it works only with name and surname: Steven Isserlis

I would like to save information about instrument. Is there any option? Is it possible to use something similar like:
$puts(spacer,$strchr(%performer%,~))
$trim($left(%performer%,$sub($get(spacer),1)))

And where should I change?

Thanks a lot.
Title: Re: Biography Discussion
Post by: WilB on 2017-08-25 12:11:42
Biographies etc on the sites are filed under individual names, and so including the instrument would be expected to stop the look-up from working, which you found. %BIO_ARTIST% etc define the look-up names & are also used to automatically generate save names.

Your example extracts the performer name & so, e.g. the following could be used (I used $meta... in case there are any multi-value tags).

Code: [Select]
%BIO_ARTIST%=$if3($puts(spacer,$strchr($meta(performer,0),~))$trim($left($meta(performer,0),$sub($get(spacer),1))),$meta(artist,0),$meta(album artist,0),$meta(composer,0))
This includes fall back to checking other fields if performer is absent & can be adjusted according to tags used.

As the save filename is generated from %BIO_ARTIST%, the instrument wouldn't then form part of the filename. I don't actually understand the need for the instrument name to be part of the file save system other than for aesthetic reasons, since the script will always display the bio of the individual name.

But you could include it the folder location if you really want, e.g.:

Code: [Select]
Biography [Lastfm] Folder Location=%profile%\yttm\biography\lastfm\$if2($meta(performer,0),%BIO_ARTIST%)
This includes fall back if performer field is absent.

Setting both %BIO_ARTIST% & the folder location as shown, and setting the tag Performer as Steven Isserlis ~ cello  generates:
Z:\foobar2000\yttm\biography\lastfm\Steven Isserlis ~ cello\Steven Isserlis.txt

To make the changes: use right click > menu > sources > server settings > edit biography.ini > save > restart foobar2000

HTH
Title: Re: Biography Discussion
Post by: novaca on 2017-08-25 12:51:30
Thank you for the quick response.
I used your example and:
If I click on track: OK, I see BIO: Steven Isserlis
But after clicking on MT - More Tags (composer, next performer) There it is mentioned again: Steven Isserlis ~ cello (or next performer ~ instrument) after clicking on, any information...
Do I have something wrong, or it is  another problem?

About filename: here the "instrument" is not desirable (it can lead to duplicates)
I prefer it as it is.

Thanks for your work
Title: Re: Biography Discussion
Post by: novaca on 2017-08-25 15:05:16
By the way, the best I can imagine:
MT shows the full length of the tag performer, but it is link to the short length of tag performer - to get BIO info.
Maybe a bit complicated, but the maximum information for the user...
Title: Re: Biography Discussion
Post by: WilB on 2017-08-25 23:19:51
I did look into your suggestion of having the MT menu item & items obtained being different, e.g. Steven Isserlis ~ cello displays but gets Steven Isserlis. While it's possible, it's really very specific to that one scenario and wouldn't be easily user configurable, + it's rather illogical to normal users. The next release will fix the rare scenarios where the original artist is missing from the MT menu (Steven Isserlis in this case), but that's about as much as I can do. The appearance of Steven Isserlis ~ cello on the MT menu is only faithfully reproducing what's in your tags. You might want to consider optimising tags which will also give the best chance of successful look-ups: e.g. keep %performer% to just that and perhaps use %instrument% for the instrument (one of a myriad of possibilities).
Title: Re: Biography Discussion
Post by: novaca on 2017-08-27 13:18:17
Thank you, I understand.
About tag optimization: if I split into %performer% and %instrument%, then the information who play on witch instrument is lost.

I give one more example of how I imagined that it should work (and why):
I'm listening to "David Bowie" album "The Next Day" track No 9 "Boss of Me" and I think the bass part is great and I want to find out more information > I click on "MT" and I see the performers among "Tony Levin ~ bass" > I click on it and I can read BIO "Tony Levin". On Track 10 I can see that "* ~ bass" is not "Tony Levin", but "Gail Ann Dorsey" ...

I don't think it's illogical but yes, probably rare...
Title: Re: Biography Discussion
Post by: WilB on 2017-08-27 16:14:12
Want you want really needs to be hard coded in the script. During trying it out I wrote the required code. But because the scenario is highly specific, probably to you only, and others may use " ~ " in performer fields in different ways, I don't plan to include it in a release version unless there is more demand.

However I have sent you a pm with the code snippets I wrote & you can edit the script as detailed therein if you wish.

HTH
Title: Re: Biography Discussion
Post by: WilB on 2017-08-27 16:41:13
New Version: JScript Biography 0.8.4.2 (https://hydrogenaud.io/index.php/topic,112913.msg944218.html#new)

CHANGELOG

FIX: More Tags menu (MT): fixed rare cases where %BIO_ARTIST% was missing from the menu list.
FIX: Minor regression.
Title: Re: Biography Discussion
Post by: novaca on 2017-08-27 20:12:10
WOW, thanks a lot. I didn't expect such a quick and detailed answer.
I'll try to implement it and I believe it'll work as I imagined.
If you would find out how to realize something similar to another (more universal) way, it would be fine.
The use of "~" is really irrelevant (I only find it aesthetic)...

Let me have two more questions
1) AllMusic Reviews show "Album Moods", "Album Themes", "Release Date" ... but "Genre" and "Style" not. Is there any reason for that?
2) Do you plan to add "Open Containing Folder" to the context menu? In txt files are the information (see above) that are worth to be in tags. So I could find them more quickly (open, copy and paste). Or is there any other better way to convert them to tags?

Regards
Title: Re: Biography Discussion
Post by: WilB on 2017-08-28 12:51:32
Genre & styles are given for the AM artist biography where it seemed more appropriate and to work better. Since styles are just essentially more genres they're all wrapped in "Genre". The actual AM genre is first in the list followed by the styles.

YOGAM has described how to use the Biography script in order to automatically populate genre tags etc with MP3Tag. See here (https://hydrogenaud.io/index.php/topic,114029.0.html).
Title: Re: Biography Discussion
Post by: redorb on 2017-08-29 08:43:24
Thanks WilB for the update!
Title: Re: Biography Discussion
Post by: FritzLn on 2017-09-01 06:13:50
thanks for this awesome plugin. i've been using 0.4 beta for years. never knew there was an update until now. it's even better!
Title: Re: Biography Discussion
Post by: WilB on 2017-09-05 18:14:31
New Version: JScript Biography 0.8.5 (https://hydrogenaud.io/index.php/topic,112913.msg944573.html#new)

ADD: Tag Writing (BETA)

Various users have expressed a desire to be able to write certain types of info from the biographies and reviews to tags.

YOGAM has described how that can be done with mp3TAG, but that is rather involved & so its now in-built.

Tag writing

SHIFT + right click > menu > Write Tags to Selected Files (grayed if no playlist files are selected)

A summary will show the tags that are to be written. Tags written are multivalue except for Album Rating AllMusic.

Default tag names are:

Album Mood AllMusic
Album Rating AllMusic
Album Theme AllMusic
Genre AllMusic
Genre Last.fm
Similar Artists Last.fm

Tag names used & which tags are written can be set in server settings (biography.ini): [ADVANCED] heading

Works well with library views such as:

View by Genre Allmusic // %<genre allmusic>%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
View by Genre Last.fm // %<genre last.fm>%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
View by Mood // %<album mood allmusic>%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
View by Album Rating // %album rating allmusic%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
View by Theme // %<album theme allmusic>%|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Note:
1) Only writes existing info from already saved bios & reviews. This should work best if you've been using JScript Biography for a while. Files with missing tags can normally be identified by choosing the "?" at the top of the above library views etc
2) Most music file tags are now written with enough padding to accommodate new metadata & so tag updates should be fast. However, if your music files don't have enough padding for the new metadata (& the metadata is at the start of the file), then foobar2000 will need to rewrite the file along with the metadata, which may be slow. This is no different from normal tag writing

Album Rating AllMusic is written on a 0-10 scale to facilitate sorting & so differs from the biography display

As tag writing is a new feature it's recommended to try tag writing on a representative set of files first to optimise settings & ensure its working as required etc. Artist, album artist & album are determined by server settings (biography.ini) for %BIO_ARTIST%, %BIO_ALBUMARTIST% and %BIO_ALBUM%
Title: Re: Biography Discussion
Post by: culinko on 2017-09-07 04:15:06
@culinko. I suspect auto-add new images is enabled, which would give that behaviour (see documentation). So all you should need to do is disable that. In biography.ini set: Image [Artist] Auto-Add New=0
Thanks, everything works perfectly now :)
Title: Re: Biography Discussion
Post by: novaca on 2017-09-08 11:52:05
Tag writing: Great!
I'm looking forward to trying. It saves a lot of time while tagging (and I do not have to leave foobar...)
It's better and better.
Title: Re: Biography Discussion
Post by: novaca on 2017-09-08 21:31:37
Writing tags works just as I imagined.
Thanks for this great update.

Just a few comments:
as you wrote above, Genre & styles are given for the AM artist biography and not for AM album (reviews). This leads to the fact that all albums from one artist have the same genre - which is often not true.
Example:

David Bowie - 1967 David Bowie
from AM Review: Pop/Rock; Art Rock; Contemporary Pop/Rock; Experimental Rock; Psychedelic Pop; Psychedelic/Garage; Baroque Pop; AM Pop
from script: Pop/Rock; Album Rock; Art Rock; Contemporary Pop/Rock; Experimental Rock; Glam Rock; Hard Rock; Proto-Punk; Blue-Eyed Soul; Dance-Rock

David Bowie - 2016 Blackstar
from AM Review: Pop/Rock; Art Rock; Experimental Rock; Contemporary Pop/Rock
from script: Pop/Rock; Album Rock; Art Rock; Contemporary Pop/Rock; Experimental Rock; Glam Rock; Hard Rock; Proto-Punk; Blue-Eyed Soul; Dance-Rock

Thus, it can serve only to search for an artist by genre. To search for the album is not appropriate.
When I'm looking for Glam Rock albums I'm going to get Blackstar from Bowie, which really is not.
if I want to find Glam Rock artists, I get Bowie, which may be true, but I do not know for which album...
---
For AllMusic Rating I have previously used scale 0.5; 1; 1.5 ..... 5
and for viewing stars
Code: [Select]
$if($greater(%ALBUM RATING ALLMUSIC%,0.5),$repeat($char(9733),%ALBUM RATING ALLMUSIC%),)
$if($strstr(%ALBUM RATING ALLMUSIC%,.5),$char(9734),)
$rgb(100,130,150)
$if($strstr(%ALBUM RATING ALLMUSIC%,.0),$repeat($char(9734),$sub(5,%ALBUM RATING ALLMUSIC%)))
$if($strstr(%ALBUM RATING ALLMUSIC%,.5),$repeat($char(9734),$sub(4,%ALBUM RATING ALLMUSIC%)))
Is there any possibility of achieving the same result with scale 1-10?
Title: Re: Biography Discussion
Post by: WilB on 2017-09-09 19:10:22
New Version: JScript Biography 0.8.5.1 (https://hydrogenaud.io/index.php/topic,112913.msg944768.html#new)

ADD: Album reviews now contain top tags or album genre info

CHG: Upgrade Tag Writer to 0.2 BETA

As tag writing is a new feature, it's recommended to try tag writing on a representative set of files first to optimise settings & ensure it's working as required etc. Tags are written from existing info from already saved bios & reviews. This should work best if you've been using JScript Biography for a while.

Further to the feedback available tags that can be written are now:

Album Genre AllMusic
Album Mood AllMusic
Album Rating AllMusic
Album Theme AllMusic
Artist Genre AllMusic
Album Genre Last.fm
Artist Genre Last.fm
Similar Artists Last.fm

Select tags written and change tag names if required in server settings (biography.ini): [ADVANCED] heading. Due to the changes such tag settings will be reset to default

@novaca Regarding the album rating, you ought to be able to redefine it, e.g. something like:
Code: [Select]
$puts(rating,$replace(%ALBUM RATING ALLMUSIC%,10,5.0,1,0.5,2,1.0,3,1.5,4,2.0,5,2.5,6,3.0,7,3.5,8,4.0,9,4.5))$if($greater($get(rating),0.5),$repeat($char(9733),$get(rating)),)$if($strstr($get(rating),.5),$char(9734),)$rgb(100,130,150)$if($strstr($get(rating),.0),$repeat($char(9734),$sub(5,$get(rating))))$if($strstr($get(rating),.5),$repeat($char(9734),$sub(4,$get(rating))))
Title: Re: Biography Discussion
Post by: novaca on 2017-09-09 22:52:27
Your willingness keeps me amazed :)
...as I could forget about $replace...
Thanks
Title: Re: Biography Discussion
Post by: alec.tron on 2017-09-10 01:45:22
This is neat. Thanks for the work you've put into this!

From what I gather, tag writing, i.e. which and to which field is defined globally only  (in " in server settings (biography.ini): [ADVANCED] heading' only) ? so it's not possible as is to quickly decide which of the tag fields ( + values for each field) get written on a given selection case-by-case ?

If that's the case - here's a feature request / feedback thing, in case you are after some:
I'm asking as, in especially some of the more popular releases, there's a lot of tags, many of which are repeats/different spellings or not suitable... also, imo Mood & Theme are somewhat subjective as well... so I would quite often, nearly every case I tested with so far... want to adjust which fields & values exactly get written on a 'write tags' trigger, i.e. pick the ones from the incoming tag cloud quickly that I agree with...
Not sure if that makes sense for others though.

Also, musicbrainz support would be awesome ;)
Again, potentially beyond the scope of this.

Churs.
c.
Title: Re: Biography Discussion
Post by: redorb on 2017-09-10 09:16:28
Thank you WilB for the update! Much appreciated!
Best regards
Title: Re: Biography Discussion
Post by: novaca on 2017-09-10 09:45:16
@alec.tron

I'm for every new feature, but I do not know how much WilB wants to make more tagger from his biography script.
Now added, it does a hybrid, but it's related to biography.
For MusicBrainz I recommend foo_musicbrainz 0.3.9.

The only thing I miss now is the ability to get a composer/writer (or performer in my dreams) for a track (Discogs Tagger can do this, but it is unreliable for me). Getting it from AllMusic would be better (the second line, under the track name for composer/writer). However, this is not a tagger, so I'm grateful for what it allows now (but having an all-in-one solution would be nice...)
Title: Re: Biography Discussion
Post by: YOGAM on 2017-09-20 19:21:39
Thanks so much for the "tag writing feature". I'm glad I won't have to use my "involved" method anymore.
Face it WilB, it's gonna be tricky to find new ideas to improve your script now !

Maybe a nice idea could be to include a allowed genres or (and) forbidden genres... Beyond that, I have no idea what remains to be improved.

Title: Re: Biography Discussion
Post by: YOGAM on 2017-09-20 21:36:48
Well... i tried you're script and though it succeeded to tag few files, I had that error message :
"Quantificateur inattendu (= "unexpected quantifier")
File: <main>
Line: 902, Col: 37
<source text only available at compile time>".

Is there any information I can provide in order to find out what went wrong ?
Title: Re: Biography Discussion
Post by: YOGAM on 2017-09-20 22:20:23
Maybe I tried to tag too much files at once (6000+). I tried again with "only" 2000 files and it seems to work this time.
Title: Re: Biography Discussion
Post by: YOGAM on 2017-09-21 19:59:39
I noticed a bug for the "tag writing" feature : when the tag is generated, quite often, there is an invisible additional special character at the very end.
For exemple if the tag is "Pop/Rock; Art Rock; Prog-Rock; Album Rock", the fist genres will be ok, but the last one will be diplayed in Foobar like this "Album Rock (...)"
I guess this unwanted additional special character is most likely "carriage return" or something similar.
Title: Re: Biography Discussion
Post by: ADDVOiCE on 2017-09-25 13:04:35
Hi
can you help me (I do not find, I am a weak f2k user)....

How can I do that, so that information about the artist is taken from the field ALBUM ARTIST (not from ARTIST)?
Title: Re: Biography Discussion
Post by: YOGAM on 2017-10-01 18:45:15
You should change line 189 :
{name:"%BIO_ARTIST%", tf:"$if3($meta(album artist,0),$meta(artist ,0))
Title: Re: Biography Discussion
Post by: FritzLn on 2017-10-04 20:43:27
anyone having issues with AllMusic Reviews?

Last.FM integration works fine, but when I try to force update AllMusic Reviews i get:

Code: [Select]
JScript Panel (biography v0.8.5.1 by WilB)
JavaScript runtime error:
Access is denied.

File: <main>
Line: 1497, Col: 125
<source text only available at compile time>

edit- alright apparently allmusic is blocking access to their reviews? because i'm trying to use alternate AllMusic review mods and i'm getting similar (access denied) errors
Title: Re: Biography Discussion
Post by: Asimov on 2017-10-05 01:54:26
I am having this crush report in both LastFM & All Music :

JScript Panel (biography v0.8.5.1 by WilB)
JavaScript runtime error:
Access is denied.

File: <main>
Line: 1497, Col: 125
<source text only available at compile time>
Title: Re: Biography Discussion
Post by: Rhyzak on 2017-10-05 07:39:31
I am having this crush report in both LastFM & All Music :

JScript Panel (biography v0.8.5.1 by WilB)
JavaScript runtime error:
Access is denied.

File: <main>
Line: 1497, Col: 125
<source text only available at compile time>
I also get this when switching between tracks that have already played.
Title: Re: Biography Discussion
Post by: marc2003 on 2017-10-05 08:20:42
allmusic has switched to using https rather than http. After updating my own script it works fine. Having said that, mine wasn't crashing - it just showed a console error.
Title: Re: Biography Discussion
Post by: musikomaniak on 2017-10-05 08:54:04
I have crash also.
Code: [Select]
JScript Panel (biography v0.8.5.1 by WilB)
Erreur d’exécution JavaScript:
Accès refusé.

File: <main>
Line: 1497, Col: 125
<source text only available at compile time>
Why, before reload I had JScript Panel (biography v0.7.4 by Wilb) ?
In C:\\Users\AppData\Roaming there is only v0.8.5.1.
Title: Re: Biography Discussion
Post by: marc2003 on 2017-10-05 09:04:11
Why, before reload I had JScript Panel (biography v0.7.4 by Wilb) ?
In C:\\Users\AppData\Roaming there is only v0.8.5.1.

Well I have no idea what you're talking about?? With WilB's scripts, you always paste the entire contents of the script inside the configuration window** and it doesn't use any external files. If you have files in your roaming folder, you must have saved them there yourself.

**all code pasted in to any configuration window gets saved as part of theme.fth if using default UI and configuration\foo_ui_columns.dll.cfg if using Columns UI. But you shouldn't ever open these files.
Title: Re: Biography Discussion
Post by: FritzLn on 2017-10-05 09:09:38
allmusic has switched to using https rather than http. After updating my own script it works fine. Having said that, mine wasn't crashing - it just showed a console error.

thanks. 2 quick edits and it works.

for anyone with problems, there's 2 instances of "http://www.allmusic.com/search/albums/" in Biography 0.8.5.1.txt

just change it to "https://www.allmusic.com/search/albums/"

Title: Re: Biography Discussion
Post by: musikomaniak on 2017-10-05 09:51:10
Well I have no idea what you're talking about?? With WilB's scripts, you always paste the entire contents of the script inside the configuration window** and it doesn't use any external files. If you have files in your roaming folder, you must have saved them there yourself.
**all code pasted in to any configuration window gets saved as part of theme.fth if using default UI and configuration\foo_ui_columns.dll.cfg if using Columns UI. But you shouldn't ever open these files.
Yes I saved myself these folders. Do you think I must delete them? I also have js_marc2003. I don't know where to place them! :)
But this does not explain why in previous crash It was showing biography v0.7.4 by Wilb
Title: Re: Biography Discussion
Post by: marc2003 on 2017-10-05 09:59:52
Well no, you don't extract any files or need to save them anywhere. You simply paste the main script into the configuration window and that's it. You might keep the zip to re-import the script or check the readme but that's it.
Title: Re: Biography Discussion
Post by: musikomaniak on 2017-10-05 10:01:11
Thanks Marc2003  :)
Title: Re: Biography Discussion
Post by: Rhyzak on 2017-10-05 10:04:15
allmusic has switched to using https rather than http. After updating my own script it works fine. Having said that, mine wasn't crashing - it just showed a console error.

thanks. 2 quick edits and it works.

for anyone with problems, there's 2 instances of "http://www.allmusic.com/search/albums/" in Biography 0.8.5.1.txt

just change it to "https://www.allmusic.com/search/albums/"


thanx :)
Title: Re: Biography Discussion
Post by: Lesmo16 on 2017-10-05 12:00:41
Thanks to FritzLn!
Title: Re: Biography Discussion
Post by: Asimov on 2017-10-05 16:17:38
allmusic has switched to using https rather than http. After updating my own script it works fine. Having said that, mine wasn't crashing - it just showed a console error.


thanks. 2 quick edits and it works.

for anyone with problems, there's 2 instances of "http://www.allmusic.com/search/albums/" in Biography 0.8.5.1.txt

just change it to "https://www.allmusic.com/search/albums/"


It worked!
Thanks a lot.
Title: Re: Biography Discussion
Post by: WilB on 2017-10-05 19:28:53
New Version: JScript Biography 0.8.5.2 (https://hydrogenaud.io/index.php/topic,112913.msg945846.html#new)

FIX: AM
CHG: Upgrade Tag Writer to 0.3 BETA. Now uses "UpdateFileInfoFromJSON" newly added by marc2003 that should be much better. Tag writing (SHIFT + right click) now requires JScript panel 1.3.0+
CHG: By default last.fm genre tags are now cleaned up before they're written. This aims to remove non-genre tags from last.fm top tags lists and sort spelling variances. Adjust parameters in "ADV.Last.fmGenreTag ..." in panel properties if required. Switch off clean up therein to write original top tags.

As tag writing is a beta feature, it's recommended to try tag writing on a representative set of files first to optimise settings & ensure it's working as required etc.

@redorb. You're welcome!

@alec.tron. I used an m-TAGS mirror copy of library to try out the different tags. I added the ability to easily create an m-TAGS mirror of library, or to just simply create m-TAGS, to JScript Library Tree. This runs the m-TAGS creator in batch style.

@YOGAM.

I couldn't reproduce either issue. Hopefully the issues should be resolved by the new "UpdateFileInfoFromJSON", which runs as a single process, and reworking of the match methods. If either reoccur, it would be helpful if you could post the info that's being read from example text files that cause the issue, whether they're custom made, corresponding artist/album artist/album names and the content of the problem tag if available.

@ADDVOiCE.

Shift + right click > menu > Sources > Server Settings > opens biography.ini
Under [NAMES] heading set %BIO_ARTIST% as required, e.g.
%BIO_ARTIST%=%album artist%
Save biography.ini & restart foobar2000
Title: Re: Biography Discussion
Post by: redorb on 2017-10-07 10:39:07
@WilB 
In foobar JScript Panel Configuration says @version "0.8.5.2"
JScript panel 1.3.0 is installed.
But in C:\Users\*****\AppData\Roaming\foobar2000\yttm\ biography.ini says version 0.8.5.1.
Did a reset and then imported the 0.8.5.2 version.
Everything works just fine and I can't tell if anything is broken.
Maybe just a typo?

Thanks for the update and best regards.
Title: Re: Biography Discussion
Post by: musikomaniak on 2017-10-07 12:04:26
Same thing for me.
Title: Re: Biography Discussion
Post by: WilB on 2017-10-07 16:42:26
They're independent version numbers & so all is correct and OK.  Normally I have only changed the ini version number when its content was updated. However, I will try and keep the version numbers aligned in future versions.
Title: Re: Biography Discussion
Post by: musikomaniak on 2017-10-07 18:35:17
Thank you.
Anyway it works perfect  :D
Title: Re: Biography Discussion
Post by: redorb on 2017-10-08 09:59:25
@WilB
Great, it works perfect!
Thanks!
Title: Re: Biography Discussion
Post by: timmytucker718 on 2017-10-08 18:52:46
Is there anyway to use this to fetch album art to my Music Library\Artist\Album directory?  One of my favorite features of the old biography component was that it could fetch album art automatically. 
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-10-08 21:57:24
Yes, it fetches album artwork from last.fm. Changing folder download location is done in Biography.ini (right click, sources, server settings or find biography.ini in your foobar2000 folder) by changing Image [Cover] Folder Location=$directory_path(%path%).
Title: Re: Biography Discussion
Post by: obsidian1066 on 2017-10-22 13:10:17
No longer receiving reviews from allmusic.
Title: Re: Biography Discussion
Post by: nanogirl21 on 2017-10-26 03:29:52
Hi,

I am new and have been trying to figure out how to install and run the script to Foobar2000. I am looking to write genre and style tags for my mp3 files with data specifically from AllMusic.com . From what i've read this script sounds like what I need. I have messed around in Foobar2000 and have searched for instructions on how to get this running, but I am having a hard time. Can someone please help me. I already downloaded Biography 0.8.5.2 and foo_jscript_panel-v1.3.0.fb2k-component .
Title: Re: Biography Discussion
Post by: nanogirl21 on 2017-10-26 08:16:18
I actually managed to get this working. Just confused on how to save the genre information into the MP3 tags.
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-10-26 09:16:35
This component does not write tags. What gave you that impression?
Title: Re: Biography Discussion
Post by: nanogirl21 on 2017-10-26 09:21:21
Thank you. That is good to know. I guess I shouldn't assume that this comment write/save tags. As stated before I am new to using this program.

Do you know a component that is able to save Genre/Style tags from AllMusic? That is my main goal.
Title: Re: Biography Discussion
Post by: marc2003 on 2017-10-26 09:31:32
This component does not write tags. What gave you that impression?

I suspect these posts mentioning tag writing as a feature would give most people the impression it can write tags.

https://hydrogenaud.io/index.php/topic,112914.msg944573.html#msg944573
https://hydrogenaud.io/index.php/topic,112914.msg944768.html#msg944768
https://hydrogenaud.io/index.php/topic,112914.msg945847.html#msg945847

@nanogirl21 , I don't use this script myself but the instructions seem clear enough in the readme??

@obsidian1066 , try the latest version of the script. There was an issue with allmusic but it has been fixed.

Title: Re: Biography Discussion
Post by: nanogirl21 on 2017-10-26 09:44:20
This component does not write tags. What gave you that impression?

I suspect these posts mentioning tag writing as a feature would give most people the impression it can write tags.

https://hydrogenaud.io/index.php/topic,112914.msg944573.html#msg944573
https://hydrogenaud.io/index.php/topic,112914.msg944768.html#msg944768
https://hydrogenaud.io/index.php/topic,112914.msg945847.html#msg945847

@nanogirl21 , I don't use this script myself but the instructions seem clear enough in the readme??

@obsidian1066 , try the latest version of the script. There was an issue with allmusic but it has been fixed.



Thank you for posting those links. I was able to write the tags that I was looking for! Simple Shift + Right Click and then select write tags.

Looks like these tags and be saved
Write Tag: Album Genre AllMusic
Write Tag: Album Mood AllMusic
Write Tag: Album Rating AllMusic
Write Tag: Album Theme AllMusic
Write Tag: Artist Genre AllMusic
Write Tag: Album Genre Last.fm
Write Tag: Artist Genre Last.fm
Write Tag: Similar Artists Last.fm
Title: Re: Biography Discussion
Post by: nanogirl21 on 2017-10-26 16:16:13
New Version: JScript Biography 0.8.5.2 (https://hydrogenaud.io/index.php/topic,112913.msg945846.html#new)

I'm trying to save tag information from All Music. Unfortunately, only Last.FM is populating. The reviews & info coming from All Music isn't showing for most of my collection. I searched the site and the artist is defiantly on the All Music website (example: Aaliyah). Is there something that I need to change in settings to have the All Music info show?

Also, is it possible to overwrite the current album art and replace with large high res images?
Title: Re: Biography Discussion
Post by: WilB on 2017-10-30 13:40:36
@nanogirl21:

Because there can be more than one artist with the same name, am biographies first search and match the album name to increase the likelihood of finding the correct artist, and thus depend on matching the album name. Therefore if the album name is absent or there are spelling variances that the partial match can't handle, artist biographies won't be found either. The script does also run some additional checks to stop it searching frequently for items that can't be found, but that shouldn't be the reason. Anyway, that can be bypassed with "sources > force update". If the above don't account for the issue then I don't know: no one else has reported an issue & I just confirmed the am site is working fine, e.g. "Aaliyah - Aaliyah"; "Aaliyah - Ultimate Aaliyah" gave bios & reviews. For info last.fm biographies usually include all artists with the same name and so only an artist search is done.

Album art: the aim is to search for missing album art. I am not keen on adding an overwrite option, since if users make a mistake all potentially carefully obtained album artwork could be lost. Also while its possible to compare sizes of pre-existing covers to new, cover quality doesn't always relate to size. There are plenty of poorly prepared large covers out there. If you really want new album art, you can force the script to obtain it by stopping the current covers being found. To do that:
1) In foobar2000 preferences\display\album art\front cover: temporarily comment out (i.e. put // at start of each line) your front cover patterns.
2) Ensure the direct check by the script can't find the cover either by ensuring the save cover name is unique, e.g. set "Image [Cover] File Name=new_cover" in biography.ini (Server Settings). The script should then search and save new covers with the save name new_cover.

Of course its also possible to force the script to obtain new covers by renaming existing to something not recognised (e.g. use a mass renamer tool such as renamer), or even deleting them, but I wouldn't do that until you're sure you have a better one.

HTH
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-11-18 04:00:58
@WilB I wanted to get 5 similar artists tagged instead of 4 so I tried changing the limit attribute here to 5 but I'm still getting only 4 similar artists.

Code: [Select]
var URL = "http://ws.audioscrobbler.com/2.0/?format=json" + p.lfm + "&method=artist.getSimilar&artist=" + encodeURIComponent(artist) + "&limit=5&autocorrect=1";

Also, from what I gather from the Lastfm API documentation it seems possible to retrieve artist mbid from last.fm. Can you include writing those to tags in your next release?
Title: Re: Biography Discussion
Post by: IWSNX on 2017-11-19 13:54:16
hey guys, so I have a problem with the loading of artist pictures since about a month now.
Everytime I change to a new track from another artist I get this error. Is there any solution? (it says runtime error in JavaScript)
If I click on the right top corner (green circle) and click on reload it works just fine.



(https://i.imgur.com/vJGJvKy.png)
Title: Re: Biography Discussion
Post by: marc2003 on 2017-11-19 14:47:50
Your version number is some way behind the latest. I'd try that first.
Title: Re: Biography Discussion
Post by: IWSNX on 2017-11-19 15:29:36
Thanks, you're right, I thought I already used the newest version but added it the wrong way. It works again. THANKS ;)
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2017-12-03 15:55:25
@WilB
Been using your script now for several months and love it - thanks.

One thing I've noticed is that over the years I have used several different ways to download artist art. I know your script has the Image '[Artist] Fetch Number (maximum 20)' setting which seems to limit new images downloaded. Could we have a way to limit the total number of images after download and if exceeded automatically remove the oldest ones. This would ensure that we have only the latest images. Obviously not for everyone so I guess it would need to be a server setting in the .ini file.
Title: Re: Biography Discussion
Post by: woolybully on 2017-12-24 04:49:02
Thanks for the this awesome feature. It works great for the majority of my albums, except one which I will describe below:

When I have a compilation album where I put "album artist" as "Various Artists" and each track has its own, properly tagged "Artist" field, the biography panel shows the info for "Various Artist", essentially explaining what "Various Artists" means. Obviously, it would be much more helpful and useful if the biography panel would actually use the "Artists" tag and display information for the actual artist of the track.

It seems that this biography plugin is configured to prioritize using "Album Artist" over "Artist" tag in determining whose info to display. How do I make it do the reverse and prioritize looking up info on the "Artist" tag?
Title: Re: Biography Discussion
Post by: WilB on 2017-12-24 12:18:07
@jazzthieve: tag writing. The next version will enable setting the number of similar artists that can be written. I did look into obtaining mbids from last.fm. However, they weren't always accurate. In particular, in cases where there is more than one artist of the same name, incorrect obscure mbids were often returned for reasonably popular artists, even if the search included both album & artist names.

@Black_Over_Bills_Mothers. The requested feature should be in the next release.

@woolybully
It should just work as you want with default settings. I just checked my various artists albums and they're displaying fine, e.g.

Album Artist=Various Artists
Artist=Boston
Displays biographies for Boston

For info lfm look-ups for biographies always use whatever is defined for %BIO_ARTIST% in server settings (right click >sources > server settings [opens biography.ini]). The default is to check the artist field first. AM look-ups for both bios & reviews require matching an album name to facilitate discerning artists of the same name, and these look-ups use %BIO_ALBUMARTIST% - %BIO_ALBUM%. However, once bios are obtained %BIO_ARTIST% is used for loading the bios and %BIO_ALBUMARTIST% - %BIO_ALBUM% for loading the reviews.

Check the server settings especially the %BIO_ARTIST% and %BIO_ALBUMARTIST% definitions, if you've changed them. You can always reset server settings (biography.ini) to default values (rename biography.ini to something so you have a back-up & restart foobar2000 to create a new one with default settings). Biography.ini should be in foobar2000\yttm\biography.ini.

If, after ensuring server settings are at default values, the issue persists, then I need more info. Please post a screen shot of properties so I can see all the metadata and also post the server settings.
Title: Re: Biography Discussion
Post by: jazzthieve on 2017-12-24 12:22:16
@jazzthieve: tag writing. The next version will enable setting the number of similar artists that can be written. I did look into obtaining mbids from last.fm. However, they weren't always accurate. In particular, in cases where there is more than one artist of the same name, incorrect obscure mbids were often returned for reasonably popular artists, even if the search included both album & artist names

Thanks for getting back at me for that. About the mbids, oh well, perhaps in the future when it gets more accurate.
Title: Re: Biography Discussion
Post by: woolybully on 2017-12-24 16:42:23
@woolybully
It should just work as you want with default settings. I just checked my various artists albums and they're displaying fine, e.g.

Album Artist=Various Artists
Artist=Boston
Displays biographies for Boston

For info lfm look-ups for biographies always use whatever is defined for %BIO_ARTIST% in server settings (right click >sources > server settings [opens biography.ini]). The default is to check the artist field first. AM look-ups for both bios & reviews require matching an album name to facilitate discerning artists of the same name, and these look-ups use %BIO_ALBUMARTIST% - %BIO_ALBUM%. However, once bios are obtained %BIO_ARTIST% is used for loading the bios and %BIO_ALBUMARTIST% - %BIO_ALBUM% for loading the reviews.

Check the server settings especially the %BIO_ARTIST% and %BIO_ALBUMARTIST% definitions, if you've changed them. You can always reset server settings (biography.ini) to default values (rename biography.ini to something so you have a back-up & restart foobar2000 to create a new one with default settings). Biography.ini should be in foobar2000\yttm\biography.ini.

If, after ensuring server settings are at default values, the issue persists, then I need more info. Please post a screen shot of properties so I can see all the metadata and also post the server settings.

Yup, just renaming/deleting biography.ini solved it! The one included in my theme must have prioritized album artist, sorry for the bother!
Title: Re: Biography Discussion
Post by: Nighthawk_NL on 2018-01-02 16:13:04
Happy New Year to you all

I have tried to load this script in Foobar v1.3.17 (Darkone 3.1 Mod) I also watched the Youtube video but when I go to Components and click on the JScript Panel v1.3.2.2 I don't get the option to enter the script only the about info when I right click and no screen popup like in the Video. Can anyone tell me what I am doing wrong ? Many thanks in advance.
Title: Re: Biography Discussion
Post by: WilB on 2018-01-03 12:21:54
You need to click on the JScript panel in the layout, assuming that Darkone 3.1 Mod has it added, and NOT on "components > JScript panel". If JScript panel has not been added to the layout you need to replace the defunct Biography View Panel in the layout with a JScript panel. I did it for DarkOne v4 (https://hydrogenaud.io/index.php/topic,112914.msg937148.html#msg937148), which can be used after importing JScript Biography 0.8.5.2.
Title: Re: Biography Discussion
Post by: Nighthawk_NL on 2018-01-05 08:27:34
Goodmorning,

Can you tell me how to replace the defunct Biography View Panel in the DarkOne 3.1 layout with a JScript panel. You say: I did it for DarkOne v4, which can be used after importing JScript Biography 0.8.5.2.

Many thanks in advance.
Title: Re: Biography Discussion
Post by: WilB on 2018-01-05 11:59:05
You will have to work out how to do that as I am not familiar with DarkOne v3.1 Mod. But in general, these are panel stack splitter based layouts...
- Go to foobar2000 preferences\columns ui\main. Under FCL importing & exporting, export your current layout so you have a back-up.
- Ensure you have installed JScript panel.
- Go to foobar2000 preferences\columns ui\layout, locate foo_uie_biography panel, add a JScript panel to the same parent panel stack splitter. Right-click the JScript panel and move it up until its directly above foo_uie_biography.
- Select the parent panel stack splitter and choose configure. It's most important that the next steps are carefully followed.
- In the PanelList, select the JScript panel. Ensure the caption name and all settings for JScript panel are identical to those used by foo_uie_biography. Pay particular attention to the force layout setting. Press OK to close the window.
- Right-click foo_uie_biography and remove it from the panel stack splitter.
- Click OK to load the columns ui layout. Hopefully it will look OK. But if the layout appears garbled it's likely to be because:
    1) The panel stack splitter settings are wrong. Sometimes panel stack splitter settings don't initially stick, or you may have entered them incorrectly. Go back to the parent panel stack splitter and ensure all settings are correct, especially the JScript panel position, it's caption name & forced layout setting. You may need to export the FCL file & re-import the back-up to compare.
    2) You didn't modify things correctly. Again you may need to export the FCL file & re-import the back-up to compare.
It's then a simple matter of importing the JScript Biography script into the new JScript panel.
Title: Re: Biography Discussion
Post by: Mrakobes on 2018-01-10 21:31:30
I use
JScript Panel v2.0.0-Beta3 by marc2003
Based on WSH Panel Mod by T.P. Wang

Build: 12:19:16, Jan  5 2018
Columns UI SDK Version: 6.5

I installed all day in various ways, does not work in any way (in WSH Panel Mod old - too)

JScript Panel v2.0.0-Beta3 (biography v0.8.5.2 by WilB)
Microsoft JScript execution error:
The object does not support this property or method
File: <main>
Line: 71, Col: 38
<source text only available at compile time>
Title: Re: Biography Discussion
Post by: WilB on 2018-01-10 22:48:49
A number of breaking changes were made in JScript 2.0.0, that's still in beta, so that most scripts require editing to work with it. I am not sure that it's recommended for general users to use the beta yet (?). I have upgraded my scripts so that they work with JScript panel v2.0.0, and I will release the updated versions once the new version of JScript is ready for proper release or its confirmed somewhere that the beta is suitable for general users. For the time being I suspect its best to stick with JScript panel v1.3.2.2 and scripts that are compatible with that version, which will avoid experiencing problems of the type you have encountered.

Regarding the beta there is still the following warning in place, although I've been using it for a while without issue.
Quote
JScript Panel v2 (beta): There are plenty of breaking changes so only people who know how to edit their own scripts should even consider this. Testing on a portable install would be a good idea!!
Title: Re: Biography Discussion
Post by: Mrakobes on 2018-01-11 10:25:34

thanks, I will wait for your updates
Title: Re: Biography Discussion
Post by: pIv on 2018-01-23 12:51:38
Wilb,
After the release of the JScript plugin version 2.0.1 I've updated the script text in accordance with the recommendations of Mark2k3.
The script works fine when I turn off theme in the layout. But if I choose light or dark themes all the images are shifted in the upper left corner of the window.
What should I do to fix this?
Title: Re: Biography Discussion
Post by: WilB on 2018-01-23 13:36:53
There will be an updated version shortly.
Title: Re: Biography Discussion
Post by: Sergey77 on 2018-01-24 13:12:40
There will be an updated version shortly.
Dear WilB,
I'm looking forward to the new version.
could you in a new version of Biography script make switch of text languages ?

Best Regards.
Title: Re: Biography Discussion
Post by: pIv on 2018-01-24 16:02:34
Sergey77,
you mush change Lastfm Server= in yttm\biography.ini

Lastfm Server: change for biographies & album reviews in different languages. Known Last.fm Servers: www.last.fm, www.last.fm/de, www.last.fm/es, www.last.fm/fr, www.last.fm/it, www.last.fm/ja, www.last.fm/pl, www.last.fm/pt, www.last.fm/ru, www.last.fm/sv, www.last.fm/tr and www.last.fm/zh.
Title: Re: Biography Discussion
Post by: WilB on 2018-01-24 18:02:24
^^^ Note that JScript Biography 0.8.5.2 and earlier versions won't work with JScript panel v2+.
Title: Re: Biography Discussion
Post by: WilB on 2018-01-24 18:33:09
@Nighthawk_NL. Thanks for the pm. I have now modified the theme for you.

DARKONE 3.1 modified to work with JScript Biography.

All original credit to tedgo.

To use:
1) You HAVE TO install tedgo's DarkOne v3.1 according to tedgo's instructions here. (https://tedgo.deviantart.com/art/DarkOne-v3-1-187628705). This is required so that all the necessary stuff is in place. From tedgo instructions: ensure you BACKUP YOUR EXISTING COMPONENTS, CONFIGURATION FILES AND THEMES BEFORE EXECUTING THE SELF-EXTRACTING ARCHIVE!

2) Ensure JScript panel 2.01+ (https://github.com/marc2k3/foo_jscript_panel/releases) is installed.

2) Import the below fcl file: foobar2000 preferences > columns ui > main tab.

For anyone interested in DarkOne v4 (https://hydrogenaud.io/index.php/topic,112914.msg937148.html#msg937148), I previously modified it to work with JScript Biography. That can be used with JScript panel v2.0.1+ after importing JScript Biography 0.9. Since this is upgrading from a rather old version of JScript Biography, clear panel properties to get a fresh clean set (right click > panel properties > clear).
Title: Re: Biography Discussion
Post by: WilB on 2018-01-24 18:41:31
New Version: JScript Biography 0.9 (https://hydrogenaud.io/index.php/topic,112913.msg951759.html#new)

CHANGELOG

ADD: Image reflections (enable: right click > menu > image).
- Strength/size/gradient are configurable; e.g. gradient = 0 gives whole reflection at the same level; 100 gives a sharp transition.
- Default is full size light fill. For something like NG Playlist, try: Strength,30,Size,30,Gradient,30
- Settings are in panel properties ("Image Reflection..."). Strength can also be adjusted by shift + mouse wheel over image.

ADD: Two style engines are now supported.

1) Auto, as before. Straightforward style that is used by the top, left, bottom or right preset styles.

2) Freestyle. Offers drag style positioning of image & text boxes, plus supports text overlay.
For a freestyle layout choose:
- "Layout > Overlay" preset.
- or "Layout > Create & Manage Styles > Create New Style". The new style is based on the current layout.

Press CTRL to alter layouts (requires mouse-over + panel focus [e.g. click it]). Also shows name & type.

ADD: Choice of overlay effects for use with freestyle layouts.
- Fade (default): fades image into background & offers gradient effects.
- Rectangle & round rectangle: semi-transparent or solid fills +/- rim (border) with custom colour support.
- Most overlay settings are in panel properties ("Overlay..."). Strength can also be adjusted by shift + mouse wheel over text.

ADD: Ability to create/rename/delete/export/reset CUSTOM layout styles (right click > menu > layout).

ADD: Bios & reviews can use different layouts; e.g. try bios > "overlay"; reviews > "top" with reflection.

CHG: Upgraded "More Items" button:
- Now shows Similar artists & Top Albums, previously only listed in the text, as well as "More Tags" as before.
- Click to load bios, reviews & images or cycle items.
- Use "Menu > Sources" to display button (default hidden). Button shows top left and can be resized (CTRL + mouse wheel over button).
- Set heading titleformat to show info type if required (e.g. Similar Artist, Top Album): see documentation for examples.
- Enable a separate cache for novel look-ups, if required.*

ADD: Image [Artist] Cache Limit: limits number of images stored to value set. If used with auto-add, newer images are added & older removed to give a fixed number of up-to-date images.*

CHG: Similar Artists ("Tagger" & "More Items Menu"). Number used can now be set*. If writing >20 similar artists to tag, it's likely to be necessary to increase size limits in "LargeFieldsConfig.txt" for correct operation.

All tag writing (shift + right click) is from saved sources and will work best if JScript Biography has been used for a while.

CHG: Themes are now in a sub-menu (right click > menu > layout > themes) + added a blend theme.

CHG: Altered numbering system for biography.ini version.

CHG: Last.fm language can now be set with "right click > menu > sources", as well as in server settings (biography.ini). Biography.ini also has a setting to automatically fallback to trying the English server if there are no results, as before*. The other source is only available in English.

FIX: Compatibility with JScript Panel v2.0.1.

* Settings: "menu > sources > server settings" (biography.ini).
Title: Re: Biography Discussion
Post by: Sergey77 on 2018-01-25 15:52:55
Sergey77,
you mush change Lastfm Server= in yttm\biography.ini

Lastfm Server: change for biographies & album reviews in different languages. Known Last.fm Servers: www.last.fm, www.last.fm/de, www.last.fm/es, www.last.fm/fr, www.last.fm/it, www.last.fm/ja, www.last.fm/pl, www.last.fm/pt, www.last.fm/ru, www.last.fm/sv, www.last.fm/tr and www.last.fm/zh.
pIv, I didn't know, thanks for the tip.

WilB, Thank You very much for your great work - JScript Biography!
this is exactly what I dreamed (and many other people, I think) to see for the fb2k.
I will test and use this script. If I'll have suggestions of improvement, I'll write ))).

Best Regards.
Title: Re: Biography Discussion
Post by: uberunit on 2018-01-25 21:15:38
New Version: JScript Biography 0.9 (https://hydrogenaud.io/index.php/topic,112913.msg951759.html#new)

Hi @WilB, greatly appreciate your efforts to revive the BIO in DarkOne v4.0.  Text bios are showing up without issue but Artist images aren't being fetched; I'm just seeing the default No Photo image permanently.  I have tried my best to follow the steps correctly by reading through the 12 pages (I was late to the party) but there is a lot of info so I must be missing a step or doing something wrong.

I'm doing clean standard installs and these are the steps I take and component versions used:

- Install foobar2000_v1.4_beta_3
- Install DarkOne v4.0 as per Tedgo's method
- Load Tedgo's DarkOne v4.0 FCL
- Install JScript ("foo_jscript_panel-v2.0.1-Beta1.fb2k-component")
- Install your DarkOne v4.0 JScript Biography Version FCL
- Update Biography to v0.9 via Configure > Tools

Apologies for having to ask for your assistance - I've checked Server Settings for issues but the default looks to be in order.  Thanks in advance for any help you can offer!
Title: Re: Biography Discussion
Post by: jazzthieve on 2018-01-26 07:55:46
It seems writing to tags isn't able to write to multiple artists at once and also It seems to only write to currently playing artists. I didn't experience that with previous versions. Is this normal behavior or did I mess something up with the settings?
Title: Re: Biography Discussion
Post by: WilB on 2018-01-27 18:00:38
New Version: JScript Biography 0.9.0.1 (https://hydrogenaud.io/index.php/topic,112913.msg951950.html#new)

@jazzthieve. I have fixed an issue with writing similar artists to tag & that hopefully sorts the problem. Note that tag writing is only from saved sources. If writing > 4 similar artists, the similar artists list has to already exist, and in this mode there is no fall-back to writing the 4 in the biography so that missing ones can be more easily identified. Thanks for reporting.

@uberunit. I couldn't reproduce the issue with DarkOne v4. It just worked for me through the route you used. Occasionally, lfm servers don't respond very quickly or perhaps there could be an issue with the artist name you used. To rule out a problem with the biography.ini, try renaming it to something so you have a back-up & restart foobar2000 to create a new one with default settings. Biography.ini should be in foobar2000\yttm\biography.ini. I would also remove it if you decide to try the new version below.

New DarkOne v4.0 - modified with JScript Biography 0.9.0.1.

All original credit to tedgo.

To use:
1) You HAVE TO install tedgo's DarkOne v4 according to tedgo's instructions here (https://tedgo.deviantart.com/art/DarkOne-v4-360862076). This is required so that all the necessary stuff is in place. From tedgo instructions: ensure you BACKUP YOUR EXISTING COMPONENTS, CONFIGURATION FILES AND THEMES BEFORE EXECUTING THE SELF-EXTRACTING ARCHIVE!

2) Ensure JScript panel 2.0.1+ (https://github.com/marc2k3/foo_jscript_panel/releases) is installed.

3) Import the below fcl file: foobar2000 preferences > columns ui > main tab
Title: Re: Biography Discussion
Post by: redorb on 2018-01-28 10:09:08
Hello WilB!

I get this error when trying to install JScript panel 2.0.1+
https://frupic.frubar.net/shots/36392.jpg
JScript panel 1.3.2.2 and JScript Biography 0.8.5.2  works just fine.
Using foobar2000 v1.3.17

More info:
Also tried "DarkOne v4.0 - Tedgo - JScript Biography Version (0.9.01) - Modified by WilB.fcl"
and get this error:
https://frupic.frubar.net/shots/36393.png

What can I do?

Best regards
Title: Re: Biography Discussion
Post by: Jailhouse on 2018-01-28 15:31:47
JScript Panel 2 requires foobar2000 1.4 (currently beta) and above.
Title: Re: Biography Discussion
Post by: kode54 on 2018-01-29 00:18:11
How did you force that? Just so anyone knows, the current SDK defaults to only requiring 1.3 or newer.
Title: Re: Biography Discussion
Post by: WilB on 2018-01-29 00:46:55
JScript panel is used to run it, and that now requires foobar2000 1.4. You would need to get an answer from marc2k3 (https://github.com/marc2k3/foo_jscript_panel/releases) as to how and why he did it, as JScript panel is his plug-in.
Title: Re: Biography Discussion
Post by: Jailhouse on 2018-01-29 03:11:04
How did you force that?
It's in marc2k3's changelog. I believe he did it because he's making a lot of breaking changes.
Title: Re: Biography Discussion
Post by: redorb on 2018-01-29 09:43:46
JScript Panel 2 requires foobar2000 1.4 (currently beta) and above.
OK, that explains it. I'll probably wait for a stable realease of foobar2000.
Title: Re: Biography Discussion
Post by: Fladder72 on 2018-01-30 18:39:53
JScript Panel 2 requires foobar2000 1.4 (currently beta) and above.
OK, that explains it. I'll probably wait for a stable realease of foobar2000.


DarkOne v4.0 only works with JScript Panel 1.3.0+
All Scripts have to be updated for newer JScript Panel Versions. But I have nothing heard from Tedgo for about a year...
Title: Re: Biography Discussion
Post by: redorb on 2018-01-31 15:59:50
Quote
DarkOne v4.0 only works with JScript Panel 1.3.0+
All Scripts have to be updated for newer JScript Panel Versions. But I have nothing heard from Tedgo for about a year...
Do you mean DarkOne v4.0 won't work with foobar2000 1.4 and JScript Panel 2 and WilB JScript Biography 0.9.0.1?
Title: Re: Biography Discussion
Post by: Fladder72 on 2018-02-01 05:06:54
Quote
DarkOne v4.0 only works with JScript Panel 1.3.0+
All Scripts have to be updated for newer JScript Panel Versions. But I have nothing heard from Tedgo for about a year...
Do you mean DarkOne v4.0 won't work with foobar2000 1.4 and JScript Panel 2 and WilB JScript Biography 0.9.0.1?
Sorry, meant DarkOne4Mod. It uses JScript Panel for several UI Elements. But the Scripts were not actualized for a long time
The older v4 uses WSH Panel Mod for those UI Elements.  JScript Biography 0.9.0.1 seems to work.
Title: Re: Biography Discussion
Post by: redorb on 2018-02-01 09:47:34
Quote
Sorry, meant DarkOne4Mod. It uses JScript Panel for several UI Elements. But the Scripts were not actualized for a long time
The older v4 uses WSH Panel Mod for those UI Elements.  JScript Biography 0.9.0.1 seems to work.
Ok, great! Thanks for the clarification! Got a bit worried 'cause I just love DarkOne v4!

Best regards
Title: Re: Biography Discussion
Post by: tr0ner on 2018-02-05 17:22:29
Hi guys,

I uninstalled foobar and all settings to do a fresh install of Foobar 1.4 with the new Jscipt panel and biography 0.9.0.1.
For some reasons it only pulls the Artist Bio but not the covers or the artist pictures. I tried to switch from allmusic to last.fm but it did not help.
I have no idea what I might be doing wrong. Everything is on auto-fetch=1
Other than that I did not change anything in the ini.

It creates the folder for the artist in the yttm folder but in the artists folder there is only a empty txt called update.txt, no pictures.


Is there any other setting I need to change in order to get the pictures to download?
Maybe I lost some other component when reinstalling or there is some setting in the foobar options I needed to change?

Thank you for any ideas =)


Title: Re: Biography Discussion
Post by: WilB on 2018-02-05 19:42:25
New Version: JScript Biography 0.9.0.2 (https://hydrogenaud.io/index.php/topic,112913.msg952422.html#new)

@tr0ner Reproduced & should be fixed. It was caused by the new utils.WriteTextFile in JScript panel v2+ saving the "foo_lastfm_img.vbs" apparently in an incompatible format. That file is used for image saving. @uberunit - this should also fix your issue. Thanks for the reports.

The issue shouldn't affect upgrades because a good "foo_lastfm_img.vbs" already existed, but will affect any fresh installs with v0.9 & v0.9.01 where it is newly created - that includes anyone using the DarkOne versions above on a fresh install. I have regressed saving the file to the previous method.

Any body who used v0.9 or v0.9.0.1 and is affected by this issue, e.g. if you used a fresh foobar2000 install or didn't use JScript Biography before 0.9 should:
1) Install Biography version 0.9.0.2
2) Navigate to foobar2000\yttm\foo_lastfm_img.vbs and delete the corrupt "foo_lastfm_img.vbs"
3) Restart foobar2000
4) You may need to use sources > force update to show images (i.e. if you've artists folders with just update.txt & no pictures)
Title: Re: Biography Discussion
Post by: uberunit on 2018-02-06 21:24:08
New Version: JScript Biography 0.9.0.2 (https://hydrogenaud.io/index.php/topic,112913.msg952422.html#new)

@tr0ner Reproduced & should be fixed. It was caused by the new utils.WriteTextFile in JScript panel v2+ saving the "foo_lastfm_img.vbs" apparently in an incompatible format. That file is used for image saving. @uberunit - this should also fix your issue. Thanks for the reports.

The issue shouldn't affect upgrades because a good "foo_lastfm_img.vbs" already existed, but will affect any fresh installs with v0.9 & v0.9.01 where it is newly created - that includes anyone using the DarkOne versions above on a fresh install. I have regressed saving the file to the previous method.

Any body who used v0.9 or v0.9.0.1 and is affected by this issue, e.g. if you used a fresh foobar2000 install or didn't use JScript Biography before 0.9 should:
1) Install Biography version 0.9.0.2
2) Navigate to foobar2000\yttm\foo_lastfm_img.vbs and delete the corrupt "foo_lastfm_img.vbs"
3) Restart foobar2000
4) You may need to use sources > force update to show images (i.e. if you've artists folders with just update.txt & no pictures)

Thanks for your efforts, WilB, that fixed it! I initially missed your comment advising to delete foo_lastfm_img.vbs so I did that and boom! Excellent work my friend!
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2018-03-02 09:06:34
Hi...
is it possible to auto cylce artist bio und pics only for the current track (feat. Artist or the Solist, Orchestra etc.)  and not between similar artist???
Thanks!
LG Frank
Title: Re: Biography Discussion
Post by: WilB on 2018-03-02 13:45:17
Right click > sources > server settings. Opens biography.ini. Set the number of similar artists to display to 0 as shown below:

[ADVANCED: MORE MENU ITEMS]
...
...
Similar Artists: Number to Display(0-10)=0

Save biography.ini & restart foobar2000.

It should then auto-cycle bios and pics for tag items of the current track; e.g. artist, composer and performer, including items in multi-value fields, etc.

HTH
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2018-03-02 18:08:19
Wow...Thanks...That's it!!!!
 8)
Title: Re: Biography Discussion
Post by: Sergey77 on 2018-03-06 14:37:37
Hello Everyone!

Dear WilB,
after some use JScript Biography I concluded it works excellent.
However, I would to offer some improvements, I think so:
1.  Add mode caching of all images in one folder.  So that every next pictures of the new artist will be load with the removal of the previous pictures without storage. This will limit the disk space for images.
2.  Add a function to delete the contents of cache images and text files.
3.  Add a static mode, when new pictures and texts are not loaded for the next songs.
4.  Is it possible to exclude the frizzing of visualization when loading pictures?

Best regards.
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2018-03-27 08:11:06
Hello everybody,
I have the following problem. I like to use the biography view. Works also wonderful. I work with the portable version. However, if I copy the entire Foobar folder to another directory, e.g. from the external USB disk to a local directory under C: \, the artist images are neither downloaded nor displayed. Also I have in the security settings for this directory set to "everyone". Without success. The biography text works. Deleting the .ini-file no change.
Has anyone ever watched?
Many Thanks
Greetings Frank
Title: Re: Biography Discussion
Post by: WilB on 2018-03-27 13:03:38
I couldn't actually reproduce the issue. I copied a portable install from external USB to "C:\" and it all worked. Images were in the default location. It wasn't clear what your original image location was, whether they were copied & the nature of the new location etc. With default ini settings, save paths are automatically relative to install location.

All I can currently think of is that it's a hangover from this issue (https://hydrogenaud.io/index.php/topic,112914.msg952424.html#msg952424) that specifically effected image downloading and is easily correctable. Essentially, the utils.WriteTextFile in early releases of the JScript panel v2 series resulted in a corrupt "foo_lastfm_img.vbs" file that wouldn't save images. Try following steps 1-4 in the post. Essentially ensure Biography version 0.9.0.2 is being used. Navigate to foobar2000\yttm\foo_lastfm_img.vbs and delete the corrupt "foo_lastfm_img.vbs". Restart foobar2000. A new functional "foo_lastfm_img.vbs" should be created. You may need to use sources > force update to show images (i.e. if you've artists folders with just update.txt & no pictures).
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2018-03-27 20:12:23
I'm sorry, it was my mistake.
I did not copy the folder yttm because so many files were inside.
That was the cause.
Many thanks for your effort
Title: Re: Biography Discussion
Post by: Pepmag on 2018-04-12 17:46:24
Hello !!!

I have this error: Error: JScript Panel v2.1.0.2 (biography v0.9.0.1 by WilB)
Error en tiempo de ejecución de JavaScript:
La longitud de la matriz debe ser un número positivo finito
File: <main>
Line: 374, Col: 46

What it means ?  Thank you for your patience
Title: Re: Biography Discussion
Post by: WilB on 2018-04-12 22:32:46
@Sergey77 Thanks for the feedback.

1) The number of images stored can be restricted to a set value: Image [Artist] Cache Limit: "menu > sources > server settings" (biography.ini). That way newer images are added & older removed to give a fixed number of up-to-date images. Due to issues with lfm & images, both a few years ago and again recently, I think its best to cache images, and not make repeated requests for the same images. Plus it's faster.

2) The next version should include "Open Containing Folder". That will give direct accesss to file management and the proper windows tools.

3) Static mode. That can be done by specifying fallback images in foobar2000>preferences>display>album art. Titleformatting can be used in the patterns (e.g. genre related images could be used) or a stub set. Artist mode checks artist patterns & album mode checks front cover patterns. If auto mode is used, any unnecessary text auto-hides when nothing is found.

4) That can occasionally occur when images are resized by JScript panel to the required resolution, which occurs on their first use. Resized images are temporarily cached & so minor occasional blips should be gone on reuse. I don't believe I can do any more than that.

@Pepmag

I couldn't reproduce the issue & had a good look at the code. I can see from the report the error, but currently haven't been able to identify an issue with the script.

Just to confirm, you haven't altered the script in any way. Right?

I can add a workaround to stop it happening but if possible I'd rather get to the route cause. If you were able to provide an example artist for which it happens or better still post the last.fm artist biography that causes the issue it may help me to see if I can reproduce it. What last.fm language are you using? If you've changed biography.ini in any way a copy of that would also be useful (right click > sources > server settings). Is there anything else unique about your PC set up? Also it's worth updating to the latest version,  (0.9.0.2) although I don't think there were any changes in that bit of the code that should effect the issue, and to use the 'Chakra' script engine if possible (shift + right click > configure).
Title: Re: Biography Discussion
Post by: Pepmag on 2018-04-15 12:23:04
The script is the original and this is my biographi.ini:

[A foobar2000 restart is required for any changes to take effect. Only change entries after the equal signs. Entries have a 255 character limit.

Version 0.8.

========================================
CUSTOMISATION HELP:

AUTO-FETCH:
1 Enable web search for source. Results are cached.
0 Disable web search for source. Existing data cached to disc will be loaded. Nothing will load for a source if nothing is saved to disc.

NAMES:
Used in search, file names, headings & folder locations. %BIO_ALBUMARTIST%, %BIO_ARTIST% and %BIO_ALBUM% define titleformat used for albumartist, artist and album, respectively. Variables are specific to JScript Biography. Change default title formatting if required.

PATHS:
Enter title formatting or absolute paths. Always use the variables %BIO_ALBUMARTIST%, %BIO_ARTIST% or %BIO_ALBUM%, if applicable, to ensure correctly named paths (copy style of defaults). The 2 reviews (& 2 biographies) must have different paths. %profile% can be put at the start of the path and resolves to the foobar2000 profile folder or program folder in portable mode. Don't use %path% except in cover paths where $directory_path(%path%) can be used. As with title formatting, enclose literal ()[]'%$ in single quotes. It is recommended to validate changes by checking save paths of a few files. Trailing \ not needed. Conditional folders are not supported. File names are auto generated except cover name set.

MISCELLANEOUS:
Album Name Auto-Clean. 0 or 1; 1 strips out words that may interefere with searching.
Album Review [Allmusic] Include Partial Matches: 0 or 1; 1 includes partial matches of the album name.
Album Review & Cover [Lastfm] Use Lastfm Autocorrect: 0 or 1.
Cache Expiry: change if required - force update overrides.
Image [Artist] Auto-Add New: 0 or 1 (requires enabled auto-fetch).
Image [Artist] Fetch Number (maximum 20). Sets number of artist images to auto-fetch. If Auto-Add New is enabled, 5 is optimum.
Image [Artist] Cycle Time: enter value in seconds.
Lastfm Server: change for biographies & album reviews in different languages. Known Last.fm Servers: www.last.fm, www.last.fm/de, www.last.fm/es, www.last.fm/fr, www.last.fm/it, www.last.fm/ja, www.last.fm/pl, www.last.fm/pt, www.last.fm/ru, www.last.fm/sv, www.last.fm/tr and www.last.fm/zh.
Lastfm Server Fallback To www.last.fm: 0 or 1; 1 falls back to trying www.last.fm if set server is different & no results.
Mouse Left Button Click: Map To Double-Click: 0 or 1.
Show More Tags: 0 or 1; 1 enables display of last.fm biographies & photos of more tags. When available, a button appears in artist view. Expands all fields referenced by "%BIO_ARTIST%" and includes multivalues.
Various Artists. Change name used to identify compilations if required (not critical: helps with allmusic searches).

ADVANCED:
Image [Cover] Check Custom Paths. 0 or 1. 0 gives automatic loading of covers via foobar2000 album art reader and through checking save location, which should suffice for most users. 1 additionally checks custom front cover paths first. Custom paths: enter full path minus extension; up to 5 can be entered on separate lines allowing for different locations & file names. All title formatting + absolute paths supported. Use $replace for custom illegal character replacements (no auto replacements here). %BIO_ALBUMARTIST%, %BIO_ARTIST% and %BIO_ALBUM% supported, but don't have to be used if standard fields work.
Example path=%profile%\cover\$replace(%album artist% - %album%,/,_,\,_,|,_,:,_,*,_,",_,<,_,>,_,?,_) '['%date%']'
%path% OK here as load only & no save incompatibility with radio streams etc.]
========================================

[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=1
Image [Cover] Auto-Fetch=0
[NAMES]
%BIO_ALBUMARTIST%=$if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0))
%BIO_ARTIST%=$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))
%BIO_ALBUM%=$meta(album,0)
[PATHS]
Album Review [Allmusic] Folder Location=%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1))
Album Review [Lastfm] Folder Location=%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1))
Biography [Allmusic] Folder Location=%profile%\yttm\biography\allmusic\$lower($cut(%BIO_ARTIST%,1))
Biography [Lastfm] Folder Location=%profile%\yttm\biography\lastfm\$lower($cut(%BIO_ARTIST%,1))
Image [Artist] Folder Location=%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%
Image [Cover] Folder Location=$directory_path(%path%)
Image [Cover] File Name=cover
[MISCELLANEOUS]
Album Name Auto-Clean=0
Album Review [Allmusic] Include Partial Matches=1
Album Review & Cover [Lastfm] Use Lastfm Autocorrect=1
Cache Expiry (days: minimum 28)=28
Image [Artist] Auto-Add New=1
Image [Artist] Fetch Number (maximum 20)=5
Image [Artist] Cycle Time (seconds)=8
Lastfm Server=www.last.fm
Lastfm Server Fallback To www.last.fm=0
Mouse Left Button Click: Map To Double-Click=1
Show More Tags=1
Various Artists=Various Artists
[ADVANCED]
Image [Cover] Check Custom Paths=0
Image [Cover] Custom Path 1=
Image [Cover] Custom Path 2=
Image [Cover] Custom Path 3=
Image [Cover] Custom Path 4=
Image [Cover] Custom Path 5=
[LASTFM LANGUAGE]
Lastfm Language=ES
************************************************************

thank you for your time

Pepe
Title: Re: Biography Discussion
Post by: paregistrase on 2018-04-15 14:59:34
Sorry for steal the focus of your problem but I have a doubt.

I'm using 0.9.0.2 version and I don't have a

Code: [Select]
Lastfm Server=www.last.fm
Lastfm Server Fallback To www.last.fm=0

option in my biography.ini

I only have

Code: [Select]
[LASTFM LANGUAGE]
Lastfm Language=ES
Lastfm Language Fallback To English=1

Must I add it?

Title: Re: Biography Discussion
Post by: WilB on 2018-04-15 19:01:13
@paregistrase: All is correct.

@Pepmag: I'm not sure why but that is the wrong biography.ini and in fact rather an old version. The correct version for 0.9.01 or 0.9.02 is: JScript Biography.ini Version A0001. Fortunately it's very easily corrected. Simply delete the biography.ini (or rename it to something else if you want to keep a back-up). Biography.ini should be in foobar2000\yttm\biography.ini. Restart foobar2000 and a fresh one will be created.  Then right click JScript Biography > Sources > Server Settings. Opens biography.ini. Double check it's the right version number. If for some reason it's not, you deleted/renamed the wrong one.
Title: Re: Biography Discussion
Post by: paregistrase on 2018-04-16 06:40:25
@paregistrase: All is correct.

 OK, nothing to edit here.  ;)

And thanks for your script, it's very usefull.

Only a suggestion...

Can you made the option "Write tags to select tracks" accessible from the main menu instead of "shift+right click"?

Not a big problem but I think that make more sense leave the shift+right click only for configure and take the normal use options visible in the right click menu. Or a visible buttom in the upper right corner for tags like the "Show more items" in the upper left corner... that will be supercool.  8)
Title: Re: Biography Discussion
Post by: Pepmag on 2018-04-16 15:59:51
OK

After delete biography.ini, no more errors. But now, it can´t download images.
Title: Re: Biography Discussion
Post by: WilB on 2018-04-16 16:55:23
It may be a hangover from this issue (https://hydrogenaud.io/index.php/topic,112914.msg952424.html#msg952424) that specifically effected image downloading and is easily correctable. Essentially, the utils.WriteTextFile in early releases of the JScript panel v2 series resulted in an invalid "foo_lastfm_img.vbs" file that wouldn't save images. Try following steps 1-4 in the post. Essentially ensure Biography version 0.9.0.2 is being used. Navigate to foobar2000\yttm\foo_lastfm_img.vbs and delete the corrupt "foo_lastfm_img.vbs". Restart foobar2000. A new functional "foo_lastfm_img.vbs" should be created. You may need to use sources > force update to show images (i.e. if you've artists folders with just update.txt & no pictures).

Hopefully that should solve it. If not, to exclude issues with biography.ini, ensure all biography.ini settings are at default. I assume they are since you just created it. But if not delete or rename biography.ini & restart foobar2000 to create a fresh one.
Title: Re: Biography Discussion
Post by: miras on 2018-04-17 04:32:03
Hi WilB, its possible to add something like "Founded In" tag (info from lastfm) to "Write tags to select tracks"?
Title: Re: Biography Discussion
Post by: Pollux88 on 2018-04-26 02:59:13
An option to skip everything in %album% name after '(' and '[' characters would be killer
Album autoclean probably does something similar, but it seems to be working for some, but not for others.
Title: Re: Biography Discussion
Post by: WilB on 2018-04-27 17:21:13
@paregistrase + @miras. Requested features should be in the next version.

@Pollux88. That can be done by changing the %BIO_ALBUM% definition in server settings (biography.ini), e.g.
Code: [Select]
%BIO_ALBUM%=$puts(a,$strstr(%album%,'('))$puts(b,$strstr(%album%,'['))$shortest($if($get(a),$cut(%album%,$sub($get(a),1))),$if($get(b),$cut(%album%,$sub($get(b),1))),%album%)
Note that I only wrote the above quickly to show its possible and perhaps it could be written more elegantly. Trailing spaces are automatically trimmed.

Note that such truncation isn't generally recommended. It may be rather non-specific, and remove info required for the look-up, e.g. review look-up of (What's the Story) Morning Glory would fail.

A solution with album names is to use the core album name in the album name field & put other info like "Deluxe Edition" in another tag, e.g. a version tag.

Album name auto-clean uses a keyword match to maximise specificity, and works with a range of common occurrences. It may be possible to add other key words if you provide examples and they can be applied in a sufficiently specific way.
Title: Re: Biography Discussion
Post by: Pollux88 on 2018-04-27 21:03:33
Works perfectly, thanks a bunch! I really appreciate going the long way and writing this 'not so elegant' code yourself. Mine would probably look something like
Code: [Select]
$if($greater($strchr(%album%,'('),0),$trim($cut(%album%,$sub($strchr(%album%,'('),1))),$if($greater($strchr(%album%,'['),0),$trim($cut(%album%,$sub($strchr(%album%,'['),1))),%album%))
Title: Re: Biography Discussion
Post by: paregistrase on 2018-04-28 05:17:30
@paregistrase + @miras. Requested features should be in the next version.

Thanks  :)
Title: Re: Biography Discussion
Post by: scruball on 2018-05-19 11:02:38
Hello,
This might be me just being stupid, but all I get is "No Photo" and "No Cover". Is there something I am missing that needs to be setup additionally?
Title: Re: Biography Discussion
Post by: tinkerer2015 on 2018-05-21 13:03:11
Overall thanks for the awesome biography/review solution!

One question: Is there a way to have image-only mode for biography, and Auto (image + text) for the review? Right now, Image-only/Text-only/Auto-display applies to both bio and review, as far as I can see.

I've experimented with custom layout styles – a text+image one for the reviews:
(https://imageshack.com/a/img923/1254/bQqLjG.png)

... and one with mostly image for the bio; the problem is that I cannot completely remove the text box in a custom style (or at least I don't see how to do it). Also, image auto-fill (=auto zoom&crop to fill the panel space) doesn't seem to work in quite the same way in Auto Display mode (there's a space left empty on the left and right, maybe for the text scrollbars?):
(https://imageshack.com/a/img921/9813/bdXQ7n.png)

I'd want the bio to look the way it does in the Image-only mode:
(https://imageshack.com/a/img924/2429/b6g8Po.png)

Do you have an idea for me how to do this combo – image-only mode for bio, custom style for review? Any help appreciated!

Title: Re: Biography Discussion
Post by: damian198 on 2018-05-24 03:10:07
since the installation is still coming out, no photo that I need to work? what configuration? Thank you
Title: Re: Biography Discussion
Post by: Solynth on 2018-05-25 13:33:51
Great panel.

Is there a way I can save all my artist images in one folder? This is how I used to do it with the old Biography View before it stopped working after the last.fm update.

(https://i.imgur.com/5S1Khtu.jpg)

I have tried changing the [SAVE] section in biography.ini to:
Code: [Select]
Image [Artist] Folder=F:\Documents\Foobar\Artist\%BIO_ARTIST%

But this creates a subfolder for the artist with the artist image inside like this "%artist%\%artist%.jpg".
Is there a way I can have all of the artist images in the one folder? I'd rather not have a new folder for each artist when I only want one image per artist.

I have also tried this, but no image is saved:
Code: [Select]
Image [Artist] Folder=F:\Documents\Foobar\Artist
Title: Re: Biography Discussion
Post by: damian198 on 2018-05-30 11:21:07
solved was my internet...
Title: Re: Biography Discussion
Post by: WilB on 2018-05-31 23:10:21
@tinkerer2015
I have changed the menu handling so that different modes (e.g. image only vs combo) as well as different styles can be independently set with bio & reviews. It should be in the next version. The small difference in autofill handling between auto display and image only is because the former respects the "Layout Outer Padding Image..." settings in panel properties to provide the ability to align with text & so you can adjust it there. The latter always fills the whole panel.

@Solynth. Saving heterogenous artist images in the same folder isn't supported. Since the normal aim is to cycle through images of a particular artist, the simplest way of doing it is to have separate folders and load the images therein. That method also enables efficient updating and so I don't see it changing. You didn't really explain what you can't achieve through the way its done. Your picture showed a mixture of artist images in windows explorer (?). If that's what you want then simply apply a search filter for pictures to the master folder. If you want to display artist images in other album art viewers, playlists or browsers etc enter the appropriate patterns, e.g. in main foobar2000 preferences>display>album art>artist. For the default save location enter:
Code: [Select]
XX\foobar2000\yttm\art_img\$cut(%artist%,1)\%artist%\*
where XX is your own specific path
Most current plug-ins support that source.
That will load 1 image per artist.
Title: Re: Biography Discussion
Post by: Solynth on 2018-06-01 04:40:46
Works a treat, thanks.
The main reason is I didn't want to have folders within folders if each folder only contained 1 image file.
Title: Re: Biography Discussion
Post by: gilbert on 2018-06-08 16:53:47
Hi I am using foobar 1.4 beta 17 with Darkone 4 modified by yourself.
I have deleted the whole appdata...yttm folder which has been recreated.
I get the biographies but no artist images?
Title: Re: Biography Discussion
Post by: WilB on 2018-06-08 18:40:36
It sounds like a hangover of this (https://hydrogenaud.io/index.php/topic,112914.msg952424.html#msg952424) issue that's easily correctable.

Essentially, the utils.WriteTextFile in early releases of the JScript panel v2 series resulted in an invalid "foo_lastfm_img.vbs" file that wouldn't save images. Try following steps 1-4 in the post. Essentially ensure Biography version 0.9.0.2 is being used. You may need to update it. Navigate to foobar2000\yttm\foo_lastfm_img.vbs and delete the corrupt "foo_lastfm_img.vbs". Restart foobar2000. A new functional "foo_lastfm_img.vbs" should be created. You may need to use sources > force update to show images (i.e. if you've artists folders with just update.txt & no pictures).
Title: Re: Biography Discussion
Post by: redorb on 2018-06-14 10:02:33
Hello,

Updating to foobar2000 1.3.18 seems to have broken Biography.
Using JScript Panel 2.1.4 and Biography 0.9.0.2.
Any help with this will be highly appreciated!

Edit:
Tried installing foobar2000 1.4 beta 17 and same issue.
Should also mention I use DarkOne 4.0

Best regards

Title: Re: Biography Discussion
Post by: redorb on 2018-06-14 12:13:39
Rolled back to foobar2000 1.3.17 and still no luck!
That's weird, maybe something else is broken?
Title: Re: Biography Discussion
Post by: WilB on 2018-06-14 16:59:06
I just tried on a fresh foobar2000 1.3.19 install with JScript panel 2.1.4 & it all worked. However, for the foobar2000 1.3 series, JScript panel 2.1.4 requires installation of the vc_redist.x86.exe package as documented in the JScript panel installation instructions. Had you installed that? I assume you are properly connected to the internet etc.

The only other thing I'm aware of that could also effect 1.4 installs is a hangover of this (https://hydrogenaud.io/index.php/topic,112914.msg952424.html#msg952424) issue, which specifically effected image downloading. Essentially, the utils.WriteTextFile in early releases of the JScript panel v2 series resulted in an invalid "foo_lastfm_img.vbs" file that wouldn't save images. Try following steps 1-4 in the post. Essentially ensure Biography version 0.9.0.2 is being used (shift + right click biography & choose configure to check). Navigate to foobar2000\yttm\foo_lastfm_img.vbs and delete the corrupt "foo_lastfm_img.vbs". Restart foobar2000. A new functional "foo_lastfm_img.vbs" should be created. You may need to use sources > force update to show images (i.e. if you've artists folders with just update.txt & no pictures). While I doubt that there's an issue with biography.ini that's in the same folder, you could also reset that by deleting (or renaming to keep a back up) and restarting foobar2000.

HTH
Title: Re: Biography Discussion
Post by: redorb on 2018-06-14 19:38:02
Thanks for your answer! Appreciate that!

Followed your advice and got good results! YAY!

I already had VC_redist.x86.exe installed.
Internet connected... of course... :D
I deleted first the foo_lastfm_img.vbs but that didn't change anything.
Then deleted the biography.ini and the Biography worked like a charm!
I noticed that my old biography.ini backup looked different from the newly created one.
The path I had before to save images to another drive was | Album Review [Allmusic] Folder Location=X:\Biography\yttm |
The new path needed to be changed to | Album Review [Allmusic] Folder=X:\Biography\yttm |
So removing | Location | from the path did the trick!
Thanks for your input, all is good now! Biography is back!

Edit:
Updated to foobar2000 v1.3.18 and all is good!

Best regards
Title: Re: Biography Discussion
Post by: Sergey77 on 2018-06-16 08:36:54
@WilB,
I report about another error but when using Biography v0.9.0.2 script (see attached pic.).
Unfortunately, I didn't understand what actions cause this error.
Please check, and let me know if you need more info.
My previous report Reply #71 (https://hydrogenaud.io/index.php/topic,111059.msg958411/topicseen.html#new)

Thanks.
Title: Re: Biography Discussion
Post by: WilB on 2018-06-17 12:22:16
That error doesn't make any sense. It's on line 2083, yet the v0.9.0.2 release is only 2021 lines long. So the script appears to have been modified in some way. Consequently, I don't know whether or not the error is caused by the modification, or in which part of the code to look... I haven't been able to reproduce the issue. If the script has only cosmetic modifications, i.e. it's just less condensed, then you can post the code block around your line 2083 and I'll take a look.
Title: Re: Biography Discussion
Post by: Sergey77 on 2018-06-17 20:50:49
@WilB,
I use the original script Biography v0.9.0.2 by WilB and didn't modify.
But I paste the text of script after line 121 where was the text JScript Panel v2.1.4 from 1 to 121 lines.
So the lines became more then 2021. I'm not correct? Is it necessary to clean the all area before paste the Biography script? or how right?
So the issue at the Line: 1962 (2083-121), Col: 175
This line is below:
Code: [Select]
 var remove = imgExisting.length + noNewLinks - artLimit; remove = Math.min(remove, imgExisting.length); if (remove > 0) {for (k = 0; k < remove; k++) imgToDelete.push({a:a, p:imgExisting[k].p}); p.save(bio_cache, JSON.stringify(imgToDelete, null, 3));}
I hope this helps to identify and fix the issue.

Thanks.
Title: Re: Biography Discussion
Post by: WilB on 2018-06-17 23:07:46
Thanks for the extra info.

1) You should delete the default JScript panel script before pasting in biography. If you don't, functions etc are duplicated although in reality it shouldn't actually matter as JScript panel uses the last instance of things.

2) I'll add a fix for the line 2083 issue in the next version. In the meantime, there is a file in the folder foobar2000 > yttm called "cache_bio.json". It looks to me as though it might have become invalid in some way and I suggest deleting it. Then restart foobar2000. A new valid one should be auto-created. If that doesn't stop the problem, then, until the fixed version is out, please switch off the artist image cache limit in biography.ini by setting it blank:

Code: [Select]
[MISCELLANEOUS]
---
---
---
Image [Artist] Cache Limit=

HTH

Thanks for reporting.
Title: Re: Biography Discussion
Post by: Sergey77 on 2018-06-19 07:41:10
1) The number of images stored can be restricted to a set value: Image [Artist] Cache Limit: "menu > sources > server settings" (biography.ini). That way newer images are added & older removed to give a fixed number of up-to-date images. Due to issues with lfm & images, both a few years ago and again recently, I think its best to cache images, and not make repeated requests for the same images. Plus it's faster.
@WilB,
but that mode (only one folder for cache with overwriting files for other artist - let's say overlay cache mode) can be realizable as enable/disable option. That realized and works well (and quite fast) in the script by kgena_ua (https://hydrogenaud.io/index.php/topic,114686.0.html). It would be great to have this opportunity for Biography script too.
Also, speed download can be increased by selecting the quality option of images - this is sometimes a useful thing.

3) Static mode. That can be done by specifying fallback images in foobar2000>preferences>display>album art. Titleformatting can be used in the patterns (e.g. genre related images could be used) or a stub set. Artist mode checks artist patterns & album mode checks front cover patterns. If auto mode is used, any unnecessary text auto-hides when nothing is found.
I meant the lock mode like in YouTube Track Manager (https://hydrogenaud.io/index.php/topic,105522.100.html).

Dear WilB, Please add these features for the next version if possible.

Thanks.
Title: Re: Biography Discussion
Post by: mjm716 on 2018-08-29 10:49:36
anyone have a recommendation for how I can find/scrape albums/artists in my library that haven't already been scanned with biography panel, ie last/never updated?
Title: Re: Biography Discussion
Post by: mjm716 on 2018-09-17 04:53:12
one more...

The script crashes (1.4/dui) without internet connection?

Error: JScript Panel v2.1.6 (Biography v0.9.0.2 by WilB)
JavaScript runtime error:
Object expected
File: <main>
Line: 543, Col: 173
<source text only available at compile time>
Title: Re: Biography Discussion
Post by: WilB on 2018-09-17 10:32:55
I was aware of the issue, which occurs in rather a rare scenario. It should be fixed for the next version.

In the meantime, if you're inclined, you can replace the whole of line 543 with that below. Shift + right click the script, choose configure and navigate to line 543.

Code: [Select]
this.on_state_change = function() {if (this.xmlhttp != null && this.func != null) if (this.xmlhttp.readyState == 4) {if (this.xmlhttp.status == 200) this.func(); else if (this.on_search_done_callback) this.on_search_done_callback(artist, list, done, handles);}}

Thanks for the report.
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2018-10-06 12:27:46
Hi WilB
Looking forward to trying the new SpiderMonkey version.

In the mean time I have a question/request. In artist mode the 'Auto Cycle Photo' option together with an interval loops through all pics in my artist folder. However in album mode it only displays the folder/cover pic. Is there any way I can get a similar behaviour as with artist ie display all pics in my album folder? Or loop through all files in the custom cover paths in server settings.

FYI; I store my albums in separate folders under each artist folder.
Title: Re: Biography Discussion
Post by: mjm716 on 2018-10-07 04:57:27
Hi WilB
Looking forward to trying the new SpiderMonkey version.

I'll 2nd that, although this is one of the most efficient panels I'm running - no lag/library browse issues - great work!

One further request/suggestion: clicking switches modes, but how about adding "open containing folder" option on ctrl-click?

It would be great to be able to easily get to the artist image folder to purge the 'unrelated same band name' photos.

Thanks again for the superb script
Title: Re: Biography Discussion
Post by: erjot111 on 2018-10-08 00:24:37
Hi WillB
How can I change font size ? I tried through Propertis Panel but it does not work. Does it depend on foobar skin I use ?
Title: Re: Biography Discussion
Post by: mjm716 on 2018-10-08 03:58:12
Hi WillB
How can I change font size ? I tried through Propertis Panel but it does not work. Does it depend on foobar skin I use ?

ctrl-click>Panel Properties>Zoom Font Size (%)
Title: Re: Biography Discussion
Post by: WhistleChips on 2018-10-08 13:07:49
Hi WillB
How can I change font size ? I tried through Propertis Panel but it does not work. Does it depend on foobar skin I use ?

Hover over panel, Ctrl + Mouse Wheel.
Title: Re: Biography Discussion
Post by: evil roy on 2018-10-09 00:23:15
New Version: JScript Biography 0.9.0.2 (https://hydrogenaud.io/index.php/topic,112913.msg952422.html#new)

@tr0ner Reproduced & should be fixed. It was caused by the new utils.WriteTextFile in JScript panel v2+ saving the "foo_lastfm_img.vbs" apparently in an incompatible format. That file is used for image saving. @uberunit - this should also fix your issue. Thanks for the reports.

The issue shouldn't affect upgrades because a good "foo_lastfm_img.vbs" already existed, but will affect any fresh installs with v0.9 & v0.9.01 where it is newly created - that includes anyone using the DarkOne versions above on a fresh install. I have regressed saving the file to the previous method.

Any body who used v0.9 or v0.9.0.1 and is affected by this issue, e.g. if you used a fresh foobar2000 install or didn't use JScript Biography before 0.9 should:
1) Install Biography version 0.9.0.2
2) Navigate to foobar2000\yttm\foo_lastfm_img.vbs and delete the corrupt "foo_lastfm_img.vbs"
3) Restart foobar2000
4) You may need to use sources > force update to show images (i.e. if you've artists folders with just update.txt & no pictures)

After following the above instructions I am still having this exact issue (https://hydrogenaud.io/index.php/topic,112914.msg952404.html#msg952404).  I am using

JScript Panel v2.1.7.2 by marc2003
Based on WSH Panel Mod by T.P. Wang
Build: 01:54:45, Oct  3 2018
Columns UI SDK Version: 6.5

and

Biography 0.9.0.2.txt

Any help would be appreciated (and excellent work btw.)
Title: Re: Biography Discussion
Post by: WilB on 2018-10-09 11:27:34
It sounds as though foo_lastfm_img.vbs wasn't reset. I believe the invalid version has a file size of 696 bytes.

Double check there aren't any copies of 0.9 or 0.9.0.1 in the layout, i.e. only 0.9.0.2 should be present. Then try deleting foo_lastfm_img.vbs again. To ensure you're in the right location: shift + click > file menu > browse configuration folder > yttm > foo_lastfm_img.vbs. Restart foobar2000 after deleting.

Otherwise it could be down to the site or internet etc being slow... I noticed that lfm was very slow/essentially unavailable for a while over the weekend, but it seems back to normal now. All is currently working for me.

The next version has an auto-fix of the foo_lastfm_img.vbs issue.

@Black_Over_Bills_Mothers & mjm716: requested features should also be in the next version.

HTH
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2018-10-09 11:36:06
@WilB. Thanks.
Title: Re: Biography Discussion
Post by: erjot111 on 2018-10-09 20:20:18
Hi WillB
How can I change font size ? I tried through Propertis Panel but it does not work. Does it depend on foobar skin I use ?

ctrl-click>Panel Properties>Zoom Font Size (%)
Hi WillB
How can I change font size ? I tried through Propertis Panel but it does not work. Does it depend on foobar skin I use ?

Hover over panel, Ctrl + Mouse Wheel.
Thanks for help.
I have another question. I want photos not to be saved.  I change in biography.ini "Image [Artist] Auto-Fetch" and "Image [Review] Auto-Fetch" from 1 to 0 but photos are still saved. What settings should I change ?
Title: Re: Biography Discussion
Post by: WilB on 2018-10-09 22:08:45
To quote from the site: "You will implement suitable caching...". So it's not supported. In many cases it would result in repeat downloads of the same images time & again, and is slower. The site has on two occasions I know of taken steps to limit image downloading, the last late 2017. My overriding concern has always been to try & maintain access to sites, and not abuse what foobar2000 users can currently obtain in a way that jeopardises access. Anyway, best practice is always to save all images & data, else if sources disappear you'll have nothing, and layouts immediately break.
Title: Re: Biography Discussion
Post by: bedul123 on 2018-10-10 18:00:17
Hi WilB and thanks for this wonderful plugin. Although I have some problem saving album cover for my music files. From server settings I've changed the Auto-Save value from "0" to "1", like this :

[COVERS: MUSIC FILES]
Auto-Save=1
Auto-Save Folder=$directory_path(%path%)
Auto-Save File Name=cover

Then I save the biography.ini file and restart foobar2000. I looked up in my music album folder but there's no cover art in it. I've tried to delete the biography.ini file and let foobar2000 recreate it but still no luck. I'm using 0.9.0.2 w/ Jscript Panel v2.1.7.2

please help, thanks :)
Title: Re: Biography Discussion
Post by: WilB on 2018-10-10 19:22:13
I just checked & it's all working here.

Please bear in mind:

1) The aim is to obtain MISSING covers. If auto-save is enabled, searches when unable to load a cover according to main foobar2000 preferences (display > album art > front cover > search patterns) and there isn't a cover in the save location. So it ONLY searches when no cover is found through the above routes.

2) Search requires album artist / artist name & album name. So files need to have the tags. If either are missing it won't search, since they're required for searching.

3) The names have to match those used by the site. Autocorrect is on by default so there is a little lee-way in the matching. The site also has to have the cover you're searching for - it's pretty comprehensive though. There might also be occasions when the site is down, like over last w/e, but it all seems to be back to normal now.

HTH
Title: Re: Biography Discussion
Post by: bedul123 on 2018-10-11 03:26:18
Thanks for the reply!
Yes, music files I use for this is properly tagged and I make sure there's no external images (ie. cover.jpg, front.png, etc) exist in the folder.

edit: I searched my music collection and found some files that don't have embedded cover in it. the plugin works! It saved cover artwork in the same folder as the music files.
back to play some other music w/ embedded cover, I let it play 2-3 songs to see if the site is not responding or down, plugin doesn't work.

Is it possible that embedded cover in my music files stops the plugin from saving cover artwork?
Title: Re: Biography Discussion
Post by: WilB on 2018-10-11 17:38:39
The check for an existing cover is whether the main foobar2000 preferences (display > album art > front cover > search patterns) is able to find a cover. That checks both embedded and external sources. Since the aim of Biography is to obtain missing covers, an embedded cover in a music file means you have a cover & so Biography doesn't search. It's not clear why you want to search if you have the cover.

So it's all behaving as expected.
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2019-01-11 23:36:18
Hi WilB. I've been waiting quietly for a Spider Monkey version but Santa Claus didn't bring this to me. Could you please update us on progress on this version.

Thanks.
Title: Re: Biography Discussion
Post by: WilB on 2019-01-12 01:38:08
Yes thanks for offering to test them. There had been a number of teething problems with Spider Monkey panel & I wasn't keen to release stuff while I was aware of issues. But SMP v1.1.2 is now looking excellent - at least I haven't encountered any bugs or stability issues. All scripts are essentially done, so just a little more pre-release testing...
Title: Re: Biography Discussion
Post by: itzGaia on 2019-01-17 03:47:21
Hi WilB! I tried installing your component but it's giving me this error:
(https://i.imgur.com/InnhuhE.png)

And this is the line in question:
(https://i.imgur.com/wxGGnZh.png)

Not sure what is wrong =/ Thank you!
Title: Re: Biography Discussion
Post by: pIv on 2019-01-17 07:05:03
I only comment this line:
// window.DlgCode = 0x004;
Script work.
In version 2.2.0 of foo_jscript_panel marc2k3 remove window.DlgCode.

P.S. marc2k3 propose a solution:
window.DlgCode = 0x004;
replace to
if ('DlgCode' in window) { window.DlgCode = 0x004; }
I check it - script work.
Title: Re: Biography Discussion
Post by: WilB on 2019-01-17 11:47:43
I have done a quick maintenance update of Biography (& also Library Tree & YouTube Track Manager) to fix compatibility with JScript Panel 2.2.0+. There are no new features. They can be downloaded from the usual locations.

Spider Monkey Panel versions with new features will appear shortly...
Title: Re: Biography Discussion
Post by: mjm716 on 2019-01-17 16:28:37
Spider Monkey Panel versions with new features will appear shortly...

the suspense is killing me... my most anticipated update (really!)

(patiently waiting for follow selection/now playing option eg. SYSTEM.Prefer Focus from Biography to appear in YouTube Track Manager?)
;)
Title: Re: Biography Discussion
Post by: WilB on 2019-01-20 18:01:33
New Version: Biography 1.0.0 (https://hydrogenaud.io/index.php/topic,112913.msg967375.html#new)

NEW: Improved menu options.

NEW: Touch Control (enable: menu > layout > options)***.

NEW: Last.fm track reviews. In last.fm review mode there is now a choice of displaying album and/or track reviews (menu > sources > review > last.fm type).

NEW: Ability to cycle cover images: front/back/disc etc and/or those in designated folder (menu > sources > cover).

NEW: Theme options, e.g. Text: Show Summary First (menu > layout > theme).

NEW: Lock option (Middle Click: "More Items Button"). Stops track changes updating display.

NEW: Open containing folder (menu > sources > open containing folder).

NEW: Tag writer: Write Tag: "Locale Last.fm" [multi-value].
   First value: $meta(locale last.fm,0). Usually town/city, e.g. The Beatles -> Liverpool; Madonna -> Bay City
   Last value: $meta(locale last.fm,$sub($meta_num(locale last.fm),1)). Usually country, e.g. The Beatles -> United Kingdom or Madonna -> United States
   Whole value: %locale last.fm%, e.g. Liverpool, Merseyside, England, United Kingdom
   Library Viewers: see documentation for example patterns for View by City and View by Country

CHG: Tag writer: tags written can now be set from menu.

CHG: Require shift can now be set for the menu items: "Write Tags...", "Paste Text From Clipboard" (new default behaviour requires shift) and "Playlists" (panel properties ["Menu items..."]).

CHG: Requires Spider Monkey Panel (https://hydrogenaud.io/index.php/topic,116669.0.html) - if you're unfamiliar with it, then it's based on JScript Panel but has a modern Javascript engine. Spider Monkey Panel can be run alongside JScript Panel, & so other panels can continue to run in JScript Panel if you don't have Spider Monkey Panel versions.

*** for an extra scroll experience, if you don't have a touch screen, enable touch control and drag with left mouse button down.

Updating
Panel properties will be reset as its a new panel. Export JScript panel properties or back-up layouts before updating if you want a record. Importing JScript panel properties isn't supported: panel properties have been overhauled & more key options are now on the menu. Server settings in biography.ini should update automatically if upgrading from a recent version, i.e. 0.9, 0.9.0.1, 0.9.0.2 and 0.9.0.3. If updating from an older version, biography.ini will be reset and the original backed up.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-01-21 07:49:52
New Version: Biography 1.0.0 (https://hydrogenaud.io/index.php/topic,112913.msg967375.html#new)

Thanks so much for your scripts and effort!!

One question about Biography RE: artist image source

It seems I can either cycle artist images from lastfm, or I can select a single local artist image (with no cycle option).

Is that correct or am I missing a setting for cycling local artist images?
Title: Re: Biography Discussion
Post by: WilB on 2019-01-21 13:16:41
Thanks for the feedback.

You are correct.

The behaviour is the same as before. I just changed the wording to try and make it clearer when its cycling and when it isn't. For info:

Photo: Cycle. Cycles images in the set Image [Artist] Folder. This is where last.fm artist images are saved, and so it was logical to name the choice as "Cycle Last.fm". You could change this to another folder and disable downloading if you want a different set of images.

Photo: Artist. This loads a single image & that was how it worked before. It loads from "foobar2000 > preferences > display > album art > artist pattern".
Title: Re: Biography Discussion
Post by: dwmartin0906 on 2019-01-21 23:41:22
Thank you for this wonderful panel.  It is absolutely fantastic.  I am having a problem with the Spider Monkey panel.  When I  switch to album reviews, the artist images are displayed instead of the album cover.  I can get the album cover to display by  clicking the more options button and selecting a specific album.  But I can't scroll through the albums as I could in the jscript panel.  I have read through the instructions but nothing I try seems to work.  What am I doing wrong?
Title: Re: Biography Discussion
Post by: WilB on 2019-01-22 00:37:59
Adding cycling of images for the current album (front, back, disc, etc) was added at the request of another user. But it means that there are now two possible things to cycle through and a choice had to be made over how the mouse wheel operates, i.e. either cycling through images of the current album OR cycling through the different albums. It is set to do the former while the mouse pointer is over the image and latter while the mouse pointer is over the "More Items Button". It was done this way for consistency with how the bio view and similar artists work.

The "More Items Menu" drop down menu does clarify: "Manual Cycle: Wheel Over Button". I hope I have understood you correctly and that you will get used to this small adjustment.

Regarding artist images showing in album mode. Please note the following. Cycling of images for the current album only happens if "Sources > Cover" is set to cycle mode. If set to cycle from a folder then yes extra images are included. I set it to load the artist images by default because I like the ability to cycle through the cover and artist images, but you can use your own folder. You can also use foobar2000 sources for front, back, disc, etc, or both together. Set "Sources > Cover" to front to just have the front cover.

HTH
Title: Re: Biography Discussion
Post by: mjm716 on 2019-01-22 02:03:18
[Artist] Folder. This is where last.fm artist images are saved, and so it was logical to name the choice as "Cycle Last.fm".

The labelling was confusing to me - "Cycle Last.fm" seemed to imply that it is only cycling through online LFM images.
I thought the other option "Artist" meant artist folder. Maybe simply Cycle on/off

I'm guessing it looks in FB display prefs for artist image location?

btw, thanks much for the 'Open Containing Folder' option :)
Title: Re: Biography Discussion
Post by: dwmartin0906 on 2019-01-22 02:50:10
Thank you for your quick reply.  I just enlarged the more items button to make it easier to scroll over so that issue is solved.  And changing the cover cycle option to display only the front cover solved my other issue.  It now works perfectly based on my personal preferences.
Title: Re: Biography Discussion
Post by: redorb on 2019-01-22 09:38:07
Hello WilB

Been closely following the thread about your Biography tool.
Using JScript Biography 0.9.0.2
Updated to foobar2000 v1.4.2.
I use the skin/theme DarkOne v4.0 by Tedgo, I'm in love with that one!
Would like to keep it as it is, my settings with Biography works perfect.

So, the big question is, can I safely without breaking anything install Spider Monkey Panel v1.1.5 - Hotfix II and Biography 1.0.0.?
I read this but I'm not shure if it means I'm OK with DarkOne:
CHG: Requires Spider Monkey Panel - if you're unfamiliar with it, then it's based on JScript Panel but has a modern Javascript engine.
Spider Monkey Panel can be run alongside JScript Panel, & so other panels can continue to run in JScript Panel if you don't have Spider Monkey Panel versions.

Kind regards
Title: Re: Biography Discussion
Post by: WilB on 2019-01-22 11:18:19
DarkOne v4.0 was modded to work with JScript Biography 0.9.0.2 by replacing one wsh_panel_mod with JScript panel. You would now need to locate that JScript panel in the layout and replace it with Spider Monkey panel. Then select the panel stack splitter that contains the new Spider Monkey panel and choose configure. Ensure all the panel stack splitter settings and names in all tabs are identical to before, especially the "PanelList > Forced layout" setting. So back up the layout before making the change so you can compare the settings in the layouts. I previously posted you detailed instructions on how to do this. In the end I believe you weren't able to accomplish it and I posted an updated DarkOne v4.0 version.

If you aren't able to update it yourself this time I can update it for you. So please advise if you want me to do that. However, I'll likely wait a while to see if any issues come up with the new Spider Monkey panel version of Biography.
Title: Re: Biography Discussion
Post by: redorb on 2019-01-22 11:28:22
Yes! Please help me with a modded version of DarkOne! YAY! :D
I don't mind waiting at all, only when you have time will be fine!
I will give it a try on my own... consulting my two best friends Trial & Error...
Thanks a million for your guidance, really, really appreciate it!

Kind regards
Title: Re: Biography Discussion
Post by: MaFred on 2019-01-22 13:14:44
Hello WilB,

Thanks for the great script!

I would like to point out that Biography 1.0.0 does not work properly:
When foobar is started and the first song is played, no artist picture appears. The Foobar stub image is displayed, although some Artist images are already stored in the cache. Only when the second song is played the artist images appear. From now on Biography-Script works correctly.
I would be happy if this bug is fixed.
Here runs Foobar 1.4.1 with the current Spider Monkey. With Biography 0.9.0.2 this bug did not exist.
Sorry for my English.
Title: Re: Biography Discussion
Post by: WilB on 2019-01-22 13:53:49
Thanks for the report.

Yes I am aware of that bug & have fixed it in my version. I'll upload the fixed version after a little more testing...
Title: Re: Biography Discussion
Post by: Ottodix on 2019-01-23 14:21:04
Hello Wilb,

On the next version, would it be possible to add an option "Enlarge on mouse click", which would toggle between "image only / image+text" mode, like the option "Enlarge on mouse over" ? I did the code on my setup, i just didn't add it as an option available through the right-click menu, so on my setup it's always on. But i guess it won't take you much time to make it an option, using my code below.
I edided the this.click function of the panel object, line 435, basically i took the previous code and encapsulate it inside a condition :
Code: [Select]
 this.click = (x, y) => {
const enlarged_img_o = enlarged_img;
enlarged_img = !this.text_trace && img.trace(x, y);
if (!ppt.autoEnlarge && enlarged_img && !ppt.text_only && !ppt.img_only && !enlarged_img_o) {
this.mode(1);
} else if(!ppt.autoEnlarge && ppt.img_only) {
this.mode(0); enlarged_img = false;
const enlarged_img_o = enlarged_img;
this.move(x,y,false);
} else {
// Previous this.click code
if (this.zoom() || x < 0 || y < 0 || x > this.w || y > this.h || but.Dn) return;  if (ppt.touchControl && !p.dblClick && Math.sqrt((Math.pow(this.last_pressed_coord.x - x, 2) + Math.pow(this.last_pressed_coord.y - y, 2))) > 3 * s.scale) return; if (t.text && (!ppt.img_only || ppt.text_only) && t.scrollbar_type().onSbar || ppt.heading && t.head && !ppt.img_only && (but.btns["src"] && but.btns["src"].trace(x, y) || but.btns["mt"] && but.btns["mt"].trace(x, y))) return; this.clicked = true; t.logScrollPos(); ppt.artistView = !ppt.artistView; if (ppt.cycPic) {ppt.artistView ? img.photoTimestamp = Date.now() : img.covTimestamp = Date.now();} if (!ppt.sameStyle && (ppt.bioMode != ppt.revMode || ppt.bioStyle != ppt.revStyle)) this.sizes(); t.na = ""; timer.clear(timer.source); ppt.sameStyle || (ppt.bioMode == ppt.revMode && ppt.bioStyle == ppt.revStyle) ? but.check() : but.refresh(true); if (calc) calc = ppt.artistView ? 1 : 2; if (!this.lock && this.multi_new()) {this.get_multi(true); if (!ppt.artistView) t.album_reset();} if (!this.art_ix && ppt.artistView || !this.alb_ix && !ppt.artistView) {t.getText(calc); img.get_images();} else {t.get_multi(calc, this.art_ix, this.alb_ix); img.get_multi(this.art_ix, this.alb_ix);} if (ppt.img_only) img.setCrop(true); if (!ppt.artistView) img.set_chk_arr(null); this.move(x, y, true); t.getScrollPos(); calc = false;
}
};

and eventually, in order to restrain the active zone to the image only and not the whole image row/column, line 2378 you'll have to remove this code in the function this.trace():
Code: [Select]
if (!ppt.autoEnlarge) return true;
Title: Re: Biography Discussion
Post by: WilB on 2019-01-23 15:44:05
Mouse middle click already toggles image only vs image + text (it's described in the documentation).
Title: Re: Biography Discussion
Post by: Ottodix on 2019-01-23 16:05:27
ah ok, i didn't saw that because my mouse doesn't have a middle click button (it's broken... : ) Anyway, my code work fine, i'll just have to copy/pastle it on the next version
Title: Re: Biography Discussion
Post by: WilB on 2019-01-25 11:51:27
New Version: Biography 1.0.1 (https://hydrogenaud.io/index.php/topic,112913.50.html#msg967659)

FIX: Artist images should now cycle correctly.
Title: Re: Biography Discussion
Post by: kgena_ua on 2019-01-26 16:46:07
nice work
Title: Re: Biography Discussion
Post by: Ottodix on 2019-01-28 10:41:03
Thanks for the fix !

One request : could it always display the fallback text instead of switching to "Image only" mode when the text isn't available ? I mean, the point of the fallback text is to say "we tried to search for a text, but couldn't find one neither of allmusic, neither on last.fm". If it revert to image only, then we loose this information, which say "we tried to find something, but unsuccessfully so far". Then personally i end up trying to clic on the image in order to show the text, and it feel like something is broken.

The code to change seems to be in the function this.getText = (p_calc, update) of the Text function/object. Personally i added p.imgText = true; just after line 1858 and it worked, but i didn't test extensively if it breaks other functions when you do it like that.
Title: Re: Biography Discussion
Post by: WilB on 2019-01-28 10:51:29
Right click > menu > layout > options > dual style auto.  Disable the option.
Title: Re: Biography Discussion
Post by: Ottodix on 2019-01-28 18:37:36
AH yes, thanks !
Title: Re: Biography Discussion
Post by: seongbin on 2019-01-28 22:25:15
Firstly, really appreciate your work.

I got an error message need to be resolved, hope you can help.
The message only occurs when playing particular albums.

Code: [Select]
Opening track for playback: "C:\muzik\library\[2001] 더 자두 - Jadu Version 0001\11. 일년만에 돌아왔네 (Happy Bitrhday To You!).mp3"
Error: Spider Monkey Panel v1.1.5 (Biography v1.0.1 by WilB)
ActiveX_Run failed:
ActiveXObject: Error code 0x800a0035

File: <main>
Line: 2343, Column: 38

Stack trace:
  images@<main>:2343:38
  getArtImages@<main>:2429:21
  Images/this.getArtImg@<main>:2369:140
  Images/this.on_playback_new_track@<main>:2374:230
  on_playback_new_track@<main>:2810:176


Code: [Select]
Opening track for playback: "C:\muzik\library\[2013] 수상한 커튼 - 아름다운 날\03. 긴 하루.mp3"
Error: Spider Monkey Panel v1.1.5 (Biography v1.0.1 by WilB)
ActiveX_Run failed:
ActiveXObject: Error code 0x800a0035

File: <main>
Line: 2343, Column: 38

Stack trace:
  images@<main>:2343:38
  getArtImages@<main>:2429:21
  Images/this.getArtImg@<main>:2369:140
  Images/this.on_playback_new_track@<main>:2374:230
  on_playback_new_track@<main>:2810:176
Title: Re: Biography Discussion
Post by: seongbin on 2019-01-29 05:28:51
Firstly, really appreciate your work.

I got an error message need to be resolved, hope you can help.
The message only occurs when playing particular albums.

Code: [Select]
Opening track for playback: "C:\muzik\library\[2001] 더 자두 - Jadu Version 0001\11. 일년만에 돌아왔네 (Happy Bitrhday To You!).mp3"
Error: Spider Monkey Panel v1.1.5 (Biography v1.0.1 by WilB)
ActiveX_Run failed:
ActiveXObject: Error code 0x800a0035

File: <main>
Line: 2343, Column: 38

Stack trace:
  images@<main>:2343:38
  getArtImages@<main>:2429:21
  Images/this.getArtImg@<main>:2369:140
  Images/this.on_playback_new_track@<main>:2374:230
  on_playback_new_track@<main>:2810:176


Code: [Select]
Opening track for playback: "C:\muzik\library\[2013] 수상한 커튼 - 아름다운 날\03. 긴 하루.mp3"
Error: Spider Monkey Panel v1.1.5 (Biography v1.0.1 by WilB)
ActiveX_Run failed:
ActiveXObject: Error code 0x800a0035

File: <main>
Line: 2343, Column: 38

Stack trace:
  images@<main>:2343:38
  getArtImages@<main>:2429:21
  Images/this.getArtImg@<main>:2369:140
  Images/this.on_playback_new_track@<main>:2374:230
  on_playback_new_track@<main>:2810:176
Update:

I tried to figure out the crash pattern. For now, what I found is that it only happens when artist's name is any one of below. Image files are existing btw. Hope it's helpful.

더 자두
두번째 달
벨 에포크 (Belle Epoque)
수상한 커튼
윤도현 밴드
테이크(Take)
크라잉 넛

Update2:

Ugh... I guess I found a solution.
After I turned on "Beta: use unicode utf-8 for worldwide language support" in the system locale setting, the issue seems resolved. But honestly, I have no idea what happened.

Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-01-29 12:36:39
I got an error message need to be resolved, hope you can help.
The message only occurs when playing particular albums.
Which system locale are you using (I assume you are on Windows 10)?
Title: Re: Biography Discussion
Post by: seongbin on 2019-01-29 18:40:25
I got an error message need to be resolved, hope you can help.
The message only occurs when playing particular albums.
Which system locale are you using (I assume you are on Windows 10)?
My settings is
Code: [Select]
OS: Microsoft Windows 10 Pro
Build: 10.0.17134 N/A Build 17134
System locale: Simple Chinese
Title: Re: Biography Discussion
Post by: kode54 on 2019-01-29 23:58:43
Makes sense, those names appear to be Korean.
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-01-30 09:53:56
Makes sense, those names appear to be Korean.
Do you mean by any chance, that you've encountered this problem before?

PS: @WilB, @seongbin moved the discussion here, since Uploads section is not a proper place to discuss bugz :D
Title: Re: Biography Discussion
Post by: seongbin on 2019-01-30 11:57:31
Makes sense, those names appear to be Korean.
Do you mean by any chance, that you've encountered this problem before?

PS: @WilB, @seongbin moved the discussion here, since Uploads section is not a proper place to discuss bugz :D

I have not encountered this issue before.
And I just double checked by switching back to previous settings(before utilizing Spider Monkey Panel) as below.

* turned off utf-8 support in system locale settings
* foo_jscript_panel-v2.2.0.1
* Biography 0.9.0.3

 It turns out everything is fine with JScript Panel.

But for Spider Monkey Panel, I have to turn on utf-8 support.

Hope it's helpful.


Title: Re: Biography Discussion
Post by: WilB on 2019-01-30 12:41:54
Thanks for your helpful feedback. I did report the issue here (https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/54) in response to your very first post on the matter.
Title: Re: Biography Discussion
Post by: MojoBass on 2019-02-02 12:52:45
I am using artist pics auto-fetched from biography for Br3tts JS Smooth Browser on marc2k3s JScript Panel on a portable foobar installation. The artist pics are stored under the standard path set in biography.ini:
Code: [Select]
%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%
I am currently trying to remove all absolute paths in the installation to be able to easily move the installation to other computers.
Br3tts JS Smooth Browser seems to search for artist pics in the folders given in Preferences/Display/Album art/Artist. Here, I used so far the absolute path
Code: [Select]
 C:\path_to_my_portable_foobar\yttm\art_img\$lower($cut(%artist%,1))\%artist%\*.jpg  
which works perfect.
To get rid of the absolute path, I tried
Code: [Select]
 .\yttm\art_img\$lower($cut(%artist%,1))\%artist%\*.jpg  
which does not work as foobar expecting a path relative to the library location. Everything around %path% is as well pointing to the library location, which is different from the portable foobar location in my case. %profile% does not work as well, als this variable is not known on that level.
Does anybody know how to adress the portable installation path within Preferences/Display/Album art/Artist?

By the way: rectangular artist pics are less nice when used within JS Smooth Browser as there is no auto-fill or crop function and therefore deteriorate the nice grid view. Any idea on how to add auto-fill to JS Smooth Browser or, alternatively, limit auto-fetch in biography to square artist pics?
Title: Re: Biography Discussion
Post by: WilB on 2019-02-03 10:55:36
1) Perhaps a central save location could be used for artist images in the same place as the music library? That could be used by all portable installs. It would also save duplicating stuff in foobar2000 folders of the various portable installs. Existing images could be moved to that location.
e.g.
Code: [Select]
Z:\bio_data\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%

A common album art artist pattern could then be used:
Code: [Select]
Z:\bio_data\art_img\$lower($cut(%artist%,1))\%artist%\*.jpg

Whether this method is viable depends on how you have things organised etc.

As an alternative I think extended variables (http://skipyrich.com/w/index.php/Foobar2000:Extended_Variables) can be used (last revision, 0.4, 2018). Documentation seemed difficult to find. Best I found was this (https://hydrogenaud.io/index.php/topic,72777.msg641661.html#msg641661).

Extended variables provides %FOOBAR_PATH%, which I think, on a portable install, should give want you want:

Album art artist pattern
Code: [Select]
%FOOBAR_PATH%yttm\art_img\$lower($cut(%artist%,1))\%artist%\*.jpg

2) Artist image crop function (autofill). The JS Smooth Browser image handling would need changing, but the script isn't mine, and so I am reluctant to post or pm modifications without it being OK'd by marc2k3. Have you asked marc2k3 to add the option anyway? I do already pretty much have the required code written since I added the feature, for personal use, to another falstaff script with essentially the same image code.
Title: Re: Biography Discussion
Post by: MojoBass on 2019-02-04 05:11:20
Hello WilB,
%FOOBAR_PATH% is exactly what I was looking for, thanks a lot!!
On the JS Smooth Browser artist image crop function (autofill): you know that marc2k3 is not posting here. I could try reaching him on reddit. Or any other idea how to reach him?
Title: Re: Biography Discussion
Post by: WilB on 2019-02-04 11:07:27
https://github.com/marc2k3/foo_jscript_panel/issues (https://github.com/marc2k3/foo_jscript_panel/issues)
Title: Re: Biography Discussion
Post by: MojoBass on 2019-02-05 04:30:46
Thanks + done (see here (https://github.com/marc2k3/foo_jscript_panel/issues/34))
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-02-11 14:07:52
@seongbin I could not reproduce your issue (even with Chinese locale enabled on Win10). Could you please PM me one of the problematic mp3's with corresponding art image?
Title: Re: Biography Discussion
Post by: MojoBass on 2019-02-16 04:44:05
2) Artist image crop function (autofill). The JS Smooth Browser image handling would need changing, but the script isn't mine, and so I am reluctant to post or pm modifications without it being OK'd by marc2k3. Have you asked marc2k3 to add the option anyway? I do already pretty much have the required code written since I added the feature, for personal use, to another falstaff script with essentially the same image code.
Marc2k3 has updated the JS Smooth Browser with the Auto-fill function as part of the latest foo_jscript update V2.2.0.2, see here (https://github.com/marc2k3/foo_jscript_panel/releases). Works perfect, gives the JS Smooth Browser in grid mode a perfect look - big thanks to Marc !!
Title: Re: Biography Discussion
Post by: seongbin on 2019-02-16 08:28:23
@seongbin I could not reproduce your issue (even with Chinese locale enabled on Win10). Could you please PM me one of the problematic mp3's with corresponding art image?
Or you can simply changing any mp3 file's artist name filed as 수상한 커튼
For Biography view, it remained as default setting.

Update:
The problem does not occur in English system locale(utf-8 support turned off),
for my case, it happened in Chinese simplified system locale(utf-8 supported turned off).
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-02-16 13:54:30
Or you can simply changing any mp3 file's artist name filed as 수상한 커튼
For Biography view, it remained as default setting.

Update:
The problem does not occur in English system locale(utf-8 support turned off),
for my case, it happened in Chinese simplified system locale(utf-8 supported turned off).
Yea, I've tried manually renamed mp3 (including fields) and img files on Win10 with Chinese Simplified locale (utf8 was turned off), but still could not reproduce :\
That's why I want to at least have the same file (in case it somehow matters)...
Title: Re: Biography Discussion
Post by: seongbin on 2019-02-16 17:41:21
I made a zip for regarding files(audio & image) for your diagnostic.
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-02-18 09:26:22
I made a zip for regarding files(audio & image) for your diagnostic.
Thanks! Hopefully this will produce more tangible results...
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-02-19 09:43:03
@seongbin , hm, filenames inside your zip appear to be mangled for me (both with En and Simplified Chinese locales). Are they displayed properly on your system (i.e. inside the zip)?

Image:
Spoiler (click to show/hide)
Title: Re: Biography Discussion
Post by: seongbin on 2019-02-20 19:12:21
(https://i.ibb.co/RgRQ0cR/Untitled.png)

I printed out the file infos as below.

Quote
수상한 커튼 - 이방인.mp3 
수상한 커튼_358bf43a7fcf47cfc7fdc1f1ee4da942.jpg
수상한 커튼_470a57bb7d184f24cfa672edc397fa23.jpg
수상한 커튼_93e44d82b16d46c298a13369d3582142.jpg
수상한 커튼_9839f38fd8ff4e3ace7a2d8e67e8044c.jpg
수상한 커튼_c57b1c80967a40c0aa9a0f5234b9f7ab.jpg
Title: Re: Biography Discussion
Post by: kode54 on 2019-02-23 02:00:23
The Unarchiver knows how to handle whatever encoding was used.
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-02-26 18:10:06
The Unarchiver knows how to handle whatever encoding was used.
Thanks for the suggestion, but it seems that this is Mac only application =(
Title: Re: Biography Discussion
Post by: kode54 on 2019-02-27 09:03:54
Or Unix. I don't know off-hand any Windows applications that have automatic code page detection for ZIP files, one of the few frequently used archive formats that usually get encoded in whatever the client machine is using.
Title: Re: Biography Discussion
Post by: WilB on 2019-02-28 13:08:20
@TheQwertiest
I had the same issue as you when I tried to unzip the file.

So I tried adding the zip (without unzipping) to a folder monitored by foobar2000 media library. At least on my device and locale that worked: the metadata seemed to display and work correctly in media library viewers, playlists, properties & biography. In fact the metadata was OK even if the unzipped folder was monitored. File names and paths were still garbled in both cases in properties etc, though.

HTH
Title: Re: Biography Discussion
Post by: ApacheReal on 2019-03-09 07:49:32
I report an error:

Error: Spider Monkey Panel v1.1.5 (Biography v1.0.1 by WilB)
CheckMenuRadioItem failed:
Index is out of bounds

File: <main>
Line: 1491, Column: 587

Stack trace:
  sourceHeadTypeMenu@<main>:1491:587
  MenuItems/this.rbtn_up@<main>:1537:17
  on_mouse_rbtn_up@<main>:2823:34
Title: Re: Biography Discussion
Post by: WebSkater on 2019-03-09 10:30:29
Hi,
I'm using fb2k v1.320 with SPM 1.1.5 and Biography 1.0.1 on W7 x64. Since a few days I realized that that I'm getting no more Biography Infos and Album Reviews from allmusic (only "Nothing found"), but last.fm as source for biography and album reviews is working perfectly. Even tried a few times to reinstall biography 1.0.1 after deleting folder yttm completely. I tried installing JScript 2.2.02 with Biograhy 0.9.03 (again after deleting yttm) buw with no results. If I chase allmusic as source or force source to allmusic the only answer I get is "Nothing found". Checking the allmusic website shows that allmusic isn't offline and also that biography or album reviews for the artists are present. By deleting yttm folder for reinstalling Biograhy script I realized "foo_lastfm_img.vbs" there. Wonder if no "foo_allmusic_img.vbs" is needed?
Forgot to say that I did a Windows Update for W7 and updated some components in my fb2k skin.
Any suggestions to solve this problem?
Title: Re: Biography Discussion
Post by: WilB on 2019-03-09 12:28:00
@ApacheReal

Reproduced & fixed for the next version.

@WebSkater

Initially just to confirm that the site is working for me as expected (fb2k 1.4.2 Win 10) and that only "foo_lastfm_img.vbs" is required. It's rather perplexing if one is working & not the other. It sounds as though it was working and then you made changes to your set-up such that it isn't working any longer. Confirm you have Biography.ini version A0002 (it's in the yttm folder; open with a text editor). To get there press shift & use" foobar2000\File menu\Browse Configuration folder" to be sure you're in the right location. Ensure server settings in "biography.ini" are valid, e.g. Album Review [Allmusic] or Biography [Allmusic] Auto-Fetch are enabled (set to 1 to enable), search title-format is valid and save paths are valid. Try deleting biography.ini (or renaming if you want to keep it) to reset to default. You could try clearing panel properties. Free disc space is also required to save the data, but I doubt if that's the issue. Check the save locations to see whether or not the data is actually being obtained and saved. You could try a fresh minimal portable install as a quick test. SMP doesn't have any special requirements to work on W7, as far as I know, that could have been effected by the W7 update.
Title: Re: Biography Discussion
Post by: WilB on 2019-03-09 15:58:01
@WebSkater

Please also ensure your system complies with the installation (https://github.com/TheQwertiest/foo_spider_monkey_panel/wiki/Installation) requirements for Spider Monkey Panel, in particular, since it looks like you're using 1.3.20, that Visual Studio 2017 Redistributable is installed / hasn't been effected by the W7 update.
Title: Re: Biography Discussion
Post by: WebSkater on 2019-03-09 21:12:27
@WilB
many thx for your quick reply. I'll test all your sugestions and report after the weekend.
Title: Re: Biography Discussion
Post by: WebSkater on 2019-03-11 11:47:09
@WilB
after hours ofter reinstalling, testing, reading, ... I finally got at least a few biograhys from allmusic. May be I found a reason for that strange behaviour not to show allmusic biographys, and it could be related to tagging.

A very huge part of my music library consists of SAMPLERS, COLLECTIONS and SINGLES:
- the tagging for %artist% is always the correct artist name.
- the tagging there for %album artist% always is "VA" or it is not set.
- the tagging for %album% in SAMPLERS is the name of the sampler ("Bravo Hits 101", "Bravo Hits Vol. 101" or "VA - Bravo Hits 101" for example"). In COLLECTIONS the tag %album% is 'misused' being a description like "Top 100 Single Charts". Concerning SINGLES %album% is not set or set to the same as %title% (as single releases or single tracks having no official album name).

The other part of my music library is ARTISTS ALBUMS:
- the tagging for %artist% is always the correct artist name, %album artist% for being the same as %artist" is empty.
- %album% tagging depends: if having more than one release %album% has a release desciption apended in brackets, for example "Greatest Hits (Jap. Edition)" or "Live at Wembley Stadium (Deluxe Edition)". If many cases in my 'audiophile albums' %album% is similar tagged as for example "Hotels & Dreamers  (Stockfish SFR 357.6028.2)" for one of my Allan Taylor albums.

On the "tenth reading" of your description I got aware that album tags could have to do with allmusic biograhys, but for only looking after biograhy (as biograhy seemed to me to be there more common thing compared to albums reviews, and I wanted to first have one thing to function properly) I completely overlooked this part of the description. Alltough it is not completely clear to me what to do to get satisfying results.

Beside your "Biography Script" I used 'foo_run' and 'Wsh.Shell run' to validate that allmusic has a biograhy for the choosen artist and in most instances I got to the correct biography, so that "album% could have to do something to do with finding a bio came not into my mind. But I remember I spent a lot of time with try and error to  set up foo_run for allmusic artist search before I found a satisfying result for me with "$replace(%artist%,' ','_','&','and')").Eval(true)". If I tried to use "...' ','_'...) in for searching allmusic artist albums I only got errors or nothing of value for me. But as you can see I'm not really very experienced when it comes down to programming or skinning - for me the most important thing is to have a fine looking and perfect funtionating foobar and to have lots of beautiful music.
As the problem is not solved for me, any suggestions to get satisfying biograhy results without %album% ?

PS: best thing of weekend and all the time researching my "bio-problem" was I accidentally found your "style function". And I have to say I'm much much more than impressed by it. It would have lasted for sure quite some time before I would have tried to figure out the "style fUnction" doing it all my normal way. May be it could be a good idea to post a video @youtube to show your beautiful biography script with all it's possibilities to the whole foobar community and link it al your avatar. A picture or a video says more than thousand words, and for many people doing a "how to video" is much easier than to write a detailed description.
Title: Re: Biography Discussion
Post by: Ottodix on 2019-03-14 11:27:55
Hi,

I just found a very litle bug :
1: Activate Image+Text mode
2: play an album with a bio/review long enough to activate the scrollbar
2: With a mouse-wheel clic over the image, switch to the "image only" mode
3: Resize the window horizontally
4: Switch back to the image+Text mode

The scrollbar horizontal position will then be wrong. Hidden if you have made the panel thinner while in Image only mode, or overlapping the text if you have made it larger
Title: Re: Biography Discussion
Post by: WilB on 2019-03-14 12:50:31
@Ottodix

Reproduced & should be fixed in the next version. Thanks for reporting.

@WebSkater. Thanks for the feedback.

AM biographies

To discern artists of the same name, AM searches require and match the album + album artist. So the behaviour you see is by design (see documentation).

Where there is no album name or its not matched, AM biographies can be obtained through "Show More Items" menu. Here top albums of an artist can be searched at AM (& also LFM). The AM look-up checks the AM biography.

I re-examined the possibility of searching by artist name alone
It works well in many cases.
Problem cases: different artists with same name. No way of identifying correct artist in returned list. First match would be used, i.e. most popular artist.
A quick test showed that this method resulted in 2-3% of all AM biographies being for the wrong artist. I'm reluctant to add methods that aren't robust, especially since LFM biographies are available. It would also require some sort of manual interaction to deal with incorrect ones, which is cumbersome in itself, and which doesn't work well with auto-updating of biographies.

Note that loading of AM biography text files uses the artist name only, & assumes the correct one has been obtained by this stage. This maximises flexibility since it means existing AM biographies should work for singles, streams, artists on compilations, etc. It also means that only one matching album per artist is required to obtain the biography.

LFM biographies

These usually include all artists with the same name and so searching / loading can just use the artist.

Album reviews

A sufficiently close match between the search album name & that used by the site is required. Including "release desciption" type info as part of the name may break the look-up. It can be better to put that info in a separate tag; likely you won't want to do that though. The script does have an optional "Album Name Auto-Clean" option in server settings that will handle some common scenarios. One user found it helpful to truncate search album names at the first "("  [see here (https://hydrogenaud.io/index.php/topic,112914.msg956371.html#msg956371) for how to do it].
Title: Re: Biography Discussion
Post by: WebSkater on 2019-03-15 22:01:08
@WilB
many thanks for your detailed reply. I'll test your sugestions the next days, and think it will help me a lot to understand the working of your beautiful script in detail. For the AM biography: what about searching for %artist% + %title% as a alternative option. I think it could help in most cases to find artists bios for single releases. Did you research this item too?
Title: Re: Biography Discussion
Post by: huggy020 on 2019-03-27 18:06:15
Can anything be done at all about radio stations with %artist% and %title% reversed
eg http://edge-bauermz-01-cr.sharp-stream.com/magicsoul.aac
thanks
Title: Re: Biography Discussion
Post by: WilB on 2019-03-28 16:47:20
@WebSkater I tested your idea & it seems to work fine. It should be in the next version.

@huggy020
AFAIK it's not possible to auto-detect the artist - title order in streams, and so remapping would need to be applied on a stream by stream basis.

Artist stuff: this is fairly straightforward, and can already be done.

In server settings (biography.ini) you would need to remap %BIO_ARTIST%. Two examples are below. Adjust comparison string(s) as required.

Code: [Select]
%BIO_ARTIST%=$if($strstr(%path%,edge-bauermz),%title%,$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0)))
// Use $or for more than 1 stream. Example below has two streams but more could be added.
%BIO_ARTIST%=$if($or($strstr(%path%,sharp-stream.com/magicsoul),$strstr(%path%,sharp-stream.com/planetrock)),%title%,$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0)))

In panel properties one of the headings would need adjusting: "Heading Title Format Track Review..."
Within the heading change %title% to e.g.,
Code: [Select]
$if($strstr(%path%,edge-bauermz),%artist%,%title%)

If you display track reviews, that's currently more complicated as the title definition is hard coded, and changing it would require editing the script.

I might consider adding %BIO_TITLE% to server settings for the next version to make this easier. %BIO_ARTIST% and %BIO_TITLE% definitions in the server settings could then simply be remapped, but its only worth it if the remapping method is a satisfactory solution. It wouldn't then be necessary to edit the script at all + headings & subheadings would be handled automatically as well.

If you currently want to get track reviews working and don't mind editing the script then:
Shift+right click > configure
Locate:
this.title definition on ~line 995. Within it change $meta(title,0) to e.g.
Code: [Select]
$if($strstr(%path%,edge-bauermz),%artist%,$meta(title,0))
this.trackID definition on line ~996. Replace the whole line with e.g.,
Code: [Select]
this.trackID = focus => p.eval(p.tf.a + "$if($strstr(%path%,edge-bauermz),%artist%,%title%)", focus);

You would also need to similarly change one of the subheadings in panel properties: "Subheading Track Review Title Format..."
Title: Re: Biography Discussion
Post by: WilB on 2019-03-28 18:34:16
You'll also likely need to remap %BIO_ALBUMARTIST% in a similar way to %BIO_ARTIST%

Since it may be generally useful, I went ahead and added %BIO_TITLE% to server setting in my copy. This should help with remapping etc.  It should be in the next version.

HTH
Title: Re: Biography Discussion
Post by: huggy020 on 2019-03-29 01:14:03
@WilB Thanks. I think I will go on and try it
Title: Re: Biography Discussion
Post by: huggy020 on 2019-03-29 09:40:26
I tried the artist stuff and its good. I will stop there and wait for the next version
Title: Re: Biography Discussion
Post by: WebSkater on 2019-03-30 12:50:04
@WilB
nice to hear my idea could be possibly helpful.
Meanwhile I found another issue. If there are differnt artists with the same name, there are always images that are not correct and therefor unwanted. Same for LMs red warning images "keep stats clean" (even if all tags are absolutely correct). I can delete these images, but how to block downloding these images the next time playing the song or album or artist again? May be not to delete and to rename these unwanted images in a certain way, for example a underscore at beginning or end of the name, or something similar could be a solution?
Title: Re: Biography Discussion
Post by: WilB on 2019-03-30 18:45:57
I've added the ability to black list images. It should be in the next version & deal with both points. Regarding LFMs red warning images "keep stats clean": the script does try to handle this already by blocking those I know about. In future they can be black listed any way. But if you want any added to the automatic exclusion list then please advise the exact artist names causing an issue PLUS the language setting you use & I'll try & add them.
Title: Re: Biography Discussion
Post by: zeremy on 2019-04-03 14:31:23
Can anything be done at all about radio stations with %artist% and %title% reversed
eg http://edge-bauermz-01-cr.sharp-stream.com/magicsoul.aac
thanks

@Peter
Could this remapping be done from foobar2000 natively?
eg. swap metadata if we append to the url ?swap_metadata
http://edge-bauermz-01-cr.sharp-stream.com/magicsoul.aac?swap_metadata
Title: Re: Biography Discussion
Post by: dwmartin0906 on 2019-04-23 07:50:23
Hi.  I just installed Spider Monkey 1.2.0 and got the following error in my Biography panels.  My other Spider Monkey panels are OK, so I think the issue may lie with the Biography component.  Please let me know if I need to move this to the Spider Monkey discussion group.

Error: Spider Monkey Panel v1.2.0 ({CC438F09-5BB0-4067-AA7B-232EB140F0F3})
can't access dead object

File: <main>
Line: 2353, Column: 411

Stack trace:
  Images/this.chk_arr@<main>:2353:411
  on_notify_data@<main>:2808:438
  Images/this.set_chk_arr@<main>:2377:94
  Images/this.getArtImg@<main>:2369:157
  Images/this.get_images@<main>:2368:150
  getImgFallback@<main>:2340:129
  Images/this.draw@<main>:2755:48
  on_paint@<main>:2809:37
Title: Re: Biography Discussion
Post by: kutuzof on 2019-04-23 10:38:44
The same situation. Plus, sometimes the foobar2000 remains to hang in the task manager upon exit.
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-04-23 14:13:23
@WilB : regarding errors reported above - this info (https://github.com/TheQwertiest/foo_spider_monkey_panel/blob/c6c096ba9bca9688946cd2b76fbf844683d4e354/component/docs/Callbacks.js#L301) might be relevant.

Plus, sometimes the foobar2000 remains to hang in the task manager upon exit.
If you are using SMP v1.1.x, you should try updating to SMP v1.2.0 first. If the problem persists, please create a memory dump using the following instructions (https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/61#issuecomment-470036761) and post it in in SMP thread (https://hydrogenaud.io/index.php/topic,116669.0.html).
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-04-23 14:16:34
[double-post]
Title: Re: Biography Discussion
Post by: kutuzof on 2019-04-23 14:35:08
http://file.sampo.ru/fgrt6z/
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-04-23 14:59:17
http://file.sampo.ru/fgrt6z/
Could you use some other file sharing service (e.g. drive.google.com or mediafire.com)? Since this one has a download speed limit of 48KB/s...
Title: Re: Biography Discussion
Post by: WilB on 2019-04-23 18:29:16
@dwmartin0906 & @kutuzof

Thanks for the feedback & also to @TheQwertiest for insight into the nature of the error.

I have fixed the SMP 1.2.0 related issue on my copy. The next version of Biography will require SMP 1.2.x, and is planned to be released once there is a stable version of SMP 1.2.x.
Title: Re: Biography Discussion
Post by: dwmartin0906 on 2019-04-23 19:14:23
@WilB and @TheQwertiest, thank you both for your help.  I corrected the typo in Callbacks.js and Biography works fine now.  And thank you for creating and maintaining such wonderful components.  All your time and hard work is greatly appreciated.
Title: Re: Biography Discussion
Post by: AndreaT on 2019-05-05 20:34:24
Problem: YTTM directory is grown over 900 MB !!!!!

Hello,
I want to know if it is possible to avoid any caching at all or limit to total amount of disk space used to a given limit (like 20MB or so).

Thanks and regards
Andrea
Title: Re: Biography Discussion
Post by: WilB on 2019-05-05 23:04:08
Currently you can limit the cache size by locating the following, and entering a number, e.g. as indicated.

menu > sources > server settings:

[MISCELLANEOUS]
...
Image [Artist] Cache Limit=6

Save biography.ini after making changes & restart foobar2000.

The value is the number of images per artist. So that will limit the number of images to 6 per artist (or whatever number is entered). The cache limit is applied for a particular artist when updated during the normal image update cycle and when images are no longer in use.

Lfm have taken significant steps to inhibit image downloading already, & so I'm reluctant to potentially aggravate the situation by removing caching altogether. Also to quote from the site: "You will implement suitable caching...".

If the cache limit is used with "Auto-Add New", also in server settings, newer images are added & older removed to give a fixed number of up-to-date images.
Title: Re: Biography Discussion
Post by: Sergey77 on 2019-05-09 17:06:02
1.
so I'm reluctant to potentially aggravate the situation by removing caching altogether.
WilB,
But the user can independently clear the cache as much as he wants by deleting image files. Therefore, the enabled image caching mode by default allows your script to provide "You will implement suitable caching..." and having the ability to disable caching will provide the user with the necessary choices.
2.
If the cache limit is used with "Auto-Add New", also in server settings, newer images are added & older removed to give a fixed number of up-to-date images.
Enabling this mode, I can not change the mode of caching images. Maybe I'm doing something wrong, but it seems that it does not work.

3. Implementing the “lock” mode for Biography script (as suggested previously and as implemented in YouTube Track Manager script) will also allow in some cases to reduce traffic.
(It was also previously noted that the need for the "lock" mode is necessary because sometimes a song ends (image and text change) before you have time to read the text and view the images (for example when listening to internet radio).

Thank you!
Title: Re: Biography Discussion
Post by: WilB on 2019-05-10 10:45:57
Lock mode.

I implemented that for you a while ago in the Spider Monkey Panel version. See Changelog here (https://hydrogenaud.io/index.php/topic,112914.msg967378.html#msg967378).

To use the feature "menu > sources > show more items" button has to be enabled. Middle click the button to toggle the lock (as indicated by the tooltips). This was added as a discrete button (top left) so as not to interfere with image only views. The button also gives access to other features through normal click.

Image [Artist] Cache Limit.

This is a per artist limit. It can't be limited to a number lower than the target number of images per artist ("Initial Fetch Number"), as that takes precedence. If auto-add is enabled that always tops up to a minimum of 5 per artist, and so it can't be lower than that either. I confirmed its working as expected on my device. It was really designed to limit increases through auto-add. It only operates as images for a particular artist are updated during the normal image update cycle and providing they not in use. It's also worth pointing out that images can be set to save anywhere. So, for example could be saved to an old "USB" stick and forgotten about etc etc. It also means that multiple foobar2000 installs can use the same set of images. If there are still issues I might consider adding some other handling.
Title: Re: Biography Discussion
Post by: Sergey77 on 2019-05-10 13:22:53
Lock mode.

I implemented that for you a while ago in the Spider Monkey Panel version. See Changelog here (https://hydrogenaud.io/index.php/topic,112914.msg967378.html#msg967378).

To use the feature "menu > sources > show more items" button has to be enabled. Middle click the button to toggle the lock (as indicated by the tooltips). This was added as a discrete button (top left) so as not to interfere with image only views. The button also gives access to other features through normal click.
WilB,
1. I apologize, I was not attentive. The lock mode feature is implemented and that made very nice and convenient.
Thank you very much! :)
Is it correct that the images continue to load when the lock mode is on?
2. I tried to experiment with the Server Settings. As a result, to limit the download of the number of images, it is enough to set the number for the parameter "Initial Fetch Number" from 1 to 20 (bioini.jpg). Thus, we can limit the size of the load, if you don't think it is right to disable caching.

Thanks again for your great work!
Title: Re: Biography Discussion
Post by: WilB on 2019-05-10 13:38:01
Quote
Is it correct that the images continue to load when the lock mode is on?

Images for the locked artist should continue to load and cycle as normal, if that's what you mean. However, certain track types, like YouTube tracks, can be slow to start actual playback and if locked in that few second window between double-clicking a track and actual playback starting it will lock on previous.
Title: Re: Biography Discussion
Post by: Sergey77 on 2019-06-02 16:30:53
@WilB,
please consider adding the mode of viewing the history of cached images and biographies in chronological order (for example, when lock mode is enabled). It would be convenient to scroll using the mouse wheel or using a drop-down list of chronologically stored data. The number of entries in this list may not be large and adjustable. For example, 20-30 last entries would be enough.
This is useful for finding a listened artist whose name you have forgotten but would like to remember again (for example, when listening to Internet radio).
Thanks!
Title: Re: Biography Discussion
Post by: WilB on 2019-06-03 12:30:58
I've added the feature for the next version.
Title: Re: Biography Discussion
Post by: WilB on 2019-06-10 12:49:04
New Version: Biography 1.1.0 (https://hydrogenaud.io/index.php/topic,112913.50.html#msg972269)

NEW: AM biography look-ups now directly support singles & streams etc.
    - Requires matching title as well as artist to facilitate discerning artists of the same name.
NEW: Black list for images (right click > menu > image). Designed to filter out occasional unwanted LFM artist images.
NEW: %BIO_TITLE%. Enables remapping of title. Configure in server settings if required.
NEW: Artist history for biographies and images. History shows in chronological order on "More Items Menu". Default is disabled. To use:
   1) Ensure menu > sources > show more items... button is enabled (button shows top left).
   2) More items menu now has extended options for which items to display in the "More..." flyout item. Choice of:
      - Show Similar Artists
      - Show More Tags (multi-value artist entries, composers and performers etc)
      - Show Artist History // enable to show artist history
CHG: Improved Icons for "More Items & Lock" buttons: lock now has a proper "lock" icon. FontAwesome (https://github.com/FortAwesome/Font-Awesome/blob/fa-4/fonts/fontawesome-webfont.ttf?raw=true) is required to display these, else icons fallback to previous.
CHG: Updated scrollbar handling. New default button icons + auto-minimises & auto-hides by default. Behaviour & look can be set as previous on layout > scrollbar menu.
CHG: Various optimisations.
FIX: Reported issues.

Title: Re: Biography Discussion
Post by: redorb on 2019-06-11 09:11:17
Hello WilB

Just noticed the new release of Biography. That's great news!
Can I install on top of my favourite skin Tedgo's DarkOne4?
It's a bit confusing finding the right spiderMonkey 1.2.1+
Is this the right one?
https://github.com/TheQwertiest/foo_spider_monkey_panel/releases/tag/v1.2.1
(https://i.imgur.com/gqLAhto.png)
Some time ago you helped me with this by creating a modified fcl.

(DarkOne v4.0 - Tedgo - JScript Biography Version (0.9.01) - Modified by WilB.fcl)

If you could do this once more it would be higly appreciated!
I'm using foobar 1.4.4 and JScript Panel 2.0.1+ with Biography 0.9.0.2 and Tedgo DarkOne4.
Windows 7 x64

I added my fcl if you need it.

Best regards,
redorb
Title: Re: Biography Discussion
Post by: WilB on 2019-06-11 17:36:45
Yes that's the correct spider monkey panel component version.

Here is a modified version of DarkOne v4.0 with Spider Monkey Panel Biography (v1.1.0).

All original credit to tedgo for the theme.

To use:
1) You HAVE TO install tedgo's DarkOne v4 according to tedgo's instructions here (https://www.deviantart.com/tedgo/art/DarkOne-v4-360862076), unless it's already installed. This is required so that all the necessary stuff is in place. From tedgo instructions: ensure you BACKUP YOUR EXISTING COMPONENTS, CONFIGURATION FILES AND THEMES BEFORE EXECUTING THE SELF-EXTRACTING ARCHIVE!

2) Import the below fcl file: foobar2000 preferences > columns ui > main tab. Note that the fcl file was modified from redorb's version posted above and so may have some 'redorb' settings.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-06-11 17:51:58
@WILB - Just offering my gratitude and thanks once again for your outstanding work - your scripts are superb!!
Title: Re: Biography Discussion
Post by: redorb on 2019-06-12 09:38:58
Hello WilB!

That worked like a charm! Thank you so much! I really appreciate your help!

Got an error that a newer version of Columns UI was required so I found this and after installing all is well! :D
https://yuo.be/columns_ui
(https://i.imgur.com/8nMgHwL.png)
Was surprised my tweaked paths to ytm folder was kept, and all settings also, that's just great! :D

Best regards,
redorb
Title: Re: Biography Discussion
Post by: Sergey77 on 2019-06-16 05:02:35
Hi there!
@WilB, please consider adding the scrollbar for the image area (as an option).
This feature will allow to get the following:
1. recognize the first and last image in the buffer (for the artist's folder of course)
2. not cyclical viewing of pictures
3. improve the image scrolling process (relative to scrolling only with the mouse wheel)
4. visualize the process of downloading images (indirectly)

p/s
Version 1.1.0 works flawlessly.
Thanks!
Title: Re: Biography Discussion
Post by: WilB on 2019-06-27 16:14:36
^ I've added a SeekBar for image scrolling. It should be in the next version.
Title: Re: Biography Discussion
Post by: WilB on 2019-07-10 17:44:37
New Version: Biography 1.1.1 (https://hydrogenaud.io/index.php/topic,112913.msg973096.html#new)

FIX: Updated due to changes at lfm.

NEW: SeekBar for image scrolling. Enable menu > image > seekbar. Displays if > 1 image.

NEW: Album History, to compliment the already present Artist History. Displayed on "More Items Button" menu. Use "right click > menu > sources > show more items button" to enable the button if its not shown (button shows top left).

CHG: "More Items Menu Button" (top left), artist history & album history are now enabled by default on new installs.
   To configure which items are displayed use "More..." flyout on "More Items Button" menu.
   To hide "More Items Button", use menu > sources...

CHG: Simpler heading and subheading that are more language neutral. These are loaded by default on new installs. Existing installs should retain previous heading and subheading settings. Both can be configured in panel properties.
Title: Re: Biography Discussion
Post by: kutuzof on 2019-07-11 10:10:12
Greetings, WilB!
Will the update "Biography 0.9.0.3" for the JScript Panel due to the update on the last.fm.
Thanks.
Title: Re: Biography Discussion
Post by: redorb on 2019-07-11 11:34:24
Hello WilB!

Thanks for the Biography 1.1.1 update, worked like a charm!
Just love the new features! Much appreciated!
Best regards,
redorb
Title: Re: Biography Discussion
Post by: WilB on 2019-07-12 09:37:27
@kutuzof

Quote
Will the update "Biography 0.9.0.3" for the JScript Panel due to the update on the last.fm

Please explain further why you have requested this. Why not use the Spider Monkey Panel version?
Title: Re: Biography Discussion
Post by: kutuzof on 2019-07-12 15:06:27
Simply there is an assembly with scripts for the "JScript Panel". I would not want to use two components together.
Thanks!
Title: Re: Biography Discussion
Post by: WilB on 2019-07-12 17:27:58
I've uploaded a JScript panel compatible version in the usual location.
Title: Re: Biography Discussion
Post by: kutuzof on 2019-07-12 18:39:24
Thank you very much! I wish you success!
Title: Re: Biography Discussion
Post by: kutuzof on 2019-07-12 18:40:43
Thank you very much! I wish you success!
Title: Re: Biography Discussion
Post by: Ottodix on 2019-07-21 14:25:12
Hi WilB,

I would have a small request regarding the selection mode : would it be possible to halt the search for bio and imgs when the panel isn't visible, and trigger it only when the visibility changes? Otherwise, when this script is incorporated in a theme, it eats ressources when playback changes (or when selected track changes if nothing is played) even when it's not visible.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-07-21 14:42:49
i haven't had time to look into it, but I'm getting frequent panel errors when displaying new items (first time read into library).

Just FYI reporting:

Error: Spider Monkey Panel v1.2.1 (Biography v1.1.1 by WilB)
can't access dead object

File: <main>
Line: 3466, Column: 15

Stack trace:
  get_rev@<main>:3466:15
  Server/this.fetch@<main>:3348:93
  on_notify_data@<main>:3295:893
  Panel/this.getData@<main>:510:177
  Panel/this.changed@<main>:490:42
  Panel/this.focus_serv<@<main>:507:41
  T@<main>:18:174
  w@<main>:18:396
  l@<main>:18:300
Title: Re: Biography Discussion
Post by: WilB on 2019-07-21 18:01:14
I couldn't seem to reproduce the issue. However, I suspect the problem is in function on_notify_data. If you're comfortable with altering the code a little can you try replacing all of line 3295 with that below and let me know if it fixes the issue? I did a quick test & it seems fine. Otherwise I'll need to test it much more extensively...

Code: [Select]
function on_notify_data(name, info) {let copy; if (ui.local) on_cui_notify(name, typeof info === 'string' ? String(info) : info); switch (name) {case "chkTrackRev_bio": if (!p.server && p.inclTrackRev) {copy = Object.assign({}, info); copy.inclTrackRev = true; window.NotifyOthers("isTrackRev_bio", copy);} break; case "isTrackRev_bio": if (p.server && info.inclTrackRev == true) {copy = Object.assign({}, info); serv.get_track(copy);} break; case "img_chg_bio": img.fresh(); men.fresh(); break; case "chk_arr_bio": img.chk_arr(JSON.parse(JSON.stringify(info))); break; case "custom_style_bio": p.on_notify(String(info)); break; case "force_update_bio": if (p.server) {copy = JSON.parse(JSON.stringify(info)); serv.fetch(1, copy[0], copy[1]);} break; case "get_multi_bio": p.get_multi(false); break; case "get_rev_img_bio": if (p.server) {copy = JSON.parse(JSON.stringify(info)); serv.get_rev_img(copy[0], copy[1], copy[2], copy[3], false);} break; case "get_img_bio": img.grab(info ? true : false); break; case "get_txt_bio": t.grab(); break; case "multi_tag_bio": if (p.server) {copy = JSON.parse(JSON.stringify(info)); serv.fetch(false, copy[0], copy[1]);} break; case "not_server_bio": p.server = false; timer.clear(timer.img); timer.clear(timer.zSearch); break; case "blacklist_bio": img.blkArtist = ""; img.chkArtImg(); break; case "script_unload_bio": p.server = true; window.NotifyOthers("not_server_bio", 0); break; case "refresh_bio": window.Reload(); break; case "reload_bio": if (!p.art_ix && ppt.artistView || !p.alb_ix && !ppt.artistView) window.Reload(); else {t.artistFlush(); t.albumFlush(); t.grab(); if (ppt.text_only) t.paint();} break;}}
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-07-21 18:39:31
@WilB , FYI, this error occurs when some object was not (deep-)copied properly in `on_notify_data` and was accessed outside of `on_notify_data`.
Title: Re: Biography Discussion
Post by: WilB on 2019-07-21 18:51:25
Yes, hopefully I've got them all this time.
Title: Re: Biography Discussion
Post by: mire777 on 2019-07-30 02:55:53
Does someone know how to make this script and other jscript's working in foobar under linux mint? I didn't have sucess with wine?
Title: Re: Biography Discussion
Post by: Sergey77 on 2019-09-03 16:08:12
Hi there!
@WilB,
first of all, thank you for developing your excellent Biography script and all improvements!
Next, I will highlight several points that I noted in use it:

1. When the SeekBar for image scrolling feature is activated, the visualization freezes while the mouse pointer moves over the image area (for SeekBar "Auto" and "Show" modes). This appears even for the "Text Only" mode when you move the mouse over the text area. I think this is due to the processor resources spent on updating the image area.
In this regard, let me suggest reconsidering (if possible) the implementation of the SeekBar feature (probably it will be other name) as shown in the attached picture (see image_field.jpg). In my opinion, this can solve this problem.

2. I noticed that the feature "Artist History" does not save the name in the history list when changing artists of dynamic metadata radio streams. The artist name in the history list is saved only if you stop playback and start playback another radio stream.

3. With SeekBar feature, your script allows comfortably view images of artists. Please consider increasing the maximum number of downloaded images (perfect without limitation).

4. An error occurred while scrolling text ("Text Only" mode) (see error.jpg). Let me know if you need more information to fix this issue.

Thank you again for the possibility to use your all excellent scripts for fb2k!
Title: Re: Biography Discussion
Post by: jazzthieve on 2019-09-05 11:23:28
It's been a while since I've used this component. Apparently it's now on spidermonkey instead of jscript panel. I remember this component being able to download and display artist images (taken from last.fm). Apparently none of this seems to be possible anymore. Is this from last.fm side? Why is there even a server settings option to switch on dowloading artist images? Even displaying already downloaded artist images seems to be not possible.
Title: Re: Biography Discussion
Post by: paregistrase on 2019-09-05 13:18:39
Does someone know how to make this script and other jscript's working in foobar under linux mint? I didn't have sucess with wine?

I managed to make it works in ubuntu.

It is a little bit tricky.

Of course change USER with your username ;-)

first thing is make a new 32bits  wine profile for foobar.

Open console and write:

Code: [Select]
export WINEARCH=win32 && WINEPREFIX=/home/USER/.winefoobar2000 winecfg

This create the profile and open wine configuration.

Install foobar in this profile in portable mode and make sure the path have no spaces or points (when I install it in ~/.foobar2000 I have problem with the data write for several scripts). I install it in ~/bin/foobar2000 and never have any problem.

Code: [Select]
WINEPREFIX=/home/USER/.winefoobar2000 wine PATHTOFOOBAR2000INSTALFILE.exe

Now open winecfg again and select windows XP version.

Again in the console write

Code: [Select]
env WINEPREFIX='/home/USER/.winefoobar2000' winetricks

Select default profile, install dll and install the next ones in this order (this is important, don't know why ;-P)

ie8
vcrun2017
msxml3

Close winetricks, open winecfg and change window version to windows 7 again.

Another time I don't know why but with xp version foobar always freeze.

With this the panel works but when you try to open a link gives you a warning and doesn't open the navigator.

For making it open the default browser again:

1. Open Wine Regedit:

Code: [Select]
env WINEPREFIX='/home/USER/.winefoobar2000' wine regedit



2. Navigate to HKEY_CURRENT_USER (a.k.a HKCU) -> Software -> Wine and look for a key called "WineBrowser", if it does not exist, create it. Under the newly created "WineBrowser" key, create a string called "Browsers" with the following value:

Code: [Select]
xdg-open,firefox,konqueror,mozilla,netscape,galeon,opera,dillo


Don't worry about the browsers order in the above code. Just make sure "xdg-open" is the first one, as that will make sure that when you click a link in a Wine application, your default native Linux browser will be used to open that link.

3. But we are not done! At this point if you click a link in Wine, you'll get the following error:

err:winebrowser:get_url_from_dde Unabled to retrieve URL from string L"\""
err:winebrowser:wmain Usage: winebrowser URL



To fix this, go to HKEY_CLASSES_ROOT -> http -> shell -> open -> command and edit the data value by adding "%1" at the end of the line, so that it looks like this:

C:\windows\system32\winebrowser.exe -nohome "%1"

Same for https

Close regedit and enjoy.

You can launch foobar from the console from the console with

Code: [Select]
env WINEPREFIX='/home/USER/.winefoobar2000' wine /home/USER/bin/foobar2000/foobar2000.exe

or create a launcher in /home/USER/.local/share/applications.

Create a file with the name foobar2000.desktop, open in text editor and write something like this:

Code: [Select]
[Desktop Entry]
Name=foobar2000
GenericName=foobar2000
Comment=Music Player
StartupWMClass=foobar2000.exe
Type=Application
Exec=env WINEPREFIX="/home/USER/.winefoobar2000/" wine Z:\\\\home\\\\USER\\\\bin\\\\foobar2000\\\\foobar2000.exe
Terminal=false
StartupNotify=true
Path=/home/USER/bin/foobar2000
MimeType=audio/basic;audio/vnd.wav;audio/x-wav;audio/x-aiff;audio/ogg;audio/vorbis;audio/x-vorbis+ogg;audio/mpeg;audio/mp4;audio/aac;audio/x-wavpack;application/vnd.apple.mpegurl
Categories=AudioVideo;Audio;Player
Icon=/home/USER/.local/share/icons/foobar2000.png

Note that you need to put a foobar2000 png in /home/USER/.local/share/icons/.
This is only cosmetic.

Save and close.
 
Make it executable in the permissions tab of propieties.

With this it will display in the shell when you search foobar.

Hope that it works for you too.


The only thing that I can't make it work is the download of artist and album images.

I use foo_discogs for this task.

(https://i.imgur.com/f5HE12u.png)
Title: Re: Biography Discussion
Post by: jazzthieve on 2019-09-05 22:38:05
Before I'm spending some more frigging hours on this I would seriously want to know the answer to this simple question.....does this component still download artist images from last.fm or not? A simple yes or no would do, this is turning out to be some frustrating sh*t here. Image [Artist] Auto-Fetch is set to 1 on server settings.
Title: Re: Biography Discussion
Post by: Sergey77 on 2019-09-06 01:58:38
Before I'm spending some more frigging hours on this I would seriously want to know the answer to this simple question.....does this component still download artist images from last.fm or not? A simple yes or no would do, this is turning out to be some frustrating sh*t here. Image [Artist] Auto-Fetch is set to 1 on server settings.
@jazzthieve, Absolutely yes. The script works well and downloads images from the site last.fm. You need to install the new version of the script.
Title: Re: Biography Discussion
Post by: handleyman on 2019-09-16 07:57:22
Thanks for the work; this all performs fine. But, when did the Allmusic and LastFM biogs become identical??? No matter which artist I choose, the wording from the two sources is exactly the same...
Title: Re: Biography Discussion
Post by: WilB on 2019-09-17 10:53:46
Except for rare cases where the LFM site uses the AM biography, the LFM & AM bios should be different. I checked both sites and they seem to be working correctly.

Check the server settings in biography...ini. 1) Ensure you haven't set the same save locations for the two bios, which would cause them to overwrite each other and the behaviour you describe. 2) Check you haven't disabled [AUTO-FETCH] for one of the bio sources. If using the Spider Monkey panel version, server settings can simply be reset by: right click > menu > sources > server settings > reset to default.

Also by default, the bio falls back to whichever is available if only one is found. LFM requires matching the artist name as the bio usually includes all artists of the same name. AM bios only contain a single artist: so to discern artists of the same name the album name has to match as well. If the album name is missing or can't be matched at the site, a match to the track title is used instead (Spider Monkey Panel Version only).

If further discussion is required, please put it in the main discussion thread (linked above) so as to keep this thread free of clutter, so latest download links can easily be found.
Title: Re: Biography Discussion
Post by: kutuzof on 2019-09-27 19:05:24
Hello Wilb!
Thank you so much for your work.
I updated the JScript Panel to version 2.3.0 and your script "Biography 0.9.0.4" no longer loads the text. Is there any way to fix this?
Title: Re: Biography Discussion
Post by: WilB on 2019-09-27 19:39:06
I have prepared a JSP v2.3.0 compatible version. I'll release it shortly when I've confirmed all is working.
Title: Re: Biography Discussion
Post by: Awesomeo on 2019-10-03 18:05:12
Hi, @WilB 
Now that I'm mostly done with Library Tree, I figured I'm gonna try Biography and so far I'm amazed! But obviously after some tinkering I have a couple of questions/requests:

1. Separate "no effect / reflection / border / shadow" for artist images and covers

I could really use this to make both views more distinct. And it seems to me that if there's already an option to make separate layout styles for both, then unique image styles could follow. This is what I came up with for test purposes:
a) Artist biography view has images side-to-side with reflection blending downwards and it looks just stunning to me (https://imgur.com/a/k5OMPJN)
b) Keeping the same image display style for covers looks great too (https://imgur.com/a/hsWqbKd), but I thought it could use some distinction like...
c) ...centering them and making them pop out thanks to underlying shadows (https://imgur.com/a/eeQYTqi)

Personally I believe that the cover art that is in 99% cases rectangular looks better when it's clearly isolated, whereas artist images that come in variety of ratios feel much better when they fill out the available space (side-to-side + auto-fill + fuzzy reflection downwards).

2. Don't calculate shadow as part of the image

I don't know whether it's just how the drawing function works, but for some reason positioning of the image takes shadow into account. So in order to achieve those perfectly centered covers with shadows like above, I had to manipulate "imL", "imR" etc. a lot. If I tried to set left and right both to zero or make the available cover space square, the image would be shifted to the left like in this example (https://imgur.com/a/TW5lF9M).
I think the shadow effect shouldn't count as part of the image, just like the reflection doesn't (at least when I'm trying to align it centrally).

3. Lock upscaling

This one isn't really indispensable to me and it's possible to get around the issue, but I think it could make things easier for some. That is, there could be an option for the image/cover to resize with the available area until the image's native resolution is reached.

4. Switching multi-value artists on biography overlay

Someone probably requested this before along the multi-value tag support, which resulted in the "More Items" button/menu. But this way additional track/album artists are treated as guests and only $meta(artist,0) is considered the main one. So I'm probably in the minority here if I treat the credited artists equally. Still, there are cases like collaborative albums where it's impossible to make it hierarchical. An example would be Sarah Davachi & Ariel Kalma - Intemporel (https://imgur.com/a/2vUE5DX).

I know that multiple biographies are auto-cycling anyway, but I would love to be able to switch between them from the position of biography, for example with arrows like these (https://imgur.com/a/J5Dtujz) - it would also make the collaborative nature more pronounced visually.

5. Custom biography folders for multi-value artists

Again similar problem as I had with Library Tree and disambiguating by MBIDs. In biography.ini my [NAMES] are pretty much the same, that is, they query by $meta(some_tag,0) just the same. However I wanted to change the [SAVE] pattern to my own, using MBIDs. And that's where the problems began with multi-value tags.

%BIO_ARTIST% and %BIO_ALBUMARTIST% will separate multi-value tags and neatly put all the credited album and track artists to their respective folders. But if I change this to e.g. %musicbrainz_albumartistid%, it will treat the tag as single value. And then $meta(musicbrainz_albumartistid,0) will only save the first value. Maybe I just don't see it, but I think it's impossible to make it work from the biography.ini standpoint.

Spoiler (click to show/hide)

Ok, that's a lot. I hope at least some of these make sense to you!
Title: Re: Biography Discussion
Post by: mjm716 on 2019-10-04 08:56:16
Question about image display in the review panel (v.1.1.1 smp 1.2.1).

I have sources>auto cycle images, and sources>cover: cycle from folder selected.
The review panel displays the cover art, but will not cycle, timed or mouse-wheel.

Artist biography panel (artist image) display (sources>photo: cycle from folder) cycles and works with mouse-wheel.

Anything I might be overlooking?
Title: Re: Biography Discussion
Post by: WilB on 2019-10-04 11:43:18
@kutuzof

Regarding a version that's compatible with JScript panel v2.3.0. Sorry for the delay in producing this. JScript panel v2.3.0 caused a full foobar2000 crash (Crash location: Module: foo_jscript_panel). I then couldn't start foobar2000 until I removed JScript panel v2.3.0...

If you're inclined, Shift+right click > configure > replace line 212 (this.save...) of 0.9.0.4 with the following line:

Code: [Select]
this.save = function(n, l) {try {return utils.WriteTextFile(n, l);} catch (e) {return false;}}

That should get it working with v2.3.0, but due to other non-critical changes in JScript panel I will release a fully fixed version in due course.


@Awesomeo

1. I can probably do that.

2. Mostly shadow isn't calculated as part of the image, at least if layout outer padding left & right is >=10. Main exception is image only with autofill and that was by design. But on further thought it can be done better as you suggest and I'll likely change it so it all works automatically.

3. Lock upscaling. I'm not sure I understand exactly what you mean. I tried using image at native size if it's smaller than the panel, otherwise fitting to available area. But that results in some images being rather small and lots of blank space. So I wasn't that convinced. If it was added, what menu name would it be (i.e. a short name that's accurate and obviously conveys its meaning?)

4. Switching multi-value artists. You can use mouse wheel over the button. If you want a visual indicator, I might consider changing the button so it's in some highlight colour when extra tags are available.

5. Yes you're right, you can't do it from the ini. Sorry, but it's way too involved to implement.


@mjm716

I checked 1.1.1 & it's working for me. Check that the folder location is valid & contains more than one image. Folder is specified in biography.ini: [COVERS: CYCLE FOLDER]. Note also that cover cycling is only available for the current track. It doesn't attempt to load for look-up items, i.e. last.fm top albums, since album covers other than front won't be available (menu item grayed). .

HTH
Title: Re: Biography Discussion
Post by: Awesomeo on 2019-10-04 14:29:26
1. & 2. Thank you for considering both! This will help a lot to make the panel look like I wanted.

3. Menu names: "No resize", "Don't resize" or "Block resizing" maybe? Honestly though if you don't think it's necessary, then I won't insist. I have already decided to keep square constraints in dimensions that won't resize my covers.

4. If you don't want to implement the option for two arrows on the left and right side of the image/bio (which I still low key think would be lovely - to switch multiple artists like that), then maybe there could be appropriate lines in panel properties for "more items" button customization? Changing its colour or symbol or size? But I do agree, what's most important is the option to toggle the button's visibility only on the condition when there are more tags available. And only then maybe changing the size of the button? The scrolling between biographies option is great, but when it's a small and transparent area, then I suppose it doesn't stand out enough to separate it from scrolling/cycling through singular artist's images.

5. I wrote this post before I read your answer in 'Library Tree" discussion, so I understand now it's too complicated to implement.

Thanks so much, again. I really appreciate the lengths you go to fill everyone's requests for your scripts!
Title: Re: Biography Discussion
Post by: WilB on 2019-10-04 16:02:48
4. You can already change the button size: mouse over then CTRL + wheel. I'll look into conditional highlighting or something similar.
Title: Re: Biography Discussion
Post by: kutuzof on 2019-10-04 17:11:22
Hello Wilb!
Thanks, I replaced the string and for now it works.
I will look forward to a new version for JSP v2.3.0.
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-10 20:57:32
Biography 1.1.1 NOT working on Windows 10 Pro 32bit ITA version with Spider Monkey Panel 1.2.2-preview

@WilB: I have 2 identical instances of FB 1.5 beta 18 running on Win7 Ultimate and on Win10 Pro (both 32bit ITA).

On Win7 all fine, no crash so far, but on Win10 I have a blocking error just after few seconds from the start.

See attached PDF for details.

PS: Already informed also TheQwerties for SMP.

Thanks and regards,
Andrea
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-27 11:18:40
@WilB : Hello WilB, Biography 1.1.1 was running fine since a week on my new Windows 10 Pro 32bit PC.
But, since this morning I am getting this annoyng blocking error (see attached screenshot).
I restarted the PC and Foobar a couple of times, but no solution.
What's changed over this week, it is only that yesterday I run the new monthly "big" Microsoft updates for Win10 1903.
Regards,
Andrea
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-10-27 12:18:07
The only thing I can suggest here is to find the image, that's being resized (and causing the error), and check if it's a valid image.
I.e. to diagnose the issue, it first must be narrowed down: does it happen with every image? does it happen with a specific image?
Title: Re: Biography Discussion
Post by: WilB on 2019-10-27 12:22:22
@AndreaT I had fixed something that may be related to your issue, though it was a rare event. I've sent you a pm with a link to a test version. Hopefully it fixes the issue. If not then more info on the lines @TheQwertiest suggested may help. I'm running Win10 1903 and all is OK here, but it's not 32 bit & it's not pro though...
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-27 16:23:17
@WilB and @TheQwertiest
The new script ver 1.1.2 beta1 changed the error to "out-of-memory" (see attached screenshots) even if I am having plenty of free memory available.
I don't know if related to a single picture or not. Now it is happening showing the biography of the Pink Floyd.
Fortunately, now I can simply "reload" and survive for some time without having to reboot Foobar.
Kind regards, Andrea
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-27 18:35:48
@WilB
Hello WilB, I tried also to set/enabled "Image => Enlarge on hover" and the error is not anymore popping-up so often, but it is still there... Just a matter of tens of minutes intead of tens of seconds...
And I am still speaking about the same biography "case" of the Pink Floyd.
Regards, Andrea
Title: Re: Biography Discussion
Post by: WilB on 2019-10-27 21:55:26
@AndreaT I've sent a pm with some debug info to try & work out whether the issue is a script problem or lays elsewhere.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-10-28 05:42:46
@WilB
And I am still speaking about the same biography "case" of the Pink Floyd.
Regards, Andrea

One indirect tip.

Often the artist images that get auto downloaded are very large. You may want to check your PFloyd artist image folder.

I've also received similar errors from the SMP scripts (esp. thumbs) when I have many artist or album images. It always happened when there are several images with sizes over 1mb in the source folders.

I've found a good batch fix is to use a WIN app like "agent ransack" which can mass search folders by file size or dimensions. All image results can then be bulk resized using the WIN Image Resizer utility.
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-28 07:28:55
@WilB :
Hello WilB, the script with the debug code is now running. I will update you asap. Thanks a lot for your support.

Attached the screenshots of the cached images with details of their sizes.
I provide you also compy of my current INI file in case it should have some wrong settings: I limited a lot the cache size...

Kind regards, Andrea
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-29 16:44:41
@WilB:
Hello WilB, today I having continous crashes every few tens of seconds.

Privately I sent to you the full console log.

Here attached only the most relevant screenshots.

Kind regards,
Andrea
Title: Re: Biography Discussion
Post by: WilB on 2019-10-29 17:43:25
Looking at the debug report the error is occurring on image.Resize() as before. The report also shows that the image existed, had valid dimensions (3141 x 4396) and that the target resize (271 x 379) was as expected. At ~3.5 MB the image isn't especially large and memory usage immediately before the resize event was very low (47.7 MB). As far as I can see this error is outside my control, since the image.Resize() event is handled by Spider Monkey Panel. May be @TheQwertiest can help? I also have that image on my device saved at exactly the same size & here biography loads it without issue. The full debug report is below.
 
Code: [Select]
 image EXIST true  
 image.Width 3141 
 image.Height 4396 
 img.crop false 
 circular false 
 imgx 0 imgy 0 imgw 100 imgh 100 
 image_path C:\Users\PersonalInfoRemoved\AppData\Roaming\foobar2000\yttm\art_img\p\Pink
 Floyd\Pink Floyd_9634c23d999a4ee7a14107577156f990.jpg 
 image file EXIST true 
 image file SIZE 3460022 
 this.cache_.img EXIST true 
 this.cache_.img.Width 3141 
 this.cache_.img.Height 4396 
 Resize width tw 271 Resize height th 379 
 SMP memory usage: window.TotalMemoryUsage: 47.75434 MB 
 Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (Biography v1.1.2 beta1
 with debug code by WilB) 
 Resize failed: 
 GdiPlus error: DrawImage failed with error (0x3): OutOfMemory 

 File:  
 Line: 3283, Column: 26 

 Stack trace: 
 ImageCache/this.cacheIt@:3283:26 
 Images/this.load_image_done@:2933:5 
 on_load_image_done@:3467:53 
 Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (Biography v1.1.2 beta1
 with debug code by WilB) 
 Resize failed: 
 GdiPlus error: DrawImage failed with error (0x3): OutOfMemory 

 File:  
 Line: 3283, Column: 26 

 Stack trace: 
 ImageCache/this.cacheIt@:3283:26 
 Images/this.load_image_done@:2933:5 
 on_load_image_done@:3467:53
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-10-29 17:49:20
Is it possible to check how many images are in the cache (i.e. loaded in memory)?
Title: Re: Biography Discussion
Post by: WilB on 2019-10-29 18:02:51
Cache only retains images for the current artist, adding images individually on load. Once the artist changes the cache is flushed, so there should never be that many.  That's also indicated by the memory consumption of only 47.7 MB, just prior to the resize error. Cache is also flushed if the images need to be displayed at a different size etc.

@AndreaT To get the number in the cache, put the following snippet somewhere amongst the debug code:
Code: [Select]
console.log("this.cache.length",this.cache.length);

Edit: Looking at the more extended debug log that I have, it appears that the error occurred as it tried to load the fourth image into the cache.
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-10-29 18:42:23
Thanks. Does it happen always on the same image?
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-29 19:17:11
@WilB: OK, I will do, however, kindly consider that in my INI file I limited that number to 5.
I will update you as soon as I will get a new crash log.
Thanks and regards, Andrea
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-29 19:19:36
Thanks. Does it happen always on the same image?

@TheQwertiest : I am sorry, I cannot reply to this, I don't know if the images are loaded randomly or with a precise sequence.
Title: Re: Biography Discussion
Post by: WilB on 2019-10-29 19:42:16
Debug code will tell you which image it errored on: it will be the last one in the console output, i.e. the one above the error (debug code shows the image_path).

INI setting is OK; updates to the images for a particular artist occur every 28 days and so your frequent error is unrelated. Also no attempt to delete excess images for a particular artist is made until a different artist is played. I just retested anyway to confirm (with Pink Floyd). You could always temporarily reset INI to default settings...
Title: Re: Biography Discussion
Post by: AndreaT on 2019-10-29 20:05:58
@WilB and @TheQwertiest :
Hello, here a new crash with cache size log.

Biography Server: allmusic album review: From The Vault - Extended Play Edition / Pink Floyd: not found
Biography Server: allmusic album review: Defacing The Wall / Pink Floyd: not found
Biography Server: allmusic album review: The Great Gig In The Sky / Pink Floyd: not found
Biography Server: allmusic album review: Greatest Hits / Pink Floyd: not found
image EXIST true
image.Width 500
image.Height 500
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path stub4
image file EXIST false
this.cache.img EXIST true
this.cache.img.Width 500
this.cache.img.Height 500
this.cache.length 1
Resize width tw 578 Resize height th 578
SMP memory usage: window.TotalMemoryUsage: 9.513484 MB
image EXIST true
image.Width 500
image.Height 500
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path stub4
image file EXIST false
this.cache.img EXIST true
this.cache.img.Width 500
this.cache.img.Height 500
this.cache.length 1
Resize width tw 578 Resize height th 578
SMP memory usage: window.TotalMemoryUsage: 9.513484 MB
image EXIST true
image.Width 500
image.Height 500
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path stub4
image file EXIST false
this.cache.img EXIST true
this.cache.img.Width 500
this.cache.img.Height 500
this.cache.length 1
Resize width tw 578 Resize height th 578
SMP memory usage: window.TotalMemoryUsage: 9.513484 MB
image EXIST true
image.Width 500
image.Height 500
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path stub4
image file EXIST false
this.cache.img EXIST true
this.cache.img.Width 500
this.cache.img.Height 500
this.cache.length 1
Resize width tw 578 Resize height th 578
SMP memory usage: window.TotalMemoryUsage: 9.513484 MB
image EXIST true
image.Width 774
image.Height 706
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path C:\Users\AdmAT\AppData\Roaming\foobar2000\yttm\art_img\p\Pink Floyd\Pink Floyd_7dd43e535e5a490a811199ff902811e6.jpg
image file EXIST true
image file SIZE 893302
this.cache.img EXIST true
this.cache.img.Width 774
this.cache.img.Height 706
this.cache.length 1
Resize width tw 416 Resize height th 379
SMP memory usage: window.TotalMemoryUsage: 9.513484 MB
Biography Server: allmusic album review: Proper Education / Eric Prydz vs Floyd: not found
Biography Server: allmusic biography: Eric Prydz vs Floyd: not found
Biography Server: allmusic album review: A Tree Full Of Secrets (1) / Pink Floyd: not found
Biography Server: last.fm album review: A Tree Full Of Secrets (1) / Pink Floyd: not found Status error: 404
image EXIST true
image.Width 1280
image.Height 855
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path C:\Users\AdmAT\AppData\Roaming\foobar2000\yttm\art_img\p\Pink Floyd\Pink Floyd_05b95f02395f4f038129a9cc2c3e6a6b.jpg
image file EXIST true
image file SIZE 1611201
this.cache.img EXIST true
this.cache.img.Width 1280
this.cache.img.Height 855
this.cache.length 2
Resize width tw 567 Resize height th 379
SMP memory usage: window.TotalMemoryUsage: 6.663612 MB
Opening track for playback: "H:\Pink Floyd\2012 - Defacing The Wall\01. Pink Floyd - Another Brick In The Wall II (Extended).flac"
image EXIST true
image.Width 3141
image.Height 4396
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path C:\Users\AdmAT\AppData\Roaming\foobar2000\yttm\art_img\p\Pink Floyd\Pink Floyd_9634c23d999a4ee7a14107577156f990.jpg
image file EXIST true
image file SIZE 3460022
this.cache.img EXIST true
this.cache.img.Width 3141
this.cache.img.Height 4396
this.cache.length 3
Resize width tw 271 Resize height th 379
SMP memory usage: window.TotalMemoryUsage: 7.50036 MB
Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (Biography v1.1.2 beta1 with debug code2 by WilB)
Resize failed:
GdiPlus error: DrawImage failed with error (0x7): Win32Error

File: <main>
Line: 3284, Column: 26

Stack trace:
  ImageCache/this.cacheIt@<main>:3284:26
  Images/this.load_image_done@<main>:2933:5
  on_load_image_done@<main>:3468:53
Error: Spider Monkey Panel v1.2.2-preview+0db3c6a4 (Biography v1.1.2 beta1 with debug code2 by WilB)
Resize failed:
GdiPlus error: DrawImage failed with error (0x7): Win32Error

File: <main>
Line: 3284, Column: 26

Stack trace:
  ImageCache/this.cacheIt@<main>:3284:26
  Images/this.load_image_done@<main>:2933:5
  on_load_image_done@<main>:3468:53

Regards, Andrea
Title: Re: Biography Discussion
Post by: AndreaT on 2019-11-02 11:28:25
@TheQwertiest and @WilB :
Hello great Developers!
I would just share with you the good news that since TheQwerties gave me SMP ver 1.2.3-test and 1.2.3-beta, Biography JS is running smooth.
Since then I did not have any error.
Thanks and kind regards, Andrea
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-11-02 16:01:38
That's weird, since I don't think I've made any meaningful changes in v1.2.3 yet >_<
Title: Re: Biography Discussion
Post by: MusicExtremist on 2019-11-04 03:23:37
Have any of devs noticed there are now available individual song styles, moods and themes on ALLM ?

https://www.allmusic.com/song/dream-on-mt0008867553
Title: Re: Biography Discussion
Post by: AndreaT on 2019-11-06 18:09:11
@TheQwertiest and @WilB

Hello TheQwertiest and WilB,
I do not know if just a case of something more, but today I had new crashes of the Biography JS.

I installed the new SMP 1.2.3-beta (version I got today) and as I played the Pink Floyd I got the error:

From the splash window:
Error: Spider Monkey Panel v1.2.3-beta+31f7ed0a (Biography v1.1.2 beta1 with debug code2 by WilB)
Resize failed:
GdiPlus error: DrawImage failed with error (0x3): OutOfMemory

File: <main>
Line: 3284, Column: 26

Stack trace:
  ImageCache/this.cacheIt@<main>:3284:26
  Images/this.load_image_done@<main>:2933:5
  on_load_image_done@<main>:3468:53


And from the cosole.log:
Opening track for playback: "I:\Pink Floyd\2014 - The Endless River (SACD ISO)\Pink Floyd - The Endless River (2014).ISO"
image EXIST true
image.Width 600
image.Height 600
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path C:\Users\AdmAT\AppData\Roaming\foobar2000\yttm\art_img\p\Pink Floyd\Pink Floyd_e7090eb6d05349ae8e0932264910d875.jpg
image file EXIST true
image file SIZE 717500
this.cache.img EXIST true
this.cache.img.Width 600
this.cache.img.Height 600
this.cache.length 1
Resize width tw 377 Resize height th 377
SMP memory usage: window.TotalMemoryUsage: 8.106236 MB
image EXIST true
image.Width 3141
image.Height 4396
img.crop false
circular false
imgx 0 imgy 0 imgw 100 imgh 100
image_path C:\Users\AdmAT\AppData\Roaming\foobar2000\yttm\art_img\p\Pink Floyd\Pink Floyd_9634c23d999a4ee7a14107577156f990.jpg
image file EXIST true
image file SIZE 3460022
this.cache.img EXIST true
this.cache.img.Width 3141
this.cache.img.Height 4396
this.cache.length 2
Resize width tw 269 Resize height th 377
SMP memory usage: window.TotalMemoryUsage: 8.106236 MB
Error: Spider Monkey Panel v1.2.3-beta+31f7ed0a (Biography v1.1.2 beta1 with debug code2 by WilB)
Resize failed:
GdiPlus error: DrawImage failed with error (0x3): OutOfMemory

File: <main>
Line: 3284, Column: 26

Stack trace:
  ImageCache/this.cacheIt@<main>:3284:26
  Images/this.load_image_done@<main>:2933:5
  on_load_image_done@<main>:3468:53


Kind regards, Andrea
Title: Re: Biography Discussion
Post by: WilB on 2019-11-06 18:36:31
I also had a possibly similar report from another user with an image.ApplyMask error (ApplyMask failed:  GdiPlus error: dst::LockBits failed with error (0x3): OutOfMemory: Spider Monkey Panel v1.2.3-beta+97022c82). Spider Monkey Panel on that user's pc normally seems only to be using a low amount of memory (but I don't have a full debug report & don't know the identity of image that caused the error).

That user was also using Windows 32 bit (Windows 10 1903) [and I believe on PC with oldish architecture] - these reasons may be why only the occasional user seems to be getting the error?

@TheQwertiest  Do you think these image related issues are due to a bug in Spider Monkey Panel, windows or script? Debug report indicates to me that the script is functioning correctly?
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-11-07 10:53:57
@WilB , honestly, I have no idea what's causing it. The thing is, GdiPlus reports OOM error even in cases that don't have anything to do with memory problems, e.g. unsupported image format, unsupported conversion format, error while reading file and etc. And there is no way to get any additional info from this error directly.

So the bug itself might be anywhere: it might be in SMP (I'm doing smth wrong when reading/converting the image), it might be in script (image is being accessed or used incorrectly), it might be caused by the image itself (corrupted format) or it might be caused by Windows (broken GdiPlus).

To narrow the scope we need to create a minimal repro scenario. E.g. if @AndreaT can reliably reproduce the error, then we need to find if this error always happens on the same image (i.e. the cause is the image). If it happens on random images, then the script must be reduced to a minimum lines of code and then we need to get and fix all the data (e.g. music files, urls and etc) to allow us to reproduce the case locally. If the minimal script with fixed data reproduces error reliably on user's machine and not on ours, then the problem is with user's machine configuration (Windows, antivirus software, faulty HDD/SSD or whatever else).
Title: Re: Biography Discussion
Post by: AndreaT on 2019-11-07 16:39:14
@WilB and @TheQwertiest

Hello WilB and TheQwertiest,
I understand that this problem related to the Biography JS has limited affected users and, IMHO, has also a very limited impact on the system behavior and performance.

I am sorry to not be a good developer (I wrote my last line of code in the far 1996), otherwise, for my case, I would just go to that critical section and I would put there a try/catch with catch simply moving forward ignoring that error (keeping in place the previous image or just showing a smiling placeholder).
Biography is not a critical service, when it stops I just try to re-animate it "reloading the JS" (I mean, I give the command reload from the red panel showing the crash).
If this reload can be automatic for any GdiPlus OOM error, it would be the "adequate" (good enough) solution for this problem.
Many thanks for your attention and kind regards, Andrea
 
Title: Re: Biography Discussion
Post by: WilB on 2019-11-07 17:57:14
Try catch is very easy to do. But I'm not sure if it will work with real OOMs. I've pm'd you something to try.

Another possibility, if it only effects one or perhaps a few images, is to black listed them (image > black list). After black listing image can be deleted from disc if you wish  - biography should then get an alternative one during next update or if you use force update. If the try catch works, the version I've pm'd will output the identity of the problematical image to the console.
Title: Re: Biography Discussion
Post by: AndreaT on 2019-11-07 18:34:29
Hello WilB, I will try your solution tomorrow and I will update you privately. Many thanks and kind regards, Andrea
Title: Re: Biography Discussion
Post by: FritzLn on 2019-11-08 03:47:27
It seems as if AllMusic album reviews are no-longer returning data correctly.

I'm assuming AllMusic moved the location of their webpage elements around?
Title: Re: Biography Discussion
Post by: AndreaT on 2019-11-08 14:43:18
@WilB
Hello WilB, the try/catch patch is fine. No more crash. Great job.
I sent to your inbox the screeshot of the console.log.
Many thanks!
Kind regards, Andrea
Title: Re: Biography Discussion
Post by: WilB on 2019-11-08 18:15:23
I've uploaded  versions of Biography, Library Tree and YouTube Track Manager that are compatible with JScript Panel v 2.3.x+ in the usual locations.
Title: Re: Biography Discussion
Post by: WilB on 2019-11-08 18:24:47
New Version: Biography 1.1.2 (https://hydrogenaud.io/index.php?topic=112913.msg977224#msg977224)

FIX: AM biography & reviews. Updated to work with site changes.

NEW: Circular artist & cover images (menu > image > circular).

NEW: Use of reflection, border, shadow and circular styles can now be separately applied to artist & cover images (menu > image). Border method has been refined to take account of circular images.

NEW: Image seeker & counter options:
    - Seeker now supports clickable dots for image selection, as well as bar style. Both can be dragged.
    - Counter now optional + can be displayed on its own.
    - Settings: menu > image > seeker & counter.

CHG: Image seeker. Improved positioning over a wider range of layout styles.

NEW: More menu Items:
    -  Circle button now used as visual indicator if more tags are found (requires FontAwesome).
    - "Auto Lock" now available (more... sub menu). "Auto Lock", if enabled, automatically engages the lock on loading items from the menu (history/tag/similar artists/top albums). The lock stops track changes altering the display.

NEW: Ability to set Biography inactive: No internet searching. No text or image loading (SHIFT + right click > menu > inactivate).

CHG: AM reviews and biographies now show the supplementary information if the main review or biography isn't found.

CHG: Various optimisations.

FIX: Cover cycling. Now correctly accepts custom folders: server settings > [COVERS: CYCLE FOLDER].

FIX: Occasional image loading errors.

FIX: Other reported issues.
Title: Re: Biography Discussion
Post by: TheQwertiest on 2019-11-08 19:56:05
@WilB , did you find the cause by any chance or just suppressed the errors?
Title: Re: Biography Discussion
Post by: MusicExtremist on 2019-11-08 21:50:04
Suggestion:
Add scraping of song genres, styles, moods and themes.

for example, this is a page of a song (https://www.allmusic.com/song/dream-on-mt0008867553) on AM, it's a new feature they have added to the site in the last few months, so it doesn't have it for every song, but only for most popular artists.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-11-08 22:43:12
It seems as if AllMusic album reviews are no-longer returning data correctly.

I'm assuming AllMusic moved the location of their webpage elements around?

Confirming AllMusic album reviews missing. Began the last weeks and continues in v1.1.2.
Title: Re: Biography Discussion
Post by: FritzLn on 2019-11-09 13:48:43
It seems as if AllMusic album reviews are no-longer returning data correctly.

I'm assuming AllMusic moved the location of their webpage elements around?

Confirming AllMusic album reviews missing. Began the last weeks and continues in v1.1.2.

Looks like the latest version actually fixed AllMusic reviews for me.

Did you right-click the panel and then click 'Force Update' for any reviews that might have been cached to disk after installing the new version?
Title: Re: Biography Discussion
Post by: mjm716 on 2019-11-09 14:33:08
Looks like the latest version actually fixed AllMusic reviews for me.

Did you right-click the panel and then click 'Force Update' for any reviews that might have been cached to disk after installing the new version?

Thank you! - Force Update has started returning results again - reviews are appearing.
However I'm having to manually Force Update on each release.
Title: Re: Biography Discussion
Post by: FritzLn on 2019-11-09 20:06:40
Looks like the latest version actually fixed AllMusic reviews for me.

Did you right-click the panel and then click 'Force Update' for any reviews that might have been cached to disk after installing the new version?

Thank you! - Force Update has started returning results again - reviews are appearing.
However I'm having to manually Force Update on each release.

Could it be that all your reviews are cached and for whatever reason the plugin isn't triggering a query of the site?

Have you tried to delete the folder that all your reviews are cached to?
Title: Re: Biography Discussion
Post by: anamorphic on 2019-11-14 12:33:05
NEW: Circular artist & cover images (menu > image > circular).
I just want to say, I'm seriously lovin' these circular artist images. Thank you WilB for your continued effort making these scripts. 8)
Title: Re: Biography Discussion
Post by: seongbin on 2019-11-22 09:28:50
New features are awesome, thx for the update.
Meanwhile, I found I cannot get biography text from last.fm for some artists.

e.g.
アンジェラ (Vo. Alisa)
Erroll Garner
咖啡因樂隊

Is there any way I can debug for this?
Title: Re: Biography Discussion
Post by: WilB on 2019-11-22 13:38:44
Thanks for the feedback.

I have fixed the issue and will release an updated version shortly after a bit more testing...

Note that アンジェラ (Vo. Alisa) doesn't seem to have an actual biography at the site (?), although there is ancillary info.
Title: Re: Biography Discussion
Post by: seongbin on 2019-11-23 10:44:18
Thanks for the feedback.

I have fixed the issue and will release an updated version shortly after a bit more testing...

Note that アンジェラ (Vo. Alisa) doesn't seem to have an actual biography at the site (?), although there is ancillary info.

Thx! I am aware that "アンジェラ (Vo. Alisa)" doesnot have actual biography contents except for other infos, and I am fine with that.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-11-30 02:36:22
#1
I'm wondering how, if it's currently possible or wishing for future ability to have the heading independent within the layout when displaying review panel with album art.

For example, it would be nice if the heading extended across the panel width and is not limited by the review text column width.
(https://i.imgur.com/3pzYDan.png)

#2
Also following up on a previous question about image cycling. Cover images in reviews still do not cycle for me, so maybe this image will clarify:
(https://i.imgur.com/aBSbGbP.png)

If I have front cover image displayed (in review panel), my assumption about 'cycle from folder' is that it would cycle other images from the same folder as the cover. However no auto or mouse-wheel cycling occurs.
Auto cycling (& mouse wheel) does work in the bio panel with artist images.
Title: Re: Biography Discussion
Post by: WilB on 2019-11-30 13:00:28
Thanks for the feedback

#1
I've added the feature in my copy. Providing no issues arise in further testing it should be in the next version.

#2

'cycle from folder'

This always loads from cover cycle folder specified in server settings (biography.ini). Default is:
Code: [Select]
COVERS: CYCLE FOLDER]
Folder=%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%
That cycles artist images providing they're in the default location.

To load from the music folder use:
Code: [Select]
[COVERS: CYCLE FOLDER]
Folder=$directory_path(%path%)
If the location is something else you'll have to work out the path/title formatting to use. Please confirm whether or not the issue is resolved, as I wanted to release an update shortly.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-11-30 13:22:56
Thanks for the feedback

#1
I've added the feature in my copy. Providing no issues arise in further testing it should be in the next version.

Thank you for the amazing work - really spectacular seriously.

#2

'cycle from folder'

This always loads from cover cycle folder specified in server settings (biography.ini). Default is:

I already have [COVERS: CYCLE FOLDER] pointed at my artist images, which does work correctly for the bio panel. Per your labeling, that would be "Artist: Photo"

However I run 2 panels side-by-side, left panel Bio and right panel Review.

So if I understand it correctly, there is only one source for cycling images? There is no way for me to specify an artist cycling image eg. [ARTISTS: CYCLE FOLDER] folder AND a cover cycling image eg. [COVERS: CYCLE FOLDER] folder?

Title: Re: Biography Discussion
Post by: WilB on 2019-11-30 14:11:21
Two cycle locations are supported.

1) Bio mode. Supports cycling artist images (photos) from the standard lfm artist image [SAVE] location. Requires that "sources > photo: cycle" is enabled (default behaviour).

2) Review mode. Supports cycling of images from the cover cycle folder, i.e. [COVERS: CYCLE FOLDER]. Requires that "sources > cover: cycle from folder" is enabled.

Each mode therefore supports cycling from a different folder. So yes you can have bio panel cycling artist images and review panel cycling covers.

Sources > cover > front|back|disc|artist checks foobar2000 > display > album art > search patterns and loads the single image returned by foobar2000 depending on the chosen option. You can opt to load and cycle all of these by choosing 'cycle above'.

HTH
Title: Re: Biography Discussion
Post by: anamorphic on 2019-11-30 23:10:38
Hey WilB,

Speaking of cycling artist images, I wonder any chance it might be possible to exclude images - *.PNG, or filename matches, or just an option to only cycle the downloaded ones from this script?

Admittedly this is a problem of my own making, as I moved the save location to the artist folder with the actual music (to cut down on so many extra folders being created, where I could just use existing folders and have everything backed-up along with the music). Recently however I've also been saving downsized thumbnails in the same folder, which would look better if not included in the cycled artist images.

Cheers
Title: Re: Biography Discussion
Post by: mjm716 on 2019-12-01 14:16:09
Two cycle locations are supported.

Just updating for anyone else who may have similar issues. I got it to work in a rather roundabout way.

I installed a new FB and bio panel - the cycling did work fine. I then copied/pasted the working panel into my old layout and it worked. Additionally it cleared up another problem I was having with review downloads.

I'm not sure what gets corrupted in panels, but I've used that method before to fix other panel issues.

YMMV
Title: Re: Biography Discussion
Post by: mjm716 on 2019-12-03 01:09:16
Regarding reviews from Allmusic. They are terribly inconsistent with their artist naming.

One consistent issue however are split band names, eg:
https://www.allmusic.com/album/the-beat-of-the-brass-mw0000202341

The bio panel will not grab reviews if only the first artist name is listed. For example above: Herb Alpert & the Tijuana Brass

Worse still, using the name from AM "Herb Alpert & the Tijuana Brass / Herb Alpert" will get split by FB also resulting in no review.

One must rename the artist to "Herb Alpert & the Tijuana Brass & Herb Alpert" to actually get the review to appear, which is quite a terrible artist name tag.
This happens everywhere AM has a split artist name.

Another example: https://www.allmusic.com/album/everybody-loves-the-sunshine-mw0000099169
AM alternates the name order throughout that discography as well.
:(
Title: Re: Biography Discussion
Post by: WilB on 2019-12-03 12:52:56
The default server setting is to include partial matches:

[MISCELLANEOUS]
...
Search: Include Partial Matches=1

With that enabled plenty of variances worked for me. The results of my tests for AM reviews are below.
Code: [Select]
Herb Alpert & the Tijuana Brass / Herb Alpert - The Beat of the Brass
Search: Include Partial Matches 0: found
Search: Include Partial Matches 1: found

Herb Alpert & the Tijuana Brass - The Beat of the Brass
Search: Include Partial Matches 0: not found
Search: Include Partial Matches 1: found

Herb Alpert - The Beat of the Brass
Search: Include Partial Matches 0: not found
Search: Include Partial Matches 1: found

The Tijuana Brass - The Beat of the Brass
Search: Include Partial Matches 0: not found
Search: Include Partial Matches 1: found

Roy Ayers / Roy Ayers Ubiquity - Everybody Loves the Sunshine
Search: Include Partial Matches 0: found
Search: Include Partial Matches 1: found

Roy Ayers - Everybody Loves the Sunshine
Search: Include Partial Matches 0: not found
Search: Include Partial Matches 1: found

Roy Ayers Ubiquity - Everybody Loves the Sunshine
Search: Include Partial Matches 0: not found
Search: Include Partial Matches 1: found
I didn't notice any problem with fb splitting names with " / " on my device. May be that depends on a local setting on your device.

Anyway if partial matching is enabled you should be able to use the name "Herb Alpert & the Tijuana Brass" etc.

Next version should also allow biography to list missing bios, reviews etc

@anamorphic: requested filter added for the next version.
Title: Re: Biography Discussion
Post by: gsax on 2019-12-03 21:23:28
Hi Wilb, I followed all your instruction to install foobar darkone 4 but there is something not working. Biography is working erratically when it comes to showing pictures. Sometimes it works perfectly but most of the time not. Where pictures should be appears "no phot" as if the foto related to the artist that is being played were not downloaded in the appropriate folder.  Please look the attached picture.
Hope you can help.
Best,
gsax
Title: Re: Biography Discussion
Post by: gsax on 2019-12-03 21:33:57
WILB, Maybe this can further help. I am using spider monk panel ver. 1.2.2 e biography ver. 1.1.2. Quite funny if I use the foobar standard interface everything works well but as soon as I start using the "Column UI" and loading darkone, the problem appears again. If I play a track already played with the standard interface then also darkone works well and pictures are cycling and appearing. Actually, it seems that when using darkone skin the pictures are not downloaded from last.fm in the appropriate folder.
Any idea?
Title: Re: Biography Discussion
Post by: WilB on 2019-12-03 22:31:58
There were a number of site changes a while ago that effected photos and am data. Since the am bio is wrong it points to the possibility that darkone doesn't actually have the latest biography release installed.

Shift + right click biography. Choose configure. Use the File menu to import biography 1.1.2. Hopefully that will get it working. You may want to force update any incorrect am bios & reviews you spot (menu > sources > force update).

If it's still not working:

1) right click > menu > sources > server settings > reset to default.
2) right click > panel properties. Choose export to back up panel properties. Then choose clear to reset panel properties.

HTH
Title: Re: Biography Discussion
Post by: mjm716 on 2019-12-04 06:20:24
The default server setting is to include partial matches:

[MISCELLANEOUS]
...
Search: Include Partial Matches=1

Thank you - that was the issue, I had it disabled for previous debugging.   :(
 
Currently bio/review data is coming through great. However I'm not getting artist images - I tried a clean install - clean/default biography.ini.
"update.txt" files are getting written to the "yttm/art-img/_/%artist%" directory but no images. No other errors appear in the console.

Just to confirm - are artist images downloading for others at the moment?
Title: Re: Biography Discussion
Post by: gsax on 2019-12-04 20:23:14
No way, no option, no photos! The text is ok, but no photos!

Title: Re: Biography Discussion
Post by: WilB on 2019-12-07 12:15:35
lfm has been erratic and slow for me over the last few days and I can confirm that at times it's not been possible to obtain stuff.

Currently all is working correctly for me. So hopefully all is back to normal.
Title: Re: Biography Discussion
Post by: gsax on 2019-12-07 15:03:04
In my case, the problem seems to be related to Darkone. I can see bio text and photo when using the standard Foobar interface but pictures are not downloaded and not shown in Column UI interface and darkone skin. See the attached pictures. I clarify that all the components are updated.
Title: Re: Biography Discussion
Post by: WilB on 2019-12-07 17:27:46
If as you say in an earlier post it works on other layouts, it looks like it's something specific to that set-up.

Shift + right click biography in Darkone & double check the biography version number on line 2 is 1.1.2.

I assume you did the resets as suggested as that would exclude any issues with those: well in fact it doesn't look like you did those as the heading is in the old style format? Resets would exclude things like Image [Artist] Auto-Fetch actually being switched off or inappropriate changes to save paths etc.

Make sure that there isn't an old version of biography lurking in the layout somewhere as it may interfere. Ensure there is enough disc space to save images.

There was also a very old issue whereby foo_lastfm_img.vbs within foobar2000 profile\yttm folder was corrupted. But biography for quite some time should check and correct that automatically. But you could try deleting that and restarting foobar2000.

It looks like the lfm language is Italian. I tried that server for the artist in your pic & it worked here.
Title: Re: Biography Discussion
Post by: gsax on 2019-12-07 20:25:27
HI WilB, thank you very much. Everything seems to work properly now. As you suggested it was due to an old version of biography interfering.  By the way, wouldn't it be possible to get bio and images from Wikipedia?
Title: Re: Biography Discussion
Post by: WilB on 2019-12-07 22:58:06
It's possible but I prefer current sources: Wikipedia bios are long for a music player & search disambiguation is awkward. Photo choice seems inferior. So I'll keep it on the reserve list for now.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-12-08 07:09:15
lfm has been erratic and slow for me over the last few days and I can confirm that at times it's not been possible to obtain stuff.

Currently all is working correctly for me. So hopefully all is back to normal.

Just tried again, using a fresh FB 1.5 install/SMP1.2.1/Bio1.1.2

Per the image - no artist image appears or downloads (using install default biography.ini) - the update.txt does get written to directory so write access should be fine?

any ideas?


(https://i.imgur.com/aNI1iDD.png)
Title: Re: Biography Discussion
Post by: WilB on 2019-12-08 13:41:41
I tried a fresh FB 1.5 install/SMP1.2.1/Bio1.1.2

I tried with the artist album in your pic. All worked correctly. Photos were obtained. I tried two lfm languages.

The fact that it created update.txt for you indicates it correctly obtained the image list from lfm. So the download and save failed:
   - try force update
   - may be there are still some issues with lfm servers, as I guess it was all working well for you until recently
   - double check that all settings are at default to absolutely exclude any of the configurable options:
      1) right click > menu > sources > server settings > reset to default.
      2) right click > panel properties. Choose export to back up panel properties. Then choose clear to reset panel properties.
   - I assume that if you go directly to the site you can access the images
   - perhaps there is some local issue with your set-up (seems unlikely: access to fb2k folders should be OK)
   - I assume your internet is working OK
   - you could try deleting foo_lastfm_img.vbs within foobar2000 profile\yttm folder and restarting foobar2000 to make absolutely sure it's not been corrupted.
   - I assume the device has sufficient disc space to save the images

I've sent you a pm with some debug code that you can try if the issue persists.
Title: Re: Biography Discussion
Post by: WilB on 2019-12-11 18:11:02
New Version: Biography 1.1.3 (https://hydrogenaud.io/index.php?topic=112913.msg978267#new)

CHG: New source button
    - Requires FontAwesome (https://github.com/FortAwesome/Font-Awesome/blob/fa-4/fonts/fontawesome-webfont.ttf?raw=true). If not installed, the previous button style will be used.
    - Simple size adjustment, if required: ctrl + wheel over button.
    - Further options: "menu > layout > heading > button style", e.g. set previous button style or hide background.

NEW: Heading: always full width option (enable: "menu > layout > heading). Means heading spans image + text rather than just text in left & right style layouts. Image top padding is auto-adjusted.

NEW: Photo filter: cycle from folder now has an option to restrict to lfm artist images [default enabled (menu > sources > photo...)].

FIX: Lfm bios: corrected occasional issue where certain bios weren't obtained.
Title: Re: Biography Discussion
Post by: anamorphic on 2019-12-12 12:52:39
^ New features working well. Thank you! 8)
Title: Re: Biography Discussion
Post by: Sergey77 on 2019-12-14 05:14:10
Hi there!
On the site now the photos of artists are not available for me.
Perhaps that is why the photos also not available for the component.
Title: Re: Biography Discussion
Post by: WilB on 2019-12-14 12:30:22
https://www.last.fm/home works correctly for me. So it looks like it was a temporary or local issue. mjm716 issue described a few posts above seems to have been a specific machine related problem apparently due to a windows privileges mess up and now solved.

Occasions when lfm itself has issues, like it's down or slow, are outside of my control . Biography normally times out internet calls after about 30 seconds.

It all seems to be working fine for me now. Photos etc are being correctly obtained.
Title: Re: Biography Discussion
Post by: seongbin on 2019-12-15 23:46:03
Thx for the new update! It works perfectly for me.
Title: Re: Biography Discussion
Post by: mjm716 on 2019-12-16 08:35:46
mjm716 issue described a few posts above seems to have been a specific machine related problem

Yes - confirming OS issues on my end - and great patient support from WilB to help me sort it out. All reviews/bio/images have been downloading flawlessly (after new OS install).

One minor issue to report with layout when full-width headline is enabled - image (auto align with text) loses alignment (reverts to bottom when headline option is selected).

(https://i.imgur.com/CHaPWr4.png)
Title: Re: Biography Discussion
Post by: gsax on 2020-01-04 18:02:28
Hi, Wilb It seems there is a problem between the last version of foobar 1.5.1 and the most recent one of foo_spider_monkey_panel.
That's the text reported by foobar crash tool:
Problem caused by: foo_spider_monkey_panel.dll : Spider Monkey Panel
Known buggy component
Title: Re: Biography Discussion
Post by: MaFred on 2020-01-08 13:50:55
Have exactly the same problem since foobar 1.5.1 as described by gsax.
Windows 10 1909, Intel Core i7-2600.
Title: Re: Biography Discussion
Post by: MaFred on 2020-01-10 10:38:59
@gsax: The update to SMP version 1.2.3-beta solves the problem.
Title: Re: Biography Discussion
Post by: gsax on 2020-01-10 12:05:24
@MaFred: Thanks a lot! Where it is possible to find it? At the following address, the last version seems to be the 1.2.2 and I couldn't find the page where the version 1.2.3-beta is:   https://github.com/TheQwertiest/foo_spider_monkey_panel/releases/tag/v1.2.2-preview
Title: Re: Biography Discussion
Post by: MaFred on 2020-01-10 14:08:20
@MaFred: Thanks a lot! Where it is possible to find it?
https://hydrogenaud.io/index.php/topic,116669.0.html

there you will find the link "Nightly build" in the first post
Title: Re: Biography Discussion
Post by: TheQwertiest on 2020-01-10 15:50:52
@MaFred , @gsax , this problem is caused by SMP: the latest release version (v1.2.2) contains a bug that results in a fb2k crash in some cases which prompted Peter to mark SMP as `problematic`. The bug is fixed in the nightly build (currently at v1.2.3-beta).
Title: Re: Biography Discussion
Post by: gsax on 2020-01-10 18:16:46
Thanks a lot. It works now. Best. g
Title: Re: Biography Discussion
Post by: Awesomeo on 2020-01-12 20:06:37
@MaFred , @gsax , this problem is caused by SMP: the latest release version (v1.2.2) contains a bug that results in a fb2k crash in some cases which prompted Peter to mark SMP as `problematic`. The bug is fixed in the nightly build (currently at v1.2.3-beta).
While this bug is fixed with nightly, somehow one option seems to revert every time I restart foobar / open biography properties - it forgets the shadow setting. To be exact, it reverts "SYSTEM.Cover [Dual Mode]" to 0 whenever I try to change biography properties or turn foobar off and on again. The other shadow (for "image only") is retained.

foobar 1.5.1 / SMP v1.2.3-beta+fbfc0fd8 / Biography 1.1.3
Title: Re: Biography Discussion
Post by: TheQwertiest on 2020-01-13 09:28:22
@Awesomeo , possibly related: https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/106
Title: Re: Biography Discussion
Post by: Awesomeo on 2020-01-15 18:31:57
Works fine now with the new nightly. Thanks!
Title: Re: Biography Discussion
Post by: eforer on 2020-01-29 20:49:27
Hello everyone,

I'm experiencing the same issue as mjm76.  I'm running spider monkey panel 1.2.3-beta, biography 1.1.3 and foobar2000 1.5.1.  I'm wondering if this issue has to do with my foobar2k installation running on a pc with a VPN running.  Once some tasks are finished that I don't want to interrupt, I'll try turning off the vpn and see if it fixes things.

Thanks!
Title: Re: Biography Discussion
Post by: mjm716 on 2020-01-30 02:45:34
Hello everyone,

I'm experiencing the same issue as mjm76. 

Possibly, but for your sake, I hope not.
My issue was related to corrupt Win ownership preventing write access for certain apps/scripts. I reinstalled Win and everything is working fine since.
Title: Re: Biography Discussion
Post by: wcs13 on 2020-02-08 00:37:07
Hi, works for me at the moment. Quick questions :

1. I know the font and size can be set through foobar prefs. However, what if I wanted a specific font and size only for the biography panel ? What would I need to change exactly ?
2. Currently in "pic+text" mode, the pic takes about 70% of the panel. How could I change it to some other value, e.g. 30% ?

Thank you.
Title: Re: Biography Discussion
Post by: mjm716 on 2020-02-08 05:59:59
1. I know the font and size can be set through foobar prefs. However, what if I wanted a specific font and size only for the biography panel ? What would I need to change exactly ?
Quickest way to adjust font size - header and body can be adjusted independently - is to mouse-over the area and use CTRL+your mouse scroll wheel

To change font
CTRL-click panel for Panel Properties and look for _Custom.Font values

2. Currently in "pic+text" mode, the pic takes about 70% of the panel. How could I change it to some other value, e.g. 30% ?

CTRL-click panel for Panel Properties, scroll down towards bottom and look for value:
SYSTEM.Layout Image Size 0-1  : 0.3 = 30%
Title: Re: Biography Discussion
Post by: wcs13 on 2020-02-08 10:55:59
Worked beautifully. This is such a great component. Thank you ! :)
Title: Re: Biography Discussion
Post by: josemescud on 2020-02-20 21:49:09
I have installed Biography 1.1.3 and it works perfectly.
I have activated “Text Only” since I don't want the covers
But I have a problem. I don't want the covers or biographies recorded on the hard drive.
I was able to get the covers not recorded by modifying Biography.ini:

[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=0
Image [Review] Auto-Fetch=0


I need to know how I can do so that biographies are not recorded on the hard drive.

Thank You
Title: Re: Biography Discussion
Post by: bonswouar on 2020-02-26 20:48:28
Thank you for this great script and for maintaining it, it's exactly what I was looking for !

I was wondering though, even if it's not recommended, would there be a way to save front cover image to the song directory ? So I can use it as the preview image in ELP.

I started doing this :
Code: [Select]
Image [Review] $if($strstr(%_path_raw%,'file://'),$directory(%_path_raw%),%profile%\yttm\rev_img\$lower($cut(%BIO_ALBUMARTIST%,1))\%BIO_ALBUMARTIST%)

But it didn't work, and anyway I noticed I forgot something important : to check if there was any cover present yet. And I'm not sure if there is a clean way to do that ?

Thanks !

EDIT : That's funny, I just noticed that @josemescud my request is basically the opposite than yours
Title: Re: Biography Discussion
Post by: anamorphic on 2020-02-26 22:12:00
I was wondering though, even if it's not recommended, would there be a way to save front cover image to the song directory ? So I can use it as the preview image in ELP.

I started doing this :
Code: [Select]
Image [Review] $if($strstr(%_path_raw%,'file://'),$directory(%_path_raw%),%profile%\yttm\rev_img\$lower($cut(%BIO_ALBUMARTIST%,1))\%BIO_ALBUMARTIST%)
I think you want the [COVERS: MUSIC FILES] section for album covers. The 'Image [Review] Folder' under [SAVE] is a different thing.

And I think by default it saves to track folder already. And according to Documentation.txt file it should only save if cover is missing. (Not that I've ever used it to confirm mind you)

So basically just change the first line -

[COVERS: MUSIC FILES]
Auto-Save=1
Auto-Save Folder=$directory_path(%path%)
Auto-Save File Name=cover

Cheers
Title: Re: Biography Discussion
Post by: anamorphic on 2020-02-26 22:26:41
[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=0
Image [Review] Auto-Fetch=0


I need to know how I can do so that biographies are not recorded on the hard drive.
Just do the same for the two Biography lines -

[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=0
Biography [Lastfm] Auto-Fetch=0

Cheers
Title: Re: Biography Discussion
Post by: bonswouar on 2020-02-26 22:41:36
I was wondering though, even if it's not recommended, would there be a way to save front cover image to the song directory ? So I can use it as the preview image in ELP.

I started doing this :
Code: [Select]
Image [Review] $if($strstr(%_path_raw%,'file://'),$directory(%_path_raw%),%profile%\yttm\rev_img\$lower($cut(%BIO_ALBUMARTIST%,1))\%BIO_ALBUMARTIST%)
I think you want the [COVERS: MUSIC FILES] section for album covers. The 'Image [Review] Folder' under [SAVE] is a different thing.

And I think by default it saves to track folder already. And according to Documentation.txt file it should only save if cover is missing. (Not that I've ever used it to confirm mind you)

So basically just change the first line -

[COVERS: MUSIC FILES]
Auto-Save=1
Auto-Save Folder=$directory_path(%path%)
Auto-Save File Name=cover

Cheers

Awesome, I didn't expect that feature to be included so I didn't see those config lines !
Works like a charm, no hack needed, thanks ! :)
Title: Re: Biography Discussion
Post by: josemescud on 2020-02-27 09:41:00
[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=0
Image [Review] Auto-Fetch=0


I need to know how I can do so that biographies are not recorded on the hard drive.
Just do the same for the two Biography lines -

[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=0
Biography [Lastfm] Auto-Fetch=0

Cheers

Thank you. But if I do that the panel doesn't get me any information. I can do that in the image section because I have the Text Only option enabled. I mean, I don't want to take pictures.
But if I want to take my biographies by doing a web search, what I need is not to memorize them on my hard drive.
Thanks again
Title: Re: Biography Discussion
Post by: bonswouar on 2020-02-27 15:50:10
[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=0
Image [Review] Auto-Fetch=0


I need to know how I can do so that biographies are not recorded on the hard drive.
Just do the same for the two Biography lines -

[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=0
Biography [Lastfm] Auto-Fetch=0

Cheers

Thank you. But if I do that the panel doesn't get me any information. I can do that in the image section because I have the Text Only option enabled. I mean, I don't want to take pictures.
But if I want to take my biographies by doing a web search, what I need is not to memorize them on my hard drive.
Thanks again

If the corresponding config options don't work as you'd like, maybe you could try a workaround like setting your TMP directory as Image [Review] & Image [Album] ?
Title: Re: Biography Discussion
Post by: josemescud on 2020-02-27 18:58:42
[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=1
Biography [Lastfm] Auto-Fetch=1
Album Review [Allmusic] Auto-Fetch=1
Album Review [Lastfm] Auto-Fetch=1
Image [Artist] Auto-Fetch=0
Image [Review] Auto-Fetch=0


I need to know how I can do so that biographies are not recorded on the hard drive.
Just do the same for the two Biography lines -

[AUTO-FETCH]
Biography [Allmusic] Auto-Fetch=0
Biography [Lastfm] Auto-Fetch=0

Cheers

Thank you. But if I do that the panel doesn't get me any information. I can do that in the image section because I have the Text Only option enabled. I mean, I don't want to take pictures.
But if I want to take my biographies by doing a web search, what I need is not to memorize them on my hard drive.
Thanks again

If the corresponding config options don't work as you'd like, maybe you could try a workaround like setting your TMP directory as Image [Review] & Image [Album] ?

I am Spanish and I use google translator.

I did not understand your answer. I would ask you if you can expand it.

As an interim solution, I have created a batch process to start foobar that eliminates biography and review.

Arranca_foobar.bat
echo off
echo .
echo Se van a eliminar las carpetas biography y review y luego arranca Foobar
echo .
rd "C:\Users\User\AppData\Roaming\foobar2000\yttm\biography" /S /Q
rd "C:\Users\User\AppData\Roaming\foobar2000\yttm\review" /S /Q

cls
C:
cd \Program Files (x86)\foobar2000
start foobar2000.exe
exit
echo on


Thanks you


Title: Re: Biography Discussion
Post by: Hexactly on 2020-02-29 07:29:54
Hi

Recently discovered this amazing script, super useful and elegant!

I'm especially happy with the ability to automatically write tags with lastfm and allmusic information.

Slight problem - I'm having trouble running the "write selected tags" command on multiple songs at once.
Most times the first run will identify only a few of songs, thereafter I need to select each song individually for it to be recognized and tagged.

I ran a test on 3 songs - It looks like the first 2 are not being recognized correctly while the 3rd is but also returns no results.
Attached screenshots.

Another related point - It would be really great if we could map a keyboard shortcut to the "write selected tags" action.

Any help / thoughts would be much appreciated!

Thanks

https://pasteboard.co/IWThMnp.jpg

https://pasteboard.co/IWTi4Tt.jpg
Title: Re: Biography Discussion
Post by: wcs13 on 2020-03-02 03:06:49
Hi, just wanted to say again how wonderful this script is !  :D

However, at the moment I'm only using it for displaying bios, and I'm using marc2003's Thumbs script for displaying artist pics.
The reason is in these two pics (see attached pics).

If someday @WilB could add this function to his script, I would be very grateful and happy to use only one script for all my purposes.

Thanks in advance !
Title: Re: Biography Discussion
Post by: mygen on 2020-03-07 16:00:35
Hi

I using foobar 1.5.2 and i have problem with artist picture. I have both Biography and JScript Panel. On this both i see only text (biography). No picture.

I read previous posts and tried solutions given by other users but nothing works. I still can't see the artist's picture.

I have account on Last.fm if is important.

What i can do more?
Title: Re: Biography Discussion
Post by: Sergey77 on 2020-03-07 17:38:44
@mygen,
1. Check if images on Last.fm are available to you. If they are not available on the site, then the component will not display them.
2. Check the latest Biography 1.1.3 (https://hydrogenaud.io/index.php?topic=112913.msg978267#msg978267) component version for Spider Monkey Panel (https://www.foobar2000.org/components/view/foo_spider_monkey_panel)
By the way, it works correctly for me now.
Title: Re: Biography Discussion
Post by: mygen on 2020-03-07 17:56:45
1. Not all image are available. If not why? what it depends on? I must have a premium account on Last.fm?
2. I have latest Biography and SMP.

Title: Re: Biography Discussion
Post by: Sergey77 on 2020-03-07 18:05:52
When for me there was this problem because of the site, I just waited until they fixed it.
This probably depends on the IP address.
Title: Re: Biography Discussion
Post by: mygen on 2020-03-07 18:56:33
When for me there was this problem because of the site, I just waited until they fixed it.
This probably depends on the IP address.

How to check this?
Title: Re: Biography Discussion
Post by: Sergey77 on 2020-03-08 04:22:43
I tried installing Spider Monkey Panel v1.2.3 and Biography v1.1.3 on fb2k v1.5.2 (without installing any other components) with the settings by default - Biography works correctly for me.
Title: Re: Biography Discussion
Post by: mygen on 2020-03-08 20:15:13
I do this too but i don't have the artist image.

Premium Last.fm is important?
Title: Re: Biography Discussion
Post by: quah on 2020-03-10 18:56:55
I've used Biography for a while now and really like it.  However, I am encountering one minor issue...

I find that Biography displays album art from image files in the folder of the currently playing track.  Good. 
But, I don't seem to be able to get Biography to display album art that is embedded in the currently playing track.

I can see the embedded art in my Columns UI Playlist, and I can see it in a conventional "Artwork view" panel. 
It is not a case of priority: In my test case, the album with embedded art has no image files in the folder.

Hopefully this is just a configuration error on my part.  Any assistance would be appreciated, but it would be most helpful to understand the designer's intent.  Thanks!
Title: Re: Biography Discussion
Post by: Miltiades on 2020-03-14 21:13:24
Hallo there,
I'm using (latest) foobar v.1.5.2. I have also SpiderMonkeyPanel, Biography and JScript Panel on latest version.
It was working properly, as it should since yesterday at the afternoon: I can't see either artist pictures nor pictures from covers.  I see only text (biography) but no pictures.
Any suggestions please?
Title: Re: Biography Discussion
Post by: Miltiades on 2020-03-14 21:14:25
Hallo there,
I'm using (latest) foobar v.1.5.2. I have also SpiderMonkeyPanel, Biography and JScript Panel on latest version.
It was working properly, as it should since yesterday at the afternoon: I can't see either artist pictures nor pictures from covers.  I see only text (biography) but no pictures.
Any suggestions please?
Title: Re: Biography Discussion
Post by: marc2k3 on 2020-03-15 13:49:10
For anyone having image issues, you must make sure the artist has images on their last.fm page and it must be viewable with Internet Explorer. Your normal choice of browser is irrelevant because scripts use the underlying components built in to the OS.

If running Windows 7, you'll probably need to enable support for TLS 1.2 via the registry. There are already plenty of threads about on the forums. And windows should always be up to date so you have the latest security certificates installed.
Title: Re: Biography Discussion
Post by: Papa-Lenin on 2020-03-18 12:44:01
The panel also doesn't load any pictures for me, while it used to work flawlessly for months... wonder what is happening. Also took snotlicker's advice and tried to open last.fm using IE, to my surprise was greeted with no pictures anywhere to be seen, and a note on top saying: "Internet Explorer is no longer supported on Last.fm. In order to have the best experience, please upgrade to a more modern browser. ". Could this be the problem?
Title: Re: Biography Discussion
Post by: marc2k3 on 2020-03-18 13:34:27
The fact you can access the last.fm website is good. But they do offload image host duties to another provider. If access to that is blocked, that would explain the problem. Try this direct link (in IE).

https://lastfm.freetls.fastly.net/i/u/aaa9574806bdfad3eb7168c21aca09de




Title: Re: Biography Discussion
Post by: Papa-Lenin on 2020-03-18 15:26:19
Hmm, that link opens the picture without any problems. Oh well, back to searching for the cause on my configuration then, thanks for that reply!
Title: Re: Biography Discussion
Post by: marc2k3 on 2020-03-18 19:39:50
Just to be clear, that was tested with Internet Explorer? When it's working, you should see inline images in the webpage as well...

You can see a screenshot of my Windows 8.1/IE11 attached.
Title: Re: Biography Discussion
Post by: Papa-Lenin on 2020-03-18 20:19:45
Yes, it was IE. I was just to quick to say, that webpage does not show pictures. It was just the main "last.fm" page that does not show pictures, the one you gave as an example shows everything correctly. So yes, it has to be something odd in my Foobar's settings, or maybe with Windows 10... I did make a repair of it recently, could be a connection there.
Title: Re: Biography Discussion
Post by: mygen on 2020-03-21 13:03:20
If anyone knows a solution to a problem with the display of an artist's image such as I have and others @Pappa-Lenin, @Miltiades please share the solution
Title: Re: Biography Discussion
Post by: Papa-Lenin on 2020-03-21 22:36:00
Sorry, I've no idea, I just ended up selecting "text only" mode, because nothing worked for me, and I'm unfortunately not able to currently do a Windows reinstall, which supposedly helped one of the other users... :(
Title: Re: Biography Discussion
Post by: wcs13 on 2020-04-01 14:19:22
Hi, does somebody know if @WilB is still active, or if somebody else is carrying on with this great project ? Thanks !
Hi, just wanted to say again how wonderful this script is !  :D

However, at the moment I'm only using it for displaying bios, and I'm using marc2003's Thumbs script for displaying artist pics.
The reason is in these two pics (see attached pics).

If someday @WilB could add this function to his script, I would be very grateful and happy to use only one script for all my purposes.

Thanks in advance !
Title: Re: Biography Discussion
Post by: mjm716 on 2020-04-11 04:16:26
I found a strange issue when it will not write tags (shift-rt click, "write tags to selected tracks") to artist names with special characters. e.g. Altın Gün  (note the i + u)
Title: Re: Biography Discussion
Post by: wcs13 on 2020-04-11 14:45:13
I have noticed that downloaded images are often low-res, even when there are lots of hi-res images for the same artist on last.fm.
For some artists there are hundreds of images available, but the component just seems to pick the first ones.
Is there an option to either favor hi-res images, or the most upvoted ones, or to set a minimum res ?
If not, it would be a nice add-on. Thanks !
Title: Re: Biography Discussion
Post by: quah on 2020-04-22 00:24:05
I've stumbled upon some new odd behavior related to Auto-Save.

In my biography.ini file, I have:

Code: [Select]
[COVERS: MUSIC FILES]
Auto-Save=1
Auto-Save Folder=$directory_path(%path%)
Auto-Save File Name=cover

I believe the intended behavior is that cover.png file will be saved in the folder of the track.  That seems like a swell idea.  It works fine when the path of the track is on the local machine.  However, when the path of the track is a UNC path to a another machine (example:  "\\myServer\music\01.flac", the cover.png file is actually getting stored to "D:\_\myServer\music\cover.png".  It is creating that entire path.  "D:" happens to be the local drive that contains my portable Foobar2000 directory in a sub directory.

I tried changing the Auto-Save Folder to "$replace(%path%,%filename_ext%,)" but that did not resolve the problem.

At some earlier point, cover.png was not saved at all for UNC paths.  This behavior started in recent weeks.

(Foobar2000 1.5.2, Spider Monkey Panel 1.2.3, Biography 1.1.3, Windows 10 1909)

Any thoughts?
Title: Re: Biography Discussion
Post by: marc2k3 on 2020-04-22 15:35:10
I'm not picking this script apart but I can confirm there is no issue saving to UNC paths. You can try it at the most basic level yourself with a blank panel and this code snippet - just adjust the filename and then double click the panel to run the code. It leaves a command prompt window open which would show any errors.

Code: [Select]
// backslashes must be doubled up
var filename = "\\\\nausicaa\\music\\foxes.jpg";

var WshShell = new ActiveXObject('WScript.Shell');

function on_mouse_lbtn_dblclk() {
    WshShell.Run("cmd /k cscript //nologo \"" + fb.ProfilePath + "yttm\\foo_lastfm_img.vbs\" https://lastfm.freetls.fastly.net/i/u/aaa9574806bdfad3eb7168c21aca09de \"" + filename + "\"");
}

edit: here's an example of an error you'd get if the share was read-only

(https://i.imgur.com/jgwyGRb.png)



I'm using Windows 10 2004 but that shouldn't make any difference.
Title: Re: Biography Discussion
Post by: quah on 2020-04-22 19:16:09
I'm not picking this script apart but I can confirm there is no issue saving to UNC paths. You can try it at the most basic level yourself with a blank panel and this code snippet - just adjust the filename and then double click the panel to run the code. It leaves a command prompt window open which would show any errors.

Thanks for the assistance, snotlicker!

Your suggestion helped me eliminate Spider Monkey Panel and Foobar as sources of the problem. 

Instead I picked apart "Biography 1.1.3.js" and found this line in cleanPth(), part of line 519, and confirmed it is the source of the problem:
Code: [Select]
while (pth.includes("\\\\")) pth = pth.replace(/\\\\/g,"\\_\\"); 

Commenting that out stopped making the fake path "D:\_\", but did not result in the artwork being saved to the UNC path either.  Before I debug further, I will wait for the Biography maintainers to respond, since this function is used many times in the program, and I'm not familiar with all of the scenarios.
Title: Re: Biography Discussion
Post by: WilB on 2020-04-29 13:40:42
@quah
I'll take a look.

@mjm716
Tag writer normalises names toUpperCase(), so artists of same spelling but are of different case are treated the same. I thought windows file handling was case insensitive, but as you can see below the file saved as Altın Gün isn't found after converting to upper case.

Code: [Select]
Z:\fb2k15\yttm\biography\lastfm\a\Altın Gün.txt File Exists true
Z:\fb2k15\yttm\biography\lastfm\a\ALTIN GÜN.txt File Exists false

I can probably remove the case check. Possibly it could also be related to exotic character handling in SMP, since the standard fso.FileExists(f) is used for the check.
Title: Re: Biography Discussion
Post by: WilB on 2020-04-29 18:30:27
@quah

I don't have a device with UNC paths, so please can you try replacing all of the two following lines.

Replace line 15 [buildPath...] with:
Code: [Select]
buildPth : pth => {console.log("buildPth input pth", pth); let result, tmpFileLoc = "", UNC = pth.startsWith("\\\\"); if (UNC) pth = pth.replace("\\\\", ""); console.log("UNC",UNC); const pattern = /(.*?)\\/gm; while ((result = pattern.exec(pth))) {tmpFileLoc = tmpFileLoc.concat(result[0]); if (UNC) {tmpFileLoc = `\\\\${tmpFileLoc}`; UNC = false;} console.log("buildPth output tmpFileLoc",tmpFileLoc); s.create(tmpFileLoc);}},

Replace line 519 [if (!pth) return...] with
Code: [Select]
if (!pth) return ""; console.log("cleanPth input", pth); let UNC = pth.startsWith("\\\\"); if (UNC) pth = pth.replace("\\\\", ""); if (!pth.endsWith("\\")) pth += "\\"; const c_pos = pth.indexOf(":"); pth = pth.replace(/[/|:]/g, "-").replace(/\*/g, "x").replace(/"/g, "''").replace(/[<>]/g, "_").replace(/\?/g, "").replace(/\\\./g, "\\_").replace(/\.+\\/, "\\").replace(/\s*\\\s*/g, "\\"); if (c_pos < 3 && c_pos != -1) pth = s.replaceAt(pth, c_pos, ":"); while (pth.includes("\\\\")) pth = pth.replace(/\\\\/g,"\\_\\"); if (UNC) pth = `\\\\${pth}`; console.log("cleanPth output", pth); return pth.trim();

Hopefully it will work. If not there are some console.log traces in there which might help, and that can be removed if all is OK.

Regarding embedded album art. That should display fine. It's working here. It may depend on embedded vs external setting: foobar2000 preferences > advanced > display > album art > embedded vs external
Title: Re: Biography Discussion
Post by: quah on 2020-04-30 18:46:18
@quah

I don't have a device with UNC paths, so please can you try replacing all of the two following lines.

Replace line 15 [buildPath...] with:
Code: [Select]
buildPth : pth => {console.log("buildPth input pth", pth); let result, tmpFileLoc = "", UNC = pth.startsWith("\\\\"); if (UNC) pth = pth.replace("\\\\", ""); console.log("UNC",UNC); const pattern = /(.*?)\\/gm; while ((result = pattern.exec(pth))) {tmpFileLoc = tmpFileLoc.concat(result[0]); if (UNC) {tmpFileLoc = `\\\\${tmpFileLoc}`; UNC = false;} console.log("buildPth output tmpFileLoc",tmpFileLoc); s.create(tmpFileLoc);}},

Replace line 519 [if (!pth) return...] with
Code: [Select]
if (!pth) return ""; console.log("cleanPth input", pth); let UNC = pth.startsWith("\\\\"); if (UNC) pth = pth.replace("\\\\", ""); if (!pth.endsWith("\\")) pth += "\\"; const c_pos = pth.indexOf(":"); pth = pth.replace(/[/|:]/g, "-").replace(/\*/g, "x").replace(/"/g, "''").replace(/[<>]/g, "_").replace(/\?/g, "").replace(/\\\./g, "\\_").replace(/\.+\\/, "\\").replace(/\s*\\\s*/g, "\\"); if (c_pos < 3 && c_pos != -1) pth = s.replaceAt(pth, c_pos, ":"); while (pth.includes("\\\\")) pth = pth.replace(/\\\\/g,"\\_\\"); if (UNC) pth = `\\\\${pth}`; console.log("cleanPth output", pth); return pth.trim();

Hopefully it will work. If not there are some console.log traces in there which might help, and that can be removed if all is OK.

Regarding embedded album art. That should display fine. It's working here. It may depend on embedded vs external setting: foobar2000 preferences > advanced > display > album art > embedded vs external

 
 

Thanks very much WilB for your assistance! 

Your patch is working well and covers are being saved for UNC and non-UNC paths. 

By the way, in Windows you can use a UNC path to access the local disk by using the local hostname.  Example: "\\My_PC\C\Users".  If you open the track that way in Foobar, it will use the UNC path and not try to convert it to a non-UNC path.  I suppose if you disabled enough file sharing features in Windows, it might break UNC, and perhaps that's your setup.

In playing with this stuff, I just figured out why embedded art was not working for me: In the context menu of the Bio panel, if "Sources > Cover: Cycle" is set to "Cycle Above", I don't see embedded art.  If I change the setting to "Front", then I see the embedded art. 

Thanks again and let me know if I can help test further.
Title: Re: Biography Discussion
Post by: AlainM51 on 2020-05-09 17:56:09
Hey,
I cannot install the component.
I have this message:
JScript Panel v2.3.6.1 (id:986144)
Erreur de compilation Microsoft JScript:
Erreur de syntaxe
File: <main>
Line: 3, Col: 1
Line 3: const requiredVersionStr = '1.2.2'; function is_compatible(requiredVersionStr) {const requiredVersion = requiredVersionStr.split('.'), currentVersion = utils.Version.split('.'); if (currentVersion.length > 3) currentVersion.length = 3; for (let i = 0; i < currentVersion.length; ++i) if (currentVersion != requiredVersion) return currentVersion > requiredVersion; return true;} if (!is_compatible(requiredVersionStr)) fb.ShowPopupMessage(`Biography requires v${requiredVersionStr}. Current component version is v${utils.Version}.`);

Title: Re: Biography Discussion
Post by: AlainM51 on 2020-05-11 18:44:50
Hey,
I cannot install the component.
I have this message:
JScript Panel v2.3.6.1 (id:986144)
Erreur de compilation Microsoft JScript:
Erreur de syntaxe
File: <main>
Line: 3, Col: 1
Line 3: const requiredVersionStr = '1.2.2'; function is_compatible(requiredVersionStr) {const requiredVersion = requiredVersionStr.split('.'), currentVersion = utils.Version.split('.'); if (currentVersion.length > 3) currentVersion.length = 3; for (let i = 0; i < currentVersion.length; ++i) if (currentVersion != requiredVersion) return currentVersion > requiredVersion; return true;} if (!is_compatible(requiredVersionStr)) fb.ShowPopupMessage(`Biography requires v${requiredVersionStr}. Current component version is v${utils.Version}.`);
Title: Re: Biography Discussion
Post by: mjm716 on 2020-05-12 02:30:31

I cannot install the component.
I have this message:
JScript Panel v2.3.6.1 (id:986144)

There are probably older versions which work with jspanel. Try https://hydrogenaud.io/index.php?topic=116669.0
Title: Re: Biography Discussion
Post by: MojoBass on 2020-05-12 05:29:14
There are probably older versions which work with jspanel. Try https://hydrogenaud.io/index.php?topic=116669.0
Or use the Spider Monkey Panel (https://theqwertiest.github.io/foo_spider_monkey_panel/) instead of the JScript Panel, where the latest version of Biography runs flawlessly
Title: Re: Biography Discussion
Post by: AlainM51 on 2020-05-12 07:34:13
Thank's, it's ok with spider monkey panel...
Title: Re: Biography Discussion
Post by: Cicero on 2020-06-10 06:13:59
Hey, I want to know why after I installed spider monkey and imported biography, it still said there isn't biography when I import theme?
Title: Re: Biography Discussion
Post by: AverageFoobarEnjoyer on 2020-09-09 10:12:43
How can I change the font? I see "_CUSTOM COLOURS/FONTS:USE" (true or false) in Panel Properties, but it just changes the font size and style.  :-*

My biography version is 1.1.3.
Title: Re: Biography Discussion
Post by: WilB on 2020-09-09 12:25:52
There may be two possibilities.

1) The font name isn't recognized and default is used.

2) Segoe UI is set.

Check menu:
layout > heading
layout > Subheading [Source]
layout > Subheading [Track] (ignore if grayed out)

Ensure SemiBold or SemiBold Italic aren't set for any. These options require use of Segoe UI for the main font, which takes precedence over the panel properties Custom.Font setting or UI font settings. A Custom.Font Heading can still be set.
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-08 08:10:53
I have a nested folder structure where the root folder I'm in is naturally an artist. In some versions of multi-disc editions of albums, the nesting depth increases by 1 step. How to set up downloading to the root folder Artist, photos to the folder Images, text in the Review or Biography?

-Artist
          |
          -Year - Album Name
          -Year - Other Album Name


-Artist
          |
          -CD1
          -CD2
                   |
                -Year - Album Name
Title: Re: Biography Discussion
Post by: WilB on 2020-10-08 16:41:40
Save folder locations are fully configurable with support for title formatting as well as absolute paths:

right click > menu > sources > server settings > configure

Scroll down to [SAVE] and enter the save folder patterns you you want. Follow the help guidance therein for best experience.

Assuming you really mean Artist is always the root folder, and 'YOUR PATH TO ARTIST IS ALWAYS SAME' then the straightforward way below may work (untested). Adjust as required.
Code: [Select]
[SAVE]
Text reviews*
Album Review [Allmusic] Folder=PUT YOUR PATH HERE\%BIO_ALBUMARTIST%\allmusic
Album Review [Lastfm] Folder=PUT YOUR PATH HERE\%BIO_ALBUMARTIST%\lastfm

Text biographies*
Biography [Allmusic] Folder=PUT YOUR PATH HERE\%BIO_ARTIST%\allmusic
Biography [Lastfm] Folder=PUT YOUR PATH HERE\%BIO_ARTIST%\lastfm

Photos
Image [Artist] Folder=PUT YOUR PATH HERE\%BIO_ARTIST%\images

*The 2 reviews (& 2 biographies) must be saved in different folders.
If your folder paths to Artist are inconsistent, you may be able to make that part of the path conditional depending on drive letter etc or something else in the full path.

Otherwise you can look at things like $directory(path), $directory(path,n) and string comparison functions etc etc to conditionally go up levels from the music file. Note that path functions are incompatible with radio streams, so would need to be used conditionally if you use such.

Also bear in mind that if you created the artist folders then there are the usual issues of what to do about invalid characters in file names.

Biography follows the foobar2000 original standard way

/ \ |: get replaced by a -
* gets replaced by x
" gets replaced with ''
< > get replaced by an _
? get replaced with nothing
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-08 20:43:16
Naturally, the artist folder is always different, because we are talking about performers, Manowar\ Metallica\ Moonspell\ etc

$directory(path) forces the script to download to the same folder as the album. At the same time, if you have a discography of 20 albums, a yttm folder with information will be created in each album folder, which is impractical - it is repeated. You need to create a single folder with information in the root folder, for example Metallica
Title: Re: Biography Discussion
Post by: WilB on 2020-10-09 11:41:19
It can be done.  You just need to work out the correct title formatting.

The following may get you the artist folder. I suggest you test it in something that does title format evaluation, like Title Formatting Sandbox. I tested it in that and the below is working here. Adjust as required. Note that this uses %artist% for test purposes, as %BIO_ARTIST% etc aren't supported outside biography.
Code: [Select]
$puts(str,'\'$lower(%artist%)'\')$puts(len,$len($get(str)))$puts(pos,$strstr($lower(%path%),$get(str)))$cut(%path%,$sub($add($get(pos),$get(len)),2))

You would then use it, for example, as below. Not that it incudes a default save location if no match is found. I checked the photos code in Biography & it worked for me as expected.
Code: [Select]
Photos
Image [Artist] Folder=$puts(str,'\'$lower(%BIO_ARTIST%)'\')$puts(len,$len($get(str)))$puts(pos,$strstr($lower(%path%),$get(str)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(len)),2))\images,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)

Text review
Album Review [Lastfm] Folder=$puts(str,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(len,$len($get(str)))$puts(pos,$strstr($lower(%path%),$get(str)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(len)),2))\lastfm,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))

Note also that this is really a general foobar2000 title format issue.
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-09 17:41:37
Amazing! It works! How do I resolve the issue of having a collaborator in the album???

Pitbull - downloads correctly, in the Pitbull folder

Pitbull feat. Christina Aguilera - downloads to the player folder, I do not even know what solution to offer, but if you listen to this album, it would be logical to assume that the script downloaded images to the folder, there is a brilliant solution?

You should probably save the name of the image, but upload it according to the  %albumartist%

Pitbull feat. Shakira_c8b69d69597c40d2a42531a7a88b0e53

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Album Review [Lastfm]

Another big request is to set up a review, since it is related to the album and not to the entire artist, download to the album folder again, given that sometimes there is an album where all the tracks are at the root of the album, and there is an album with two disks, so the script again rises to the level up and creates a folder in the %album%
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-09 19:05:54
rev_img\ it would be logical to assume saving to the covers folder, along with the album


please please please please please please do this - I've been reading about this for 2 years!
Title: Re: Biography Discussion
Post by: Wzor on 2020-10-09 22:17:39
Only album image is shown (downloaded). In artist view biography is OK but NO IMAGE for all artists in collection. Biography View component (0.4.2.5) shows everything fine. What's up?
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-10 05:39:52
@WilB
And here's what else I thought, it's logical to put the review in the album folder without creating an additional review folder, since this is a single text file. The name can be configured as "review (artist - album).txt"
Title: Re: Biography Discussion
Post by: WilB on 2020-10-10 12:16:27
@Mrakobes

1) Pitbull feat. Christina Aguilera scenario.

Sorry but the album artist behavior can't really be changed. It would break handling of various artists albums.

Best solution is NOT to put featured artists in the artist name. Such tags are not good for internet searches anyway. You could use a multi-value artist tag instead for example.

If you don't want to change tags, you could to truncate the artist name:

[NAMES]
....
%BIO_ARTIST%=$puts(str, feat. )$puts(len,$len($get(str)))$puts(pos,$strstr($lower(%artist%),$get(str)))$cut(%artist%,$sub($get(pos),1))

If you have multiple items you want to truncate on then you'll can work out the extra conditioning required.

2) Album folder

Essentially in the Text review example I posted you can try changing:

$puts(str,'\'$lower(%BIO_ALBUMARTIST%)'\')

to

$puts(str,'\'$lower(%BIO_ALBUM%)'\')

It should then give you the album folder. But if the artist and album names are same it will return the first match, which will be the artist folder. Since it seems your album folder name also contains the year (year - album) this shouldn't be an issue in your case. It should also work for rev_img.


@Wzor
It should all be working, indicating its a local issue. Ensure you're using v1.1.3 & no earlier version as there were site changes. Also confirm that you are able to view artist images at the site.

menu has two artist source options:
cycle from folder
artist
Ensure its set to cycle from folder.
Artist only checks the standard foobar2000 display artist pattern, which may well not be adequately configured.

Also ensure the layout hasn't any old versions of Biography that are taking over the downloading (and failing).

Simplest test would be to try a fresh portable install with just spider monkey panel & bio v1.1.3 loaded.

I wouldn't expect it to pick up images downloaded by the bio component (0.4.2.5) unless you have precisely set that folder location.

To avoid issues with settings in normal layout, reset everything to default.
1) right click > panel properties > clear. You may want to export panel properties first if you've made changes.
2) right click > sources > server settings > reset to default.
Title: Re: Biography Discussion
Post by: WilB on 2020-10-10 15:55:29
@Mrakobes

2) Album folder
 If you really are using Year - Album Name, then the year will also need including to match. Depending on what tags you use something like:

Code: [Select]
$puts(str,'\'[%date% - ]$lower(%BIO_ALBUM%)'\')

or if date tag is in a full date format:

Code: [Select]
$puts(str,'\'[$year(%date%) - ]$lower(%BIO_ALBUM%)'\')

see also previous post
Title: Re: Biography Discussion
Post by: WilB on 2020-10-10 22:13:17
^ One other little thing. Check your final strings don't exceed the 255 character limit. The ones I posted are very close (249 & 252), and I realized the year handler pushed it over. Here is a version with the year handler that should fit.

Code: [Select]
Album Review [Lastfm] Folder=$puts(s,'\'[$year(%date%) - ]$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\lastfm,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-11 11:55:41
@WilB thank you so much for your help! Please correct the code a little, it doesn't work with the nested folder structure
(https://i114.fastpic.ru/thumb/2020/1011/00/2faf0ddcd3e8aa09bf803a6288405600.jpeg) (https://i114.fastpic.ru/big/2020/1011/00/2faf0ddcd3e8aa09bf803a6288405600.png)
You need to create a single text file with the name "Review (artist - year - album)", that is, not nested in the "lastfm" folder. however, it must be placed in the album folder in the single-disc version and in the album folder (not CD1 or CD2) (otherwise it will be meaninglessly duplicated) in the two-disc version
Title: Re: Biography Discussion
Post by: anamorphic on 2020-10-11 15:04:12
You need to create a single text file with the name "Review (artist - year - album)", that is, not nested in the "lastfm" folder.
I think the Biography script does not currently work that way. It requires a folder for each review type (a "lastfm" folder and "allmusic" folder). And you cannot change the name of the text file.

(Unless I misunderstood and you were asking a feature request?)

Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-11 15:54:46
names can be changed easily and folders can also be changed in biography.ini

we are waiting for him to come to us @WilB
Title: Re: Biography Discussion
Post by: redorb on 2020-10-12 08:52:21
@Mrakobes
Seriously... please use another imagehost! Without pron ads!! :|
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-12 12:38:07
@redorb ahaha, I didn't know there was porn, I have an ad blocker in my browser, I hope you didn't sin with your hands))))
Title: Re: Biography Discussion
Post by: WilB on 2020-10-12 16:41:56
1) Neatest: save all in artists folder

Code: [Select]
[SAVE]
Album Review [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))
Album Review [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))
Biography [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Allmusic,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Biography [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Image [Artist] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Image [Review] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))

Gives:

Artist
   - Images (artist and rev_imgs)
   - Allmusic (bio & album reviews)
   - Lastfm (bio & album reviews)

2)
   Save reviews & rev_img in album folder.
   Save artist data as above.
Code: [Select]
[SAVE]
Album Review [Allmusic] Folder=$puts(s,'\'[$year(%date%) - ]$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Allmusic Review,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))
Album Review [Lastfm] Folder=$puts(s,'\'[$year(%date%) - ]$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Lastfm Review,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))
Biography [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Allmusic Biography,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Biography [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Lastfm Biography,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Image [Artist] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Artist Images,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Image [Review] Folder=$puts(s,'\'[$year(%date%) - ]$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2)),%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))

Gives

Artist
   - Artist Images
   - Allmusic Biography
   - Lastfm Biography

   year - album
      - Allmusic Review
      - Lastfm Review
      rev_img
or
   year - album
      - Allmusic Review
      - Lastfm Review
      - CD1
      - CD2
      rev_img

Your suggestion of using 'Review (artist - year - album)' instead of simply 'album artist - album' doesn't alter the subfolder pattern required. Besides if the save name contains the album name, it should be pretty obvious it's an album.
Title: Re: Biography Discussion
Post by: WilB on 2020-10-12 18:23:45
^ Fixed some copy paste errors in default paths in the above

1)

Code: [Select]
[SAVE]
Album Review [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))
Album Review [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))
Biography [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Allmusic,%profile%\yttm\biography\allmusic\$lower($cut(%BIO_ARTIST%,1)))
Biography [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\biography\lastfm\$lower($cut(%BIO_ARTIST%,1)))
Image [Artist] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Image [Review] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images,%profile%\yttm\rev_img\$lower($cut(%BIO_ALBUMARTIST%,1))\%BIO_ALBUMARTIST%)

2)

Code: [Select]
[SAVE]
Album Review [Allmusic] Folder=$puts(s,'\'[$year(%date%) - ]$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Allmusic Review,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))
Album Review [Lastfm] Folder=$puts(s,'\'[$year(%date%) - ]$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Lastfm Review,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))
Biography [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Allmusic Biography,%profile%\yttm\biography\allmusic\$lower($cut(%BIO_ARTIST%,1)))
Biography [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Lastfm Biography,%profile%\yttm\biography\lastfm\$lower($cut(%BIO_ARTIST%,1)))
Image [Artist] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2))\Artist Images,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Image [Review] Folder=$puts(s,'\'[$year(%date%) - ]$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(p,$strstr($lower(%path%),$get(s)))$ifgreater($get(p),0,$cut(%path%,$sub($add($get(p),$get(l)),2)),%profile%\yttm\rev_img\$lower($cut(%BIO_ALBUMARTIST%,1))\%BIO_ALBUMARTIST%)
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-10-13 13:34:12
@WilB My dear, thank you very much! I will focus on the first option.

In the second option, in the case of a two-disc edition, for what reasons does not download to the artist folder, but downloads to the player folder yttm
Title: Re: Biography Discussion
Post by: redorb on 2020-10-15 18:40:55
@redorb ahaha, I didn't know there was porn, I have an ad blocker in my browser, I hope you didn't sin with your hands))))
What a totally stupid comment!
Now... remove your ugly image link and use a proper image host!
https://imgshare.io/
https://imgshare.io/images/2020/10/15/reddevil.gif
https://imgur.com/
https://i.imgur.com/9h3w6RN.gif
https://postimages.org/
https://i.postimg.cc/vH9GN5vJ/reddevil.gif
https://imgbb.com/
https://i.ibb.co/SNr6fWy/reddevil.gif
https://www.imagebanana.com/
https://s2.imagebanana.com/file/201015/PuvN3QeK.gif
(https://i.imgur.com/PYwOK9I.jpg)
Title: Re: Biography Discussion
Post by: jazzthieve on 2020-10-15 18:56:00
Dude, you need to chill, clearly he was joking. Don't spam the forum with stupid links.
Title: Re: Biography Discussion
Post by: redorb on 2020-10-15 20:18:09
Dude, you need to chill, clearly he was joking. Don't spam the forum with stupid links.
That's OK! I'm with stupid...↑
Title: Re: Biography Discussion
Post by: MusicExtremist on 2020-10-25 16:59:20
Is individual track data scraping added or not?
Allmusic has genres and moods for some popular songs now.
Title: Re: Biography Discussion
Post by: redorb on 2020-10-30 16:19:33
Hello WilB!

I hope all is well with you.
Moved from Win7 to Win 10
foobar2000 1.6.2
Spider Monkey Panel v1.3.1
Biography 1.1.3
Doing this below and set to 20 images but I can't fetch more than 5 images?
https://hydrogenaud.io/index.php?topic=112914.msg971055#msg971055
I have saved (set new path in biography.ini ) yttm folder on another hdd and I have folders there with 20 images and an update.txt.
Tested to remove images and only 5 gets now downloaded.
Also noticed that the folder "lastfm" contains like a "b" folder with artist name starting with B *Name* And Similar Artists.json
In my yttm path there is no "lastfm" folder or .json
I'm obviously missing something in the configuration...
The jump from using Win7 for 10 years and into Win10 has been very painful... ouch!! :|
Hoping for some info and advice, it will be highly appreciated!
 
Best regards and stay safe and healthy,
redorb
Title: Re: Biography Discussion
Post by: WilB on 2020-10-30 19:08:23
menu > sources > server settings > configure. Under [MISCELLANEOUS] heading you can set the indicated items as shown.

Code: [Select]
Image [Artist] Initial Fetch Number (1-20)=20
Image [Artist] Auto-Add New=1
Image [Artist] Cache Limit=

Note that a restart is required for any changes to take effect.

I checked and its all working OK. If there are still issues, reset server settings from the sources menu, then try above again.

You may need to use sources > Force Update  for any where you already have 5, as it only rechecks periodically.

You could also copy biography.ini from w7 installation if you have it & it has custom settings.

@MusicExtremist  Track data is available for lastfm but not AM
Title: Re: Biography Discussion
Post by: redorb on 2020-10-31 10:41:57
Thank you WilB!

Why didn't I think of that? I hade a backup of the biography.ini.
Copy paste and voilà, all is good! :D
Also had a backup of the "DarkOne v4.0 - Tedgo - Spider Monkey Panel - Biography Version - Modified by WilB.fcl
The one you helped me configure so its good to have backups, problem is to remember you have backups and where they are...
Hmm... could be I'm getting old.
Now if I only could get back the Aero theme for title bars...
Foobar2000 DarkOne now has a massive ugly title bar, I don't like the Win10 aesthetics at all!

Thanks and best regards,
redorb
Title: Re: Biography Discussion
Post by: jazzthieve on 2020-10-31 16:53:23
@WilB is it possible to retrieve and write to tags the amount of listeners per artist from last.fm? I want to replicate the mainstream-o meter from the listening reports on lastfm in my foobar.
Title: Re: Biography Discussion
Post by: mygen on 2020-10-31 21:17:14
Hello

My problem is that he doesn't show me the artist's picture on the computer. It works fine on a laptop. I am using Winodows 10 in both cases.

Does anyone have an idea why he doesn't show me pictures with the artist, only the artist's description?

Could it be a matter of system settings?
Title: Re: Biography Discussion
Post by: WilB on 2020-11-04 10:37:42
@jazzthieve  Yes it's possible

@mygen

1) Ensure you're using v1.1.3 & no earlier version as there were site changes.

2) Check: menu > sources > photo
Ensure it's set to: cycle from folder
If set to artist it only loads from the standard foobar2000 display artist pattern, which may well not be adequately configured.

3) Ensure the layout hasn't any old versions of Biography: one is auto-picked to do the downloading and so the presence of an old version can cause it to fail. The next version of Biography will address this.

4) Possibly downloading is switched off in server settings etc.
So I suggest resetting it. Original should be auto-backed up.
sources > server settings > reset to default

5) Try resetting panel properties:
menu > panel properties > clear !!!BACK UP PANEL PROPERTIES FIRST IF YOU MADE CHANGES YOU WANT TO KEEP!!!

6) Try a fresh portable install with just spider monkey panel & bio v1.1.3 loaded.
Title: Re: Biography Discussion
Post by: jazzthieve on 2020-11-04 16:37:39
Does this mean in the current version 1.1.3 or in a possible future implementation? I haven't found any setting for this in the server settings.
Title: Re: Biography Discussion
Post by: WilB on 2020-11-05 11:34:35
It would require implementing. Values obtained are in the abbreviated number format which are language specific, e.g.

Scrobbles 82.3M; Listeners 2.3M.

I'm not sure if that format is useful to you or not.
Title: Re: Biography Discussion
Post by: Mrakobes on 2020-11-06 12:32:34
Hi, everybody. How do I add the tag recording function to a button? Unfortunately, the script cannot be displayed to the file menu and context menu that is required to create a button on the panel. How can I implement the function of writing to tags with last.FM? Which is currently available via shift + right mouse button? And also how to change the names of the tags themselves, you can register the discogs yourself, for example, so that there is a genre instead of discogs_genre
Title: Re: Biography Discussion
Post by: jazzthieve on 2020-11-06 16:32:42
Scrobbles 82.3M; Listeners 2.3M.

I can work with that. Basically I would just convert 2.3M into a full number then look up what the artist is with the top listener (I'm guessing The Beatles are the ones with the most listeners) and calculate a percentage on that with titleformatting.  Thinking a bit further I'd probably be doing some genre mainstream calculations in sql (I always channel all my data to an sqlite database). But I can't do anything without having the data (listeners) first.
Title: Re: Biography Discussion
Post by: WilB on 2020-11-27 11:57:35
@wcs13 : next version has the features you requested a while ago + a fully configurable image resolution filter for artist photos

@jazzthieve  : implemented for next version

Title: Re: Biography Discussion
Post by: wcs13 on 2020-11-27 23:39:22
@wcs13 : next version has the features you requested a while ago + a fully configurable image resolution filter for artist photos
THANK YOU SO MUCH @WilB ! I was really hoping for it. I can't wait to try it and see how it works :)
Title: Re: Biography Discussion
Post by: jazzthieve on 2020-11-28 04:12:16
Great news, looking forward to the next release.
Title: Re: Biography Discussion
Post by: michaengfrv on 2020-12-26 09:47:10
Hello WilB~ Thanks your Beautiful Bio script.

I have a problem.
I use the biography script as a cover panel.
Sources / Cover:/ Front option shows embedded front cover.
But Sources / Cover: / Cycle above option does not show embedded cover that only have one front cover file.
For example Hot100 chart music files has a embedded front cover.

Bio script.js and SMP is latest version.
Title: Re: Biography Discussion
Post by: rolf1955 on 2020-12-28 14:29:27
Hello all,

Can anyone tell me what values I need to change to make the artist image smaller and thus give the text more space?

Thank you very much.
Title: Re: Biography Discussion
Post by: rolf1955 on 2020-12-28 14:58:38
Hello all,

Can anyone tell me what values I need to change to make the artist image smaller and thus give the text more space?

Thank you very much.

I've got it!! This is sooo cool done. Totally freaky. Respect and congratulations to WilB!

Solution:
Right click --> Layout --> Create and mange Styles --> Create New Style

 8)  8)  8)  :D
Title: Re: Biography Discussion
Post by: WilB on 2021-02-08 12:02:22
That's a bug I was aware of. It should be fixed in the next version.
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2021-02-22 08:48:06
Hi
Is it possible to save both artist biographies (AllMusic & LastFM) to the same folder but with a different file name. Also, the same for album reviews? If not, could you please consider this as a request for the next version.
Title: Re: Biography Discussion
Post by: WilB on 2021-02-22 10:42:52
I'd already done that for the next version!
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2021-02-22 10:52:50
Thanks. Looking forward to that new version.
Title: Re: Biography Discussion
Post by: culinko on 2021-03-13 22:27:48
Hi WilB,

As I mentioned in the Library Tree topic, I have updated from JScript panel to Spider Monkey panel (I am really grateful that you are still maintaining this script!) and I have managed to set up everything as it was before. In this case I have also encountered 2 minor issues, so I am listing them below if you'd be so kind to take a look:

1. The last.fm stats for Top Albums and Similar Artists are still being displayed despite setting them as disabled in panel properties. I have checked if this isn't a cached issue by removing the existing artist bio but it is still being displayed. Let me know if there is something I have missed. I have this info displayed at the bottom after the bio text. This is how it looks like:

(https://i.imgur.com/onCHsyy.png)

2. I have been able to fix the second issue, however I will mention it just in case someone else runs into the same problem or if you decide that this behavior is a bug. Basically there is an issue with displaying accented characters (e.g. á, é, č) in the text. I have investigated why it happens and found out that the old cached files (from earlier versions of the script) have been saved in UTF-8 format. After converting all of the txt files into UTF-8-BOM they are now displayed correctly. Not sure if this is intended so I am mentioning it just in case. Here is how it looked before and after conversion:

(https://i.imgur.com/iDmLXHf.png)

Thank you for the feedback and thank you for maintaining this script!
Title: Re: Biography Discussion
Post by: regor on 2021-03-22 21:37:57
Hi WilB,
2 questions related to getting the country for a given artist: https://hydrogenaud.io/index.php?topic=120729.msg995115#msg995115
- Tried to save last.fm locale tag to some tracks but it doesn't work if the tracks were not played before. Is there an option to force downloading ALL data (at least the text) from selected tracks on demand (even if there are rate limits imposed and takes some time)? (never used the script so I'm not familiar with it)
- Could you consider notifying tags from current track to other panels?  this.write_tags has already the logic for a handle list the idea would be replacing the write part with:
Code: [Select]
window.NotifyOthers('Biography tags',JSON.stringify(tags));

The second would allow other scripts to re-use the data from the current track. My current script just uses tags from files (and that's what I want for myself), but having data directly from your panel would also cover other use-cases (and work as fallback when no tags are present).
Title: Re: Biography Discussion
Post by: mjm716 on 2021-03-23 04:50:33
Is there an option to force downloading ALL data (at least the text) from selected tracks on demand

The best way I managed to do this (batch load all artist data) was to generate a playlist with one track by every artist (or album for reviews) in my collection (via Random Pools plugin).

Then I used autohotkey (https://www.autohotkey.com/) to automate skipping tracks every 5 sec. which seemed to be enough time to load the bios/reviews.
Code: [Select]
    #Persistent
    SetTimer, PressTheKey, 5000
    Return

    PressTheKey:
    Send, {NumpadDown}
    Return

Something similar should have worked via built-in seek control>preview, but it didn't for some reason that I can't recall.

btw Regor - I'm anxious for a public release - unfortunately I haven't had the time to keep up with your beta release schedule.
Title: Re: Biography Discussion
Post by: jazzthieve on 2021-03-23 05:53:25

Then I used autohotkey (https://www.autohotkey.com/) to automate skipping tracks every 5 sec. which seemed to be enough time to load the bios/reviews.
Code: [Select]
    #Persistent
    SetTimer, PressTheKey, 5000
    Return

    PressTheKey:
    Send, {NumpadDown}
    Return

Could've used foo_preview for that.
Title: Re: Biography Discussion
Post by: regor on 2021-03-23 08:38:33
Yep I know both methods as workaround, but the point is the procedure should involve the minimum steps. I think it should be done within the script scope, not requiring other scripts or plugins to simulate playback. Although I understand the rate limits if we talk about images, the text data may have more relaxed rules. Asking regular users to install my scripts, plus this one, plus another plugin to get a tag and make it work seemed too much.

My 2nd suggestion would at least partially solve the problem since variables would be exposed on playback. Thanks to both anyway!

Quote
btw Regor - I'm anxious for a public release - unfortunately I haven't had the time to keep up with your beta release schedule.
Will send you a PM next time I send links to people. Should be this week
Title: Re: Biography Discussion
Post by: anamorphic on 2021-03-29 22:48:18
Hey WilB,

Just a minor request please. When Covers are set to 'Cycle From Folder' they load alphabetically, which for me means -

Back.jpg -> Disc.jpg -> Front.jpg

However, I'd much rather have the Front image appear first when an album starts playing, then the rest. I notice it already does that when 'Cycle Above' is also enabled, where the order preferably goes -

Front -> Back -> Disc -> Artist

Unfortunately that method is no use for me because I use the art threader for genre icons and would rather they not show up as album art. ;)

So if any chance you could make 'Cycle From Folder' start with the Front.jpg / Cover.jpg, that would be cool. (Or an option?)

Cheers
Title: Re: Biography Discussion
Post by: WilB on 2021-04-01 16:49:10
@anamorphic

'Cycle From Folder' loads all the images in the folder using SMP utils. They appear to be returned in a random order. Biography doesn't sort them. So the fact you obtained them in alphabetical order seems fortuitous. When I tried I happened to get Front first. It might be possible to sort the list alphabetically using a rule based method. But that may mean the user defining the rules & complex options hardly anybody would use. 'Cycle Above' can call the images in order.

In your case there seems to be a simple fix: use 'Cycle Above' and exclude the artist pattern. I could add check marks against the menu items to select which of Front, Back, Disc, Icon Artist are used, if the method works for you.

To test if the method works, change on line 3130:

for (let i = 0; i < 5; i++) to
for (let i = 0; i < 4; i++)

i.e. just replace the 5 with 4.

That will exclude the artist look up, then you can use 'Cycle Above'

@regor  It seems you've essentially solved the issue another way. It doesn't seem worth the effort of trying to supply data through notify for what may be a few residuals - it's not even clear that lfm would have missing ones anyway compared with listings on the MusicBrainz site.

@culinko Last.fm stats for Top Albums and Similar Artists are always in the bio. The setting you refer to controls display on the drop down menu.
Title: Re: Biography Discussion
Post by: culinko on 2021-04-01 21:09:50
Thanks for the reply. I was wondering, would it be possible to add this as a setting so people could hide some of the sections from Last.fm?

Additionally, I have found that for some reason the Last.fm biography is not displayed for a Slovak group called Polemic. I was not able to figure out why, since it has a biography on the Last.fm page: https://www.last.fm/music/Polemic.

Only the Last.fm sections are being displayed, please see the following screenshot:
(https://i.imgur.com/JhLJMU3.png)

My Last.fm language for the script is set to EN and this is the only artist that I encountered where the discography is not being fetched properly.

Let me know if you need any more information regarding this issue, thank you for taking a look.
Title: Re: Biography Discussion
Post by: anamorphic on 2021-04-02 00:27:51
Hi WilB :)

To test if the method works, change on line 3130:

for (let i = 0; i < 5; i++) to
for (let i = 0; i < 4; i++)
That works to exclude Artist, yes. I had to go further and set it to 1 to only show Front (and then it loads Back / Disc from folder) - this works perfect for me.

To clarify, my setup is a bit unconventional - for album art patterns I use Disc thread to load genre icons, and Back to load artist icons (in Facets). Artist thread loads artist photos in the parent folder.

Since probably no one else does that, I'm happy to just use that modification if you think is not worth changing the official script.

Cheers
Title: Re: Biography Discussion
Post by: FritzLn on 2021-04-04 05:41:24
Greetings,

I have an issue with the %profile% placeholder in biography.ini

i'm using a portable installation and one of the folders that the portable installation is inside of starts with a period

so for example: %profile% = C:\Users\Me\MyStuff\.problematic_folder\foobar\profile

the problem is that the folder that begins with a period gets converted from .problematic_folder to _problematic_folder

so my reviews/bios, etc get saved to the wrong location

any ideas?

thanks



ah, i think i see the offending line

Code: [Select]
.replace(/\\\./g, "\\_")

not exactly sure why that would be necessary though
Title: Re: Biography Discussion
Post by: regor on 2021-04-06 18:08:23
@regor  It seems you've essentially solved the issue another way. It doesn't seem worth the effort of trying to supply data through notify for what may be a few residuals - it's not even clear that lfm would have missing ones anyway compared with listings on the MusicBrainz site.

@culinko Last.fm stats for Top Albums and Similar Artists are always in the bio. The setting you refer to controls display on the drop down menu.
Nope, the problem is not solved at all. Data is only downloaded with playback and makes no sense to ask users to playback their entire library to fetch a tag, then write them and then use my plugin...

Anyway I don't understand your reticence, since the main point of getting tags from the lastfm/allmusic servers is to use them (?) Obviously since they are not available to other plugins, no one is using them outside your panel. That may change if you share the tags, just saying. (for sure I would create much more things if I could use tags like similar artist, etc. shared by your panel)

Apart from that... it's a matter of changing 3 lines to do it, and that's just a dirty edit I made to check it:
tagger().this.notifyCountry already has all the code, unused.. (at least for the country tag, the tag writing routine has code for all tags)
Code: [Select]
	this.notifyCountry = (handles) => {
       if (!handles) return;
        let a = "", a_o = "####",  aa = "", aa_o = "####", l = "", l_o = "####";
        let locale = [], rem = [], sa = [], tags = [], artTags = []; // THIS
        const tf_a = FbTitleFormat(p.tf.a), tf_aa = FbTitleFormat(p.tf.aa), tf_cue = FbTitleFormat("$ext(%path%)"), tf_l = FbTitleFormat(p.tf.l);
        const artist = tf_a.EvalWithMetadb(handles).toUpperCase(), album = tf_l.EvalWithMetadb(handles).toUpperCase();  // THIS to metadb
if (!name.alb_strip) l = l.replace(/CD(\s*\d|\.0\d)|CD\s*(One|Two|Three)|Disc\s*\d|Disc\s*(III|II|I|One|Two|Three)\b/gi,"").replace(/\(\s*\)|\[\s*\]/g, " ").replace(/\s\s+/g, " ").replace(/-\s*$/g, " ").trim();
else l = l.replace(/CD(\s*\d|\.0\d)|CD\s*(One|Two|Three)|Disc\s*\d|Disc\s*(III|II|I|One|Two|Three)\b|(Bonus\s*Track|Collector's|(Digital\s*|Super\s*|)Deluxe|Digital|Expanded|Limited|Platinum|Reissue|Special)\s*(Edition|Version)|(Bonus\s*(CD|Disc))|\d\d\w\w\s*Anniversary\s*(Expanded\s*|Re(-|)master\s*|)(Edition|Re(-|)master|Version)|((19|20)\d\d(\s*|\s*-\s*)|)(Digital(ly|)\s*|)(Re(-|)master(ed|)|Re(-|)recorded)(\s*Edition|\s*Version|)|\(Deluxe\)|\(Mono\)|\(Reissue\)|\(Revisited\)|\(Stereo\)|\(Web\)|\[Deluxe\]|\[Mono\]|\[Reissue\]|\[Revisited\]|\[Stereo\]|\[Web\]/gi,"").replace(/\(\s*\)|\[\s*\]/g, " ").replace(/\s\s+/g, " ").replace(/-\s*$/g, " ").trim();
if (artist != a_o) {
// remove any reference to [i] changed to var
a_o = artist;
if (p.tag[6].enabled || p.tag[7].enabled || p.tag[8].enabled && p.tag[8].enabled < 7) {
const lfmBio = p.cleanPth(p.pth.lfmBio, handles, 'tag') + artist.clean() + ".txt";
if (s.file(lfmBio)) {
const lfm_a = s.open(lfmBio);
if (p.tag[6].enabled) {ix = lfm_a.lastIndexOf("Top Tags: "); if (ix != -1) {artTags = lfm_a.substring(ix + 10); artTags = lfmTidy(artTags, artist, l);}}
if (p.tag[7].enabled) {
let loc = lfm_a.match(RegExp(kww, "i")); if (loc) {
loc = loc.toString();
ix = lfm_a.lastIndexOf(loc);
if (ix != -1) {
locale = lfm_a.substring(ix + loc.length);
locale = locale.split('\n')[0].trim().split(", ");
}
}
}
}
}
}
window.NotifyOthers(window.Name + ' notifyCountry', locale);
}

Then on text()
Code: [Select]
 this.draw = gr => {
tag.notifyCountry(s.handle(ppt.focus));
...

And don, country is notified to the world map
X
Title: Re: Biography Discussion
Post by: WilB on 2021-04-09 18:20:43
@culinko

Polemic. There are issues at last.fm. The main wiki page (https://www.last.fm/music/Polemic/+wiki) is giving a 503 error.

To exclude similar artists from the bio you can change line 3999 to :
Code: [Select]
/*if (simArtists.length) simArtists = "\r\n\r\n" + similar[p.lfmLang_ix] + simArtists.join(", "); else*/ simArtists = ""; s.doc.close();

To exclude top albums from the bio you can change line 4021 to :
Code: [Select]
/*if (topAlbums.length) topAlbums = "\r\n\r\n" + topAlb[p.lfmLang_ix] + topAlbums.join(", "); else*/ topAlbums = "";

@regor
Well I thought Pickard could do it based on your other post??? I can look into adding something for the next version. Probably it will be after on_playback_new_track() when it has the data. I think this.draw is called too frequently.

@FritzLn From the documentation:
Quote
The script always replaces leading dots in metadata with underscores in folders and file names. This is because foobar2000 doesn't automatically handle this case and won't load images* if any folder in the search pattern has a leading dot "."
* this means if you try & load saved images through fb2k preferences\display\album art patterns. Without the fix images for artists like .38 Special don't seem to load through this route & so won't be available to other album art viewers & playlists. Anyway you found what to change so it works for you.
Title: Re: Biography Discussion
Post by: regor on 2021-04-09 18:52:29
@culinko

Polemic. There are issues at last.fm. The main wiki page (https://www.last.fm/music/Polemic/+wiki) is giving a 503 error.

To exclude similar artists from the bio you can change line 3999 to :
Code: [Select]
/*if (simArtists.length) simArtists = "\r\n\r\n" + similar[p.lfmLang_ix] + simArtists.join(", "); else*/ simArtists = ""; s.doc.close();

To exclude top albums from the bio you can change line 4021 to :
Code: [Select]
/*if (topAlbums.length) topAlbums = "\r\n\r\n" + topAlb[p.lfmLang_ix] + topAlbums.join(", "); else*/ topAlbums = "";

@regor
Well I thought Pickard could do it based on your other post??? I can look into adding something for the next version. Probably it will be after on_playback_new_track() when it has the data. I think this.draw is called too frequently.

@FritzLn From the documentation:
Quote
The script always replaces leading dots in metadata with underscores in folders and file names. This is because foobar2000 doesn't automatically handle this case and won't load images* if any folder in the search pattern has a leading dot "."
* this means if you try & load saved images through fb2k preferences\display\album art patterns. Without the fix images for artists like .38 Special don't seem to load through this route & so won't be available to other album art viewers & playlists. Anyway you found what to change so it works for you.
No I would have to write a plugin for picard to make it work. Can be don (no ETA), but obviously using your plugin during playback is more convenient. Also having other tags, apart from locale, would open a world of possibilities -specially for similar artists- (while I would be restricted to just locale tags using Picard+plugin). And yep, my dirty edit was just to test it, better on new track. Thank you so much!
Title: Re: Biography Discussion
Post by: culinko on 2021-04-10 18:49:44
@WilB Thank you so much with the script change for Similar Artists/Top Albums, I can confirm the sections are now gone after forcing the data to update :)

As for the 503 page, I will wait to see if it comes back up at some point in the future and if not I will just report it on Last.fm forums.

Thanks once again for the awesome support!
Title: Re: Biography Discussion
Post by: paregistrase on 2021-05-06 17:43:32
Hi people !

I just found that new searchs for allmusic always returns not found.

I didn't notice before because almost all artist have downloaded data already.

For example I add The Chemical Brothers to my library and last.fm data was downloaded but allmusic returns
Quote
Biography Server: allmusic biography: The Chemical Brothers: not found
Biography Server: allmusic album review: Exit Planet Dust / The Chemical Brothers: not found

and allmusic have both
https://www.allmusic.com/artist/the-chemical-brothers-mn0000067631/biography (https://www.allmusic.com/artist/the-chemical-brothers-mn0000067631/biography)
https://www.allmusic.com/album/exit-planet-dust-mw0000175359 (https://www.allmusic.com/album/exit-planet-dust-mw0000175359)

Anyone having something similar and found a solution?

Thanks in advanced

Edit: Using foobar2000 v1.6.5 biography 1.13 spidermonkey 1.4.1 running in ubuntu 21.04 with wine-staging 6.7
Title: Re: Biography Discussion
Post by: marc2k3 on 2021-05-06 22:58:19
This will be related to your post in the main SMP thread where it was unable to load the htmlfile ActiveXObject under WINE - there would be no issues on Windows. For scraping the allmusic website, it's absolutely required.
Title: Re: Biography Discussion
Post by: paregistrase on 2021-05-06 23:27:37
This will be related to your post in the main SMP thread where it was unable to load the htmlfile ActiveXObject under WINE - there would be no issues on Windows. For scraping the allmusic website, it's absolutely required.

Makes sense.

And this time will not be as easy as comment out some line I suppose.

At least last.fm works...

And talking about requieres ActiveX...there must be a version of biography that worked in a different way because I have a lot of reviews downloaded and always used wine to foobar so it was working in the past.

Do you know which one?
Title: Re: Biography Discussion
Post by: marc2k3 on 2021-05-07 08:11:03
It's always required it. Perhaps you had a different WINE configuration? I see from the SMP thread, you're avoiding a 32bit prefix/IE8. That would probably fix it.

edit: i've not tried this script for awhile but I'm pretty it's required for last.fm too - definitely for images. bios are available via the web service/JSON but IIRC, WilB scrapes for extra info from the webpages.
Title: Re: Biography Discussion
Post by: paregistrase on 2021-05-07 10:46:03
It's always required it. Perhaps you had a different WINE configuration? I see from the SMP thread, you're avoiding a 32bit prefix/IE8. That would probably fix it.

edit: i've not tried this script for awhile but I'm pretty it's required for last.fm too - definitely for images. bios are available via the web service/JSON but IIRC, WilB scrapes for extra info from the webpages.

Download images never worked in wine, at least for me, not even in the old times of first wsh or jscript panel.

A 32 bit prefix doesn't make any differences besides that is mandatory if you want to install ie8 verb.

But ie8 doesn't help with download images neither to get allmusic reviews. (I makes it right know and he gives "Biography Server: allmusic album review / biography: In Your Nature / Zola Jesus: not found Status error: 12157")

Sometime ago was necessary to even makes the panel works but with spider monkey and new wine versions is no more mandatory. The panel almost works in a default install without winetricks verbs. With wsh57, gdi+ and a key in regedit (AppliedDPI) you can use all complete samples, the cool album list and biography.

The only problems (in the "you can fix now" list) that left is the crash in right click and the allmusic data

But if you go the way of ie8 verb you can't download images anyway, allmusic doesn't works, the links in all the profile are linked to ie8 (and ie8 in wine doesn't open almost any page and get stuck all time) and some script like musicbrainz info doesn't works.

Is a no go that way.

And I had to use it a long time

https://hydrogenaud.io/index.php?topic=112914.msg975148#msg975148 (https://hydrogenaud.io/index.php?topic=112914.msg975148#msg975148)

In this allmusic worked, I know now where my download data comes from.

Yeah last modification of Fear Factory.txt 20 dic 2019, so around this time the panel stop downloading data.

The newest are from August 2020





Title: Re: Biography Discussion
Post by: marc2k3 on 2021-05-07 11:24:06
I suspect this would be servers being updated to block ye olde clients without modern TLS support. It's like Windows 7 is pretty useless out of the box until it's fully updated.
Title: Re: Biography Discussion
Post by: paregistrase on 2021-05-07 11:30:44
I suspect this would be servers being updated to block ye olde clients without modern TLS support. It's like Windows 7 is pretty useless out of the box until it's fully updated.

Sure it is  ;D

With ie8 you can forget about any https.or similar inside the prefix, even if you changes the keys in regedit ie8 always find the way to come back.

I even used a old 32 firefox installed inside wine to try to avoid ie8 but was a race lost before start
Title: Re: Biography Discussion
Post by: marc2k3 on 2021-05-07 11:44:00
Of course installing 3rd party browsers in WINE won't make any difference. If you can install/browse with them, that's because they will use 3rd party libraries like OpenSSL and have their own certificate stores which have no dependences on the underlying APIs provided by the OS.

All internet connectivity in JScript Panel and Spider Monkey Panel is through the xmlhttp ActiveXObject / built in windows certificate store which is entirely dependent on how updated the OS is. It doesn't necessarily have to be that way but that's the way all scripts are currently written. No one has gone out of their way with alternatives because no one cares about WINE enough.
Title: Re: Biography Discussion
Post by: paregistrase on 2021-05-07 11:52:59
Of course installing 3rd party browsers in WINE won't make any difference. If you can install/browse with them, that's because they will use 3rd party libraries like OpenSSL and have their own certificate stores which have no dependences on the underlying APIs provided by the OS.

All internet connectivity in JScript Panel and Spider Monkey Panel is through the xmlhttp ActiveXObject / built in windows certificate store which is entirely dependent on how updated the OS is. It doesn't necessarily have to be that way but that's the way all scripts are currently written. No one has gone out of their way with alternatives because no one cares about WINE enough.
I only try to used it to open links, didn't expect that solved the conection issues

I understand this, the program is for windows and is must be more convenient use the already existing tools of the OS.

It will be cool if it was different but linux users are a minority.

Until then the only thing that left is wait for a implementation in the wine side.
Title: Re: Biography Discussion
Post by: Sergey77 on 2021-05-08 08:16:24
WilB, Is it possible to make a search successful when both the artist's name and the song's name are in the title?
for example like in this internet radio:
Code: [Select]
http://broadcast.infomaniak.ch/energylove-high.mp3
Please consider this question for Bio and YTTM scripts.
Title: Re: Biography Discussion
Post by: eamatag71 on 2021-05-09 23:45:07
Hi, my composer tag is like "Franz Liszt [1811 - 1886]" Obviously no last.fm response when I select it within the "More Tags" menu. Is there a way to trick  the last.fm query sending only "Franz Liszt"?
Thank you
Title: Re: Biography Discussion
Post by: Sergey77 on 2021-05-10 10:32:42
Hi there!
@eamatag71,
from my side the following worked:
In the biography.ini file of the Bio script settings, which is called by the right mouse button from the context menu "Sources / Server Settings... / Configure...", change the line:
Code: [Select]
[NAMES]
%BIO_ARTIST%=$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))
to the next view:
Code: [Select]
[NAMES]
%BIO_ARTIST%=$if($left(%artist%,11),$left(%artist%,11),$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0)))
Perhaps there is probably a more elegant way.

@WilB , сould you consider the possibility of increasing the sensitivity of recognition of song artists in the new version of the script (especially important for Internet radio streams).
Alternatively, the ability to manually edit the title in the script panel.
Title: Re: Biography Discussion
Post by: eamatag71 on 2021-05-12 20:45:20
Sorry...it doesn't work
Title: Re: Biography Discussion
Post by: WilB on 2021-05-13 16:46:33
@Sergey77
Both biography & yttm support title formatting for both artist & title already (former in ini and latter in panel properties), e.g.
Code: [Select]
Test title: madonna-music
artist titleformat
$if2(%artist%,$puts(-,$strstr(%title%,'-'))$cut(%title%,$sub($get(-),1))) gives madonna

title titleformat
$puts(-,$strstr(%title%,'-'))$if($get(-),$puts(l,$len(%title%))$right(%title%,$sub($get(l),$get(-)))) gives music

Next versions have title format preview for both biography & yttm so these things will be easier [title format strings tested on those versions].

@eamatag71 While you can do what you want with the main artist, tags on the more  tags menu are displayed as is. It's always best to keep tags clean for web look-ups.
Title: Re: Biography Discussion
Post by: Sergey77 on 2021-05-15 13:15:20
@WilB
Since the title contains a non-displayable special character, the proposed option will not affect for this radio stream: http://broadcast.infomaniak.ch/energylove-high.mp3
I have modified these lines a bit:
Code: [Select]
artist titleformat
$if2(%artist%,$puts(-,$strstr($ansi(%title%),'?'))$cut(%title%,$sub($get(-),1)))

title titleformat
$puts(-,$strstr($ansi(%title%),'?'))$if($get(-),$puts(l,$len(%title%))$right(%title%,$sub($get(l),$get(-))))
Title: Re: Biography Discussion
Post by: WilB on 2021-05-18 17:25:56
New Version: Biography

v1.2.0-Beta.1 (https://hydrogenaud.io/index.php?topic=112913.msg997851#new)

(https://i.imgur.com/YXlYZSX.png)

Updated features list
- downloads and displays artist photos, biographies and reviews from last.fm and allmusic
- main artist, similar artists, contributing artists, performers and composers etc
- main album and top albums
- history
- layout presets: top, left, right, bottom and overlay. Fully customizable with freestyle layouts
- themes: user interface, dark, blend and light
- custom colours and fonts
- filmstrip: top, left, right, bottom or hidden
- image+text, image only or text only
- drag resizing of image and filmstrip (press Ctrl while panel has focus)
- custom title format for field remapping and save locations
- and more...

Changelog v1.2.0

Added
- New options dialog
- Filmstrip
   - Supports circular as well as normal images
   - Click filmstrip to load main image
   - Middle click filmstrip to ensure main image visible in filmstrip
   - Enable/disable: menu > display
- Image size filter
   - Configurable
   - Can be used to exclude large images or small images or those below a certain pixel size
   - Enable/configure: options > image
- Ability to expand lists
   - Enable/disable: options > display
- Extra tagger options
   - Notify tags of current track to other Spider Monkey Panels
   - Add ability to write last.fm listeners (artist & album)
   - View by listeners: example patterns for library viewers:

Library tree:
Code: [Select]
$nodisplay{$sub(999999999,$replace([%Artist Listeners Last.fm%],',',,.,, ,)) - %artist%}[%Artist Listeners Last.fm% - ]%artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Album list:
Code: [Select]
[$replace(%Artist Listeners Last.fm%,',',,.,, ,) - ] %artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Other enhancements and fixes
- Blend theme: optimized default
- Cover cycler: now fully supports embedded images
- Cover cycler: can select on menu which cover sources to cycle
- Look up button can now either be top left or in heading
- Photo download: improved accessibility to settings (options > photo)
- Refactored code
- Save: reviews and biographies can now all be saved in the same folder
- Sleep time: optimized time between consecutive internet calls
- Smooth scroll: enhanced smoothness when using scrollbar
- Tagger: fixed rare handling issue with certain exotic characters
- UNC paths: sorted handling
Title: Re: Biography Discussion
Post by: paregistrase on 2021-05-18 18:07:35
Hi WilB.

With the previous version you told one trick to disable the copy and paste funtion that give an error in wine.

In this new version give me a similar error when right click in menu.js so i find a similar line and comment it out

Code: [Select]
line 1029
/*this.docTxt = doc.parentWindow.clipboardData.getData('text');*/

With that i can right click without crashing the pannel.

But when i try options... a new crash popup with this error

Code: [Select]
Error: Spider Monkey Panel v1.4.1 ({0F783C2D-4D2B-4069-9773-5DAE4691A095}: Biography v1.2.0-Beta.1 by WilB)
ShowHtmlDialog failed:
DoModal failed: -1

File: popupbox.js
Line: 44, Column: 9
Stack trace:
  config@popupbox.js:44:9
  open@settings.js:226:12
  func@menu.js:646:11
  run@menu.js:106:3
  load@menu.js:69:8
  rbtn_up@menu.js:1045:8
  on_mouse_rbtn_up@callbacks.js:232:6

Is there a way to avoid this?

Other thing that i found.

I have my music in a folder named "Música" and inside this folder another named "atist_art" when I download the artist images of discogs.

I used this folder in the old bio to display artist images (the pannel doesn't download images in wine).

When I update to the new versión i can't use "Música". It is changed to "M(some weird characters)sica"

Is posible to continue using this folder or i must change the path?

The update look nice with the new features  ;)
Title: Re: Biography Discussion
Post by: regor on 2021-05-18 18:13:17
- Extra tagger options
   - Notify tags of current track to other Spider Monkey Panels
   - Add ability to write last.fm listeners (artist & album)
   - View by listeners: example patterns for library viewers:

Great! Will take a look at it, adding a mod will not be a requisite anymore for the map. Looking forward to expand integration with other scripts if it can access all tags.
Thanks :)
Title: Re: Biography Discussion
Post by: TheQwertiest on 2021-05-18 22:54:44
Quote
2) Try using the development build of spider monkey panel which has the required bug fix.
Okay, okay, no need to be so pushy! I will try to reserve some time for the release with the fixes... >_<

PS: Since it's the internet and intonations don't travel that well in here, I have to clarify that it was a (mostly self-deprecating) joke...
Title: Re: Biography Discussion
Post by: WilB on 2021-05-20 16:23:49
@paregistrase

ShowHtmlDialog is a standard Spider Monkey Panel utils function.  I don't think I have much control over it. According to the docs :
    Displays an html dialog, rendered by IE engine.
    Utilizes the latest non-Edge IE that you have on your system.
May be TheQwertiest can help with your wine issue.

Options is avoidable since most common settings are on the menu. Other settings are still accessible through panel properties (panel settings) or biography.cfg (server settings [all panel]). Although biography.cfg isn't designed to be user edited, it can be opened in a text editor & carefully changed.

Música seems to be an odd exotic character handling issue. Essentially the combination of saving with .cfg extension and saving without BOM seems to result in utils.ReadTextFile garbling the character. If BOM is used or the extension is .txt (or .json) then it works fine.

Maybe this needs an adjustment within Spider Monkey Panel. However, it can be worked around.

If you're inclined you can change the following.

Code: [Select]
$.save(this.bio, JSON.stringify($.sortKeys(this.cfg), null, 3), false);
to
$.save(this.bio, JSON.stringify($.sortKeys(this.cfg), null, 3), true);

There are two instances in the settings file:
lines 144 & 414.
This will set BOM to true.
You may need to re-enter Música in biography.cfg to remove the garbled version.

I'll add a fix to the next version if it isn't changed within Spider Monkey Panel.

Test code that demonstrates the issue:
Code: [Select]
"use strict";

    const fso = new ActiveXObject('Scripting.FileSystemObject');

function save(fn, text, bom) {
try {
utils.WriteTextFile(fn, text, bom)
} catch (e) {
console.log('error saving: ' + fn);
}
}

    function file(f) {
return fso.FileExists(f);
}

function open(f) {
return file(f) ? utils.ReadTextFile(f) : '';
}

    const bio = 'Música';
 
    console.log('TEXT: ', bio);
    console.log('Save file using utils.WriteTextFile. Save with or without BOM and with different extensions. Then use utils.ReadTextFile to read the file.');
    console.log('RESULT: the combination of extension being cfg & and saving without BOM causes bad handling');

    save('z:\\testBio.cfg', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.cfg; READ TEXT: ', open('z:\\testBio.cfg'));
  
    save('z:\\testBio.cfg', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.cfg; READ TEXT: ', open('z:\\testBio.cfg'));
  
    save('z:\\testBio.txt', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.txt; READ TEXT: ', open('z:\\testBio.txt'));
  
    save('z:\\testBio.txt', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.txt; READ TEXT: ', open('z:\\testBio.txt'));
  
    save('z:\\testBio.json', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.json; READ TEXT: ', open('z:\\testBio.json'));

    save('z:\\testBio.json', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.json; READ TEXT: ', open('z:\\testBio.json'));
Title: Re: Biography Discussion
Post by: paregistrase on 2021-05-20 17:56:33
ShowHtmlDialog is a standard Spider Monkey Panel utils function.  I don't think I have much control over it. According to the docs :
    Displays an html dialog, rendered by IE engine.
    Utilizes the latest non-Edge IE that you have on your system.
May be TheQwertiest can help with your wine issue.

Thats explain why its crash. I tried with a 32 prefix and ie8 winetricks verbs and i managed to open the new option window, but unfortunately with this configuration the pannels doesn't download any data.

I will ask TheQuertiest but I'm afraid that this is a wine limitation

Options is avoidable since most common settings are on the menu. Other settings are still accessible through panel properties (panel settings) or biography.cfg (server settings [all panel]). Although biography.cfg isn't designed to be user edited, it can be opened in a text editor & carefully changed.

I will stick with this option or used a 32 prefix to configure and then used my normal setup.

Música seems to be an odd exotic character handling issue. Essentially the combination of saving with .cfg extension and saving without BOM seems to result in utils.ReadTextFile garbling the character. If BOM is used or the extension is .txt (or .json) then it works fine.

Maybe this needs an adjustment within Spider Monkey Panel. However, it can be worked around.

If you're inclined you can change the following.

Code: [Select]
$.save(this.bio, JSON.stringify($.sortKeys(this.cfg), null, 3), false);
to
$.save(this.bio, JSON.stringify($.sortKeys(this.cfg), null, 3), true);

There are two instances in the settings file:
lines 144 & 414.
This will set BOM to true.
You may need to re-enter Música in biography.cfg to remove the garbled version.

I'll add a fix to the next version if it isn't changed within Spider Monkey Panel.

Test code that demonstrates the issue:
Code: [Select]
"use strict";

    const fso = new ActiveXObject('Scripting.FileSystemObject');

function save(fn, text, bom) {
try {
utils.WriteTextFile(fn, text, bom)
} catch (e) {
console.log('error saving: ' + fn);
}
}

    function file(f) {
return fso.FileExists(f);
}

function open(f) {
return file(f) ? utils.ReadTextFile(f) : '';
}

    const bio = 'Música';
 
    console.log('TEXT: ', bio);
    console.log('Save file using utils.WriteTextFile. Save with or without BOM and with different extensions. Then use utils.ReadTextFile to read the file.');
    console.log('RESULT: the combination of extension being cfg & and saving without BOM causes bad handling');

    save('z:\\testBio.cfg', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.cfg; READ TEXT: ', open('z:\\testBio.cfg'));
  
    save('z:\\testBio.cfg', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.cfg; READ TEXT: ', open('z:\\testBio.cfg'));
  
    save('z:\\testBio.txt', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.txt; READ TEXT: ', open('z:\\testBio.txt'));
  
    save('z:\\testBio.txt', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.txt; READ TEXT: ', open('z:\\testBio.txt'));
  
    save('z:\\testBio.json', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.json; READ TEXT: ', open('z:\\testBio.json'));

    save('z:\\testBio.json', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.json; READ TEXT: ', open('z:\\testBio.json'));

I tried this and in the biography.cfg "Música" doesn't change now but the pannel continues creating a "Música" folder.

I tried with the fix version when you released it.

Thanks
Title: Re: Biography Discussion
Post by: Koshingg on 2021-05-21 05:02:44
Hi @WilB . I'm using your scripts, thanks for your work.
Is it possible to add Lastfmtoptags to your Biography script ? I'm talking about this script  https://hydrogenaud.io/index.php?topic=109848.msg904750#msg904750 that can add this tag to the files (it's a wsh panel script ) . Using your script it's possible to add tags from LastFm and allmusic, so I thought this will be a nice addition to this script.
Title: Re: Biography Discussion
Post by: kgena_ua on 2021-05-22 19:22:58
Quote
New Version: Biography
v1.2.0-Beta.1
The settings menu is just great. cool.
It's a pity that I'm not a programmer and I don't know how to do this.
Title: Re: Biography Discussion
Post by: MaFred on 2021-05-24 17:41:25
Hi @WilB, great work, 1.2.0-Beta is super! Thank you!
Title: Re: Biography Discussion
Post by: michaengfrv on 2021-05-27 14:38:29
I have a problem v1.2.0-Beta.1
I can't delete the folder of selected album that seeing the biography or cover.
Title: Re: Biography Discussion
Post by: WilB on 2021-05-28 11:22:23
@MaFred & @kgena_ua
Thanks! :)

@Koshingg
Biography provides Lastfmtoptags, referred to as genres. They're available for artist & album.

@michaengfrv
This seems to be down to how the SMP image functions work that load by path. They don't seem to release the folder after the image is loaded. I've tried LoadImageAsync, LoadImageAsyncV2 & gdi.Image and have seen the issue with all three. I'm not sure if this is fixabe in SMP. In the meantime, changing to a track that's not using the image should release the folder quickly and you'll be able to delete it; reload the panel if there's still an issue.

Main album covers are loaded by GetAlbumArtAsync from patterns in file\preferences\display\albumart. That function should allow deleting the folder after the image is loaded; it works here. Ensure the filmstrip isn't using the image, as that loads using LoadImageAsync, and that foobar2000 isn't playing music from the folder to be deleted. You can set filmstrip to show only if > 1 thumbnail (options > image).
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-05-28 18:50:19
Where should I register the paths from INI file

[SAVE]
Album Review [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))
Album Review [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))
Biography [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Allmusic,%profile%\yttm\biography\allmusic\$lower($cut(%BIO_ARTIST%,1)))
Biography [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\biography\lastfm\$lower($cut(%BIO_ARTIST%,1)))
Image [Artist] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Image [Review] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images,%profile%\yttm\rev_img\$lower($cut(%BIO_ALBUMARTIST%,1))\%BIO_ALBUMARTIST%)
Title: Re: Biography Discussion
Post by: WilB on 2021-05-31 12:54:34
They should be read in automatically on updating to the new version.

If not, or it's a new install, go to the right click menu > options > Server Settings (All Panels) Tab > Download Tab
Paste them in the respective positions therein.
Note that you have to paste only the part of the string after the equal sign, starting at $puts.
e.g. for last.fm biography paste:

Code: [Select]
$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\biography\lastfm\$lower($cut(%BIO_ARTIST%,1)))
Title: Re: Biography Discussion
Post by: zoumbro on 2021-06-01 11:47:24
Hi, I am following the installation istructions but I am receiving this error message.

create_directories: Access is denied.: "C:\Program Files (x86)\foobar2000\foo_spider_monkey_panel\tmp\unpacked_package"
Title: Re: Biography Discussion
Post by: WilB on 2021-06-01 12:00:17
Please see the troubleshooting guide in the spoiler (https://hydrogenaud.io/index.php?topic=112913.msg997851#msg997851) for standard foobar2000 installs.
Title: Re: Biography Discussion
Post by: Air KEN on 2021-06-01 12:19:32
@zoumbro
"C:\Program Files (x86)\foobar2000\foobar2000.exe" Right-click Run as administrator.
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-06-01 12:26:46
@WilB

Tell me how to correct the code so that the reviews are saved not in the artist folder, but in the album folder, while taking into account the fact that sometimes albums have 2 disks, while you need to save them not in the CD1 folder but in the folder above, in the album folder

$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Info Album\Album Review\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))
Title: Re: Biography Discussion
Post by: zoumbro on 2021-06-01 13:04:29
It works as administrator, thanks
Title: Re: Biography Discussion
Post by: WilB on 2021-06-01 13:09:45
@Mrakobes
You can try:
Code: [Select]
$puts(s,'\'$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Info Album\Album Review\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))
Title: Re: Biography Discussion
Post by: kode54 on 2021-06-02 01:40:58
Why are you instructing people to install the component in the player install directory if it's a standard install? Why are you instructing users to run the player with administrator access?
Title: Re: Biography Discussion
Post by: mjm716 on 2021-06-02 05:14:52
Thanks for the update Wilb - it's a lot to process, esp. the new prefs, but it feels like a good step forward.

FYI, Before testing I exported my 1.13 settings and reimported them into the beta panel however:
my bio.ini settings did not correctly import to any of the "Server Settings (All Panels)" prefs.

-I really appreciate the new Missing Data check; would it be possible to add a filter to include/ignore "Various Artists" (particularly useful for bios)?
Or can someone recommend a way to remove "various artists" from playlist results?

-It would also be nice to have an option to delete images (maybe at ctrl-pref level of the blacklist option)

-What is the purpose of behaviour prefs>Extra Menu Items? I've tried hiding/showing all but can't discern a difference?
Title: Re: Biography Discussion
Post by: WilB on 2021-06-02 16:23:44
@mjm716
Thanks for the feedback.

1) I have fixed an issue for the next version with importing old ini settings during updating sometimes not working. It should also allow a one-time import of old ini settings by using: reset all server settings [options > Server Settings (All Panels)], where v1.2.0-Beta.1 was used for the initial update, if required.
2) Bios use the %BIO_ARTIST% definition (not %BIO_ALBUMARTIST%). Artist field isn't normally used for Various Artists. However, if they're various artists in the artist field, the standard playlist search can filter them out, e.g. NOT artist IS Various Artists.
3) I'll think about it.
4) Extra menu items. I've fixed an issue with 'Paste' not showing; others items seemed to be fine.

@kode54
I never instructed anyone to run the player with administrator access, that was @Air KEN  (I'm sure with the best of intention), and it isn't necessary.

Biography is installed in the profile location.

However, there is a bug with the spider monkey panel package installer with standard foobar2000 installations (https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/134#issuecomment-843373395), which is outside my control. The bug causes spider monkey panel to try and create a tmp folder in the player location which can then cause the biography package (or any package) install to fail. The correct and easy way of overcoming this issue is in the spoiler link (https://hydrogenaud.io/index.php?topic=112913.msg997851#msg997851) I posted above: it DOESN'T require running the player with administrator access. Instead, it just uses a simple manual install of the package to the profile location with standard foobar2000 installations. Once installed like that it works fine.
Title: Re: Biography Discussion
Post by: kode54 on 2021-06-02 23:01:09
Sounds like the plugin itself has a bug with that process, then. Maybe that can be fixed upstream.
Title: Re: Biography Discussion
Post by: WilB on 2021-06-04 11:42:40
New version: Biography v1.2.0-Beta.2 (https://hydrogenaud.io/index.php?topic=112913.msg998660#new)

Changelog

Fixed
- Various draw issues
- Old ini file settings sometimes not being imported
- Some issues with options
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2021-06-06 08:18:16
@WilB I'm using the latest version which is great, thanks.

Can I change the album art file name to folder.jpg? Currently it uses folder.png.
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-06-07 18:30:40
@WilB After updating to 2 beta, my player crash, I restored the portable build 2 times and still

Crash location:
Module: foo_spider_monkey_panel
Offset: 466A3h

Spoiler (click to show/hide)
Title: Re: Biography Discussion
Post by: regor on 2021-06-07 22:11:48
While working on the interaction with the world map script noticed the updated config part seems to be broken.
As far as I have seen (since I can not open the settings window without IE...) I have to set this config to true to get the tags.
Code: [Select]
		['Notify Tags: Current Track', false, 'boolean', h, 'notifyTags'],

With this
Code: [Select]
window.NotifyOthers('bio_newCfg', {notifyTags: true});


But...
callbacks.js
Code: [Select]
		case 'bio_newCfg':
cfg.updateCfg($.jsonParse(info, {})); //?? JSON.parse(JSON.stringify(info))
break;

settings.js
Code: [Select]
	updateCfg(new_cfg) {
for (const key of Object.keys(this.cfg)) { // Why are you iterating over this instead of the new config?
cfg[key] = this.cfg[key] = new_cfg[key + '_internal'].value; // undefined crash
}
this.parse();
}

There is another thing "missing" which I added in the previous release overwriting your 'on_notify_data' callback, a way to retrieve the current properties of the panel and to set them (to get the selection mode and synchronize it).

Code: [Select]
function on_notify_data(name, info) {
if (name === 'World Map' + ' notifySelectionProperty') {
ppt.focus = info; p.changed(); t.on_playback_new_track(); img.on_playback_new_track();
}

Code: [Select]
	t.draw = function() {
tag.notifyCountry(s.handle(ppt.focus)); // tags
window.NotifyOthers(window.Name + ' notifySelectionProperty', {property: 'focus', val: ppt.focus}); // selection property
return old_t_draw.apply(old_t_draw, arguments);
}

I simply did it for the selection ppt, but obviously it could be done in general. Following your new file structure:

callbacks.js
Code: [Select]
	switch (name) {
case 'bio_setPpt':
clone = JSON.parse(JSON.stringify(info));
for (const key of Object.keys(clone)) {
if (ppt.hasOwnProperty(key) && ppt[key] !== clone [key]) {
ppt[key] = clone [key];
... // I did it for the ppt.focus only since changing some ppts required additional checks on prev. releases
}
}
break;

And somewhere, when sharing tags too:

text.js
Code: [Select]
		this.currentTrackTags = $.debounce(() => {
const handle = $.handle(ppt.focus);
if (handle) tag.write(new FbMetadbHandleList([handle]), true);
}, 2000, {
'leading': true,
'trailing': true
});
window.NotifyOthers('bio_ppt', ppt); // This

Do you plan to add something like that (or just sharing/setting the focus mode)? Or should I simply inject my mod file as I did with the previous release?

EDIT: just seen tagger.js contains selectionMode (along the tags and handle) on window.NotifyOthers('biographyTags'), which covers the get ppt part but there is no way to set the selectionMode which would be missing piece to synchronize it with other panels.
Title: Re: Biography Discussion
Post by: regor on 2021-06-08 10:36:56
That's the missing piece to synchronize the focus mode in 1.2.X. (without caring about other ppts)
Code: [Select]
function on_notify_data(name, info) {
switch (name) {
case 'bio_focusPpt':
if (ppt.focus !== info) { // info -> true/false
  // Mimics setsDisplay()
ppt.toggle('focus');
panel.changed();
txt.on_playback_new_track();
img.on_playback_new_track();
}
break;
}
Title: Re: Biography Discussion
Post by: WilB on 2021-06-12 22:44:34
@regor

I'll add that in reply #654 (^) for the next version.
Yes, the user has to enable notify tags by ticking the checkbox in options > server settings... > tagger.

@Black_Over_Bills_Mothers

I don't really understand where you mean?
Any last.fm covers saved automatically use the last.fm image extension. Photos use jpg, as the source list doesn't have the image type.
You can always use a wild card in file\preferences\display\album art... patterns, e.g. folder.*

@Mrakobes

The crash is in Spider Monkey Panel itself, and not an obvious biography issue. Last event seems to be GetSystemMetricsForDpi. Code for reading dpi hasn't changed for ages (it's same as in v1.1.3). Does Beta.1 still work on the same foobar2000 install? - it's possible some other change has exposed an instability within Spider Monkey Panel. I also note you're using some other components that can be problematical. Do you see the issue on a clean foobar2000 install with just Spider Monkey Panel & standard components.

You could try posting the full crash dump in the Spider Monkey thread to see if @TheQwertiest can see anything.
Title: Re: Biography Discussion
Post by: Sergey77 on 2021-06-13 06:29:04
^
Hi there.
A few days ago, the same crash started to occur when starting the player.
Here's a fragment:
Spoiler (click to show/hide)
Only reinstalling the foo_spider_monkey_panel and reinstalling all of its panels solved the problem.
Title: Re: Biography Discussion
Post by: regor on 2021-06-15 18:27:56
@regor

I'll add that in reply #654 (^) for the next version.
Yes, the user has to enable notify tags by ticking the checkbox in options > server settings... > tagger.
Thanks! Just released the world map with the same change too via a mod, so once you release the new version it will work out of the box without mods.
 
Code: [Select]
Yes, the user has to enable notify tags by ticking the checkbox in options > server settings... > tagger.
There is a problem with that though. Non IE users can not open the new config menu (like me). Just fyi. I have simply added some lines of code to automatically edit your biography.cfg file and set notifyTags to true when enabling integration.

Now time to code some additional panels which may use all those shared tags
Title: Re: Biography Discussion
Post by: WilB on 2021-06-16 16:48:55
@Mrakobes
RE: Spider Monkey panel crash. @Sergey77  actually did more debugging than he let on (https://hydrogenaud.io/index.php?topic=112914.msg999132#msg999132) and sent me a pm. Essentially the crash continued after removing the bio Beta.2 folder, and so appears unrelated to biography. After resetting the layout all has been OK for him so far with biography installed. He did send the crash dump to @TheQwertiest , so may be the real cause can be elucidated.

@regor  Well for occasional users who don't have internet explorer, biography.cfg can be opened with a text editor &  "notifyTags" set to true which isn't a lot different to when ini file was used, But I guess your way is simpler for the user, and so that's OK.

Internet explorer is a requirement for web look-ups as well the html dialog: I'm actually surprised the web look-ups are all working in the absence of internet explorer given the previous wine discussion in biography uploads and elsewhere.

@paregistrase beta.2 does have the BOM set to true for biography.cfg as we discussed, to see if it helps with your exotic character issue in wine. I forgot to mention it.

It will only get written when biography.cfg is resaved (e.g. toggle one of the write tags - presence can be confirmed in notepad++ or other text editor). Character garbling can be due to wrong codepage, and perhaps there is a wine issue here. So if issue persists it's possible to force a codepage (rather than rely on auto-detection). You only need to alter one instance: helpers line 204 change: utils.ReadTextFile(f) to utils.ReadTextFile(f, 65001). 65001 is utf-8. biography.cfg is written with UTF8 encoding, so that may be the one, but component has a list in docs.
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-16 17:40:29
@regor  Well for occasional users who don't have internet explorer, biography.cfg can be opened with a text editor &  "notifyTags" set to true which isn't a lot different to when ini file was used, But I guess your way is simpler for the user, and so that's OK.

Internet explorer is a requirement for web look-ups as well the html dialog: I'm actually surprised the web look-ups are all working in the absence of internet explorer given the previous wine discussion in biography uploads and elsewhere.
Did he managed to download images and allmusic data without ie?

@paregistrase beta.2 does have the BOM set to true for biography.cfg as we discussed, to see if it helps with your exotic character issue in wine. I forgot to mention it.

It will only get written when biography.cfg is resaved (e.g. toggle one of the write tags - presence can be confirmed in notepad++ or other text editor). Character garbling can be due to wrong codepage, and perhaps there is a wine issue here. So if issue persists it's possible to force a codepage (rather than rely on auto-detection). You only need to alter one instance: helpers line 204 change: utils.ReadTextFile(f) to utils.ReadTextFile(f, 65001). 65001 is utf-8. biography.cfg is written with UTF8 encoding, so that may be the one, but component has a list in docs.

With this update is working well. No more strange characters.  8)

Title: Re: Biography Discussion
Post by: regor on 2021-06-17 15:44:30
@regor  Well for occasional users who don't have internet explorer, biography.cfg can be opened with a text editor &  "notifyTags" set to true which isn't a lot different to when ini file was used, But I guess your way is simpler for the user, and so that's OK.

Internet explorer is a requirement for web look-ups as well the html dialog: I'm actually surprised the web look-ups are all working in the absence of internet explorer given the previous wine discussion in biography uploads and elsewhere.
I use windows, but no IE. Sure wine adds other variables to the equation.
The entire panel works fine but the config menu. See this gif:
X

Find & Play is the same. Web look-ups work fine. The config menu is broken.
X
Title: Re: Biography Discussion
Post by: WilB on 2021-06-17 16:17:53
Spider Monkey Panel: To do; next releases (https://github.com/TheQwertiest/foo_spider_monkey_panel/projects/1)

ShowHtmlDialog v2:

 support for multiple engines.
 Chromium Edge support: https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/win32
 support for custom ico.
 modeless.
Added by TheQwertiest

Hopefully that will help users who use windows and choose not to install internet explorer or those who use WINE. In the meantime there isn't much difference between the previous method of editing biography.ini vs editing biography.cfg in a text editor if you can't open it by the provided means. Regarding Find & Play. With its predecessor, settings not on menu were all in panel properties. Now such settings are available through an HTML dialog as well as being in panel properties.
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-17 17:12:37
Spider Monkey Panel: To do; next releases (https://github.com/TheQwertiest/foo_spider_monkey_panel/projects/1)

ShowHtmlDialog v2:

 support for multiple engines.
 Chromium Edge support: https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/win32
 support for custom ico.
 modeless.
Added by TheQwertiest

Hopefully that will help for users of WINE. In the meantime there isn't much difference between the previous method of editing biography.ini vs editing biography.cfg in a text editor if you can't open it by the provided means. Regarding Find & Play. With its predecessor, settings not on menu were all in panel properties. Now such settings are available through an HTML dialog as well as being in panel properties.

Great news.

Will this help with the image download too?



Title: Re: Biography Discussion
Post by: mjm716 on 2021-06-19 08:35:23
RE: image downloading

I tested this with a new Bio panel (beta 2) and by removing a previous artist folder which had 6 images downloaded by older Bio panel.

I have intial download set to 20/ auto add checked/ limit per artist: 0

It creates a new artist folder but only downloads 1 image. (?)

I've also tried deleting update.txt and force server update for other artists, but it does not seem to download additional images either.

No console messages appear.

Title: Re: Biography Discussion
Post by: WilB on 2021-06-19 12:17:30
It all seems to be working here.

a) May be it was a temporary issue at the last.fm end.
b) Ensure you haven't disabled auto-download for last.fm photos (download tab), the save folder setting is OK & drive isn't full.
c) Ensure you haven't blacklisted the images, as that blocks downloading of the specific blacklisted images.

If the issue persists:

1) Can you view images in internet explorer at last.fm at the URL below?
https://www.last.fm/music/Madonna/+images
Artist can be changed to the problematical one.

2) Try force update on the artist that yields one image

3) Note that force update won't increase the number of images if there aren't any new popular ones in top 5.

4) Try at default settings by using 'Reset all server settings' (original should be backed up) as this will exclude lot of possibilities

5) If the problematical artist still yields one image, give me the name, and I'll take a look.
Title: Re: Biography Discussion
Post by: mjm716 on 2021-06-20 07:39:30
It all seems to be working here.

I'm not sure myself - I did have multiple instances of the Bio panel; after updating them all, it seems to work now

Thanks WilB!
Title: Re: Biography Discussion
Post by: mjm716 on 2021-06-21 07:46:12
deleted.
Title: Re: Biography Discussion
Post by: TheQwertiest on 2021-06-22 14:38:34
Hopefully that will help users who use windows and choose not to install internet explorer or those who use WINE.
I'm not sure if it'll help WINE-using folks, since it's still Internet Explorer, just a new one and Chromium-based (and I'm sure it's not a pure Chromium clone).
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-22 15:43:46
Hopefully that will help users who use windows and choose not to install internet explorer or those who use WINE.
I'm not sure if it'll help WINE-using folks, since it's still Internet Explorer, just a new one and Chromium-based (and I'm sure it's not a pure Chromium clone).

Too soon to have a build to test it?

And I saw that you merged the marc2k3's pull requets about playcount stats.

Thanks both of you.

Title: Re: Biography Discussion
Post by: marc2k3 on 2021-06-22 17:22:37
Edge Chromium is available as a native Linux app. A windows application running in WINE cannot interface with that in anyway. Someone would have to be insane enough to try and get the windows version running in WINE. That's very unlikely....
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-22 18:51:01
Edge Chromium is available as a native Linux app. A windows application running in WINE cannot interface with that in anyway. Someone would have to be insane enough to try and get the windows version running in WINE. That's very unlikely....

Maybe I don't understand correctly but we are talking about WebView2 right?

So, what's the connection with a edge browser instaled in the system?

Some kind of WebView2 is already in wine to make work some game instalers and of course you don't need edge chromium instaled, only a implementation in wine to translate this calls to linux calls.

Maybe i miss something
Title: Re: Biography Discussion
Post by: marc2k3 on 2021-06-22 19:09:58
It seems you only need the WebView2 runtimes then?? My mistake. I assume this installs fine for you in WINE?

https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

It's nearly 100MB which is a hefty requirement for fancy dialog boxes. Note @TheQwertiest hasn't even started work on it yet (edit: judging by github activity - no idea what he's doing offline :P)
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-22 19:33:20
It seems you only need the WebView2 runtimes then?? My mistake. I assume this installs fine for you in WINE?

https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

It's nearly 100MB which is a hefty requirement for fancy dialog boxes. Note @TheQwertiest hasn't even started work on it yet (edit: judging by github activity - no idea what he's doing offline :P)

Of course not.

And not avaible to install direct 12 and i can paly direct12 games.

Because wine work is to translate windows api calls to linux world.

That whay I show you that there are already implementations of WebView2 in wine to make online game instaler to work and you don't need to install WebView2 windows runtime to make it work.

Nobody espect that you can install some windows component in wine and it will work at that.

The new implementation will work of not, but it will depends of wine implementation not the instalation of a windows component.

This is what i'm surprised for your response. Nothing in wine works in that way and never will be.

Wine is not an emulator ;)
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-22 19:34:10
It seems you only need the WebView2 runtimes then?? My mistake. I assume this installs fine for you in WINE?

https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

It's nearly 100MB which is a hefty requirement for fancy dialog boxes. Note @TheQwertiest hasn't even started work on it yet (edit: judging by github activity - no idea what he's doing offline :P)

Of course not.

And not avaible to install direct 12 and i can play direct12 games.

Because wine work is to translate windows api calls to linux world.

That why I show you that there are already implementations of WebView2 in wine to make online game instaler to work and you don't need to install WebView2 windows runtime to make it work.

Nobody espect that you can install some windows component in wine and it will work at that.

The new implementation will work of not, but it will depends of wine implementation not the instalation of a windows component.

This is what i'm surprised for your response. Nothing in wine works in that way and never will be.

Wine is not an emulator ;)



Sorry double post
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-22 19:46:58
Only for the LOL

https://imgur.com/a/mNpMgVE (https://imgur.com/a/mNpMgVE)

It install  :))

Another thing is if this is working.

Title: Re: Biography Discussion
Post by: marc2k3 on 2021-06-22 19:52:07
Whoopee.

Back to your previous point about not needing it... why do windows users have to install it but WINE users get a free pass?

Why don't components that require IE work? According to you everything should "just work" because of that WINE magic. Nevemind all those winetricks hacks just to get scripts working. That was all imaginary right? It should all work right out of the box. LOL indeed. :/
Title: Re: Biography Discussion
Post by: regor on 2021-06-22 19:56:15
It seems you only need the WebView2 runtimes then?? My mistake. I assume this installs fine for you in WINE?

https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

It's nearly 100MB which is a hefty requirement for fancy dialog boxes. Note @TheQwertiest hasn't even started work on it yet (edit: judging by github activity - no idea what he's doing offline :P)
Offtopic, but if popup windows were allowed, it would be feasible to draw them as independent SMP panels which could emulate a config window or whatever, the same we are doing with html. It would take a bit of work to create a js framework to draw arbitrary blank config panels, but can be done. Although the same can be done on the main panel with tabs right now.

Personally I prefer that approach instead of relying on ie, and the framework could be shared to be used by other scripts too, the same I shared the menu framework. Having in mind all the years most scripts have been in foobar, we are clearly reinventing the wheel with every new script and update instead of sharing stable js frameworks to work with.
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-22 20:20:55
Whoopee.

Back to your previous point about not needing it... why do windows users have to install it but WINE users get a free pass?

Why don't components that require IE work? According to you everything should "just work" because of that WINE magic. Nevemind all those winetricks hacks just to get scripts working. That was all imaginary right? It should all work right out of the box. LOL indeed. :/

maybe I have not expressed myself correctly but i don't said anything like that.

On the contrary. Things in wine are not the same that if you use windows.

To something works it needs to be implemented in wine, not just install the windows equivalent.

Nothing about magic or free passes, please.

Is only how things work with an abstraction layer. Is not an emulator or a virtual machine, is a abstractin layer.



So not more easy, instead way more difficult.

above all if wue are talking about internal windows components and apis.

That how always was working and I'm using it more than 15 years.

LOL

To play a dirxt12 game i don't install direct12 in wine.

Wine translate the direct12 calls to linux to make it work.

Or use DXVK that translate to vulkan.

If I install direct12 things doesn't work

Is that way.

Nothing about magic.
   

Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-24 22:05:46
Back on topic.

@WilB Is it possible to change the filename of .txt files that save the component?

I will try to explain why.

the bio panel doesn't download any kind of data from allmusic (in my setup with wine) but another script (allmusic_review.js) from the sample folder does.

This script save the result in a filename named "allmusic.%album%" in the folder "profile/js_data/artists/%artist%"

(Not completely sure about if this is exact (no idea of reading script code) but seem to be)

So I thought, in my naivety, that maybe if I point bio to that txt file if will be shown in the panel.

I look at the .cfg and I just saw options to change the folder but not the filename.

So in reality the first question must be if bio will display this data and if it will do it how i could do to make them be in harmony

Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-24 23:44:17
I made a dirty thing but it seem to work.

I can't find the filename in bio but i found the allmusic_review one.

In text.js in samples in line 37.

Code: [Select]
this.filename = _artistFolder(this.artist) + 'allmusic.' + _fbSanitise(this.album) + '.txt';

I change that to

Code: [Select]
this.filename = _artistFolder(this.artist) + this.artist+' - ' + _fbSanitise(this.album) + '.txt'

and now the saved filename is similar to bio's one.

So i change the folder in bio.cfg

Code: [Select]
   "foAmRev": "%profile%\\js_data\\artists\\%artist%",

And the bio panel display the text saved by allmusic_review.  :o

Obviously this must be an aberration for anyone who know how to code and i suppose that I'm going to have problem with fbSanitise part and other things

So I will appreciate a more bulletproof and elegant solution.

Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-25 00:21:46
First  problems  ;D  (things that happen where you don't know what are you doing)

So _fbSanitise is not my enemy, it is my friend, i need it to save things like "Aidan Baker / Leah Buckareff"

and this.artist is %album artist%

So I need to "sanitise" the bio folder too.


And is this function in helpers.js

Code: [Select]
function _fbSanitise(value) {
return value.replace(/[\/\\|:]/g, '-').replace(/\*/g, 'x').replace(/"/g, "''").replace(/[<>]/g, '_').replace(/\?/g, '').replace(/(?! )\s/g, '');

So need to replace

"/\|:" to "-"
"*"  to "x"
" to '
"[<>] to "_"
"(?!)" to nothing

Is this that way?
Title: Re: Biography Discussion
Post by: WilB on 2021-06-25 17:20:10
Biography already sanitizes save folders.
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-25 18:39:48
Biography already sanitizes save folders.

Ah ok, but in this case i'm not using the saves from biography, I use the panel to load the text file saved by allmusic_review.

so my worries are about my custom defined folder in biography.cfg

Code: [Select]
"foAmRev": "%profile%\\js_data\\artists\\%album artist%",

Is this sanitized too?
Title: Re: Biography Discussion
Post by: WilB on 2021-06-25 18:46:58
Yes
Title: Re: Biography Discussion
Post by: paregistrase on 2021-06-25 19:03:10
Yes

cool  8)

Title: Re: Biography Discussion
Post by: Mrakobes on 2021-07-07 18:52:45
@Mrakobes
You can try:
Code: [Select]
$puts(s,'\'$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Info Album\Album Review\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))

don't work(((  unfortunately, it does not save the review to the album folder
Title: Re: Biography Discussion
Post by: Smurth on 2021-07-10 23:13:37
My two cents:
Sort by last modified (newer first)
Code: [Select]
$nodisplay{$sub(9999,$year(%last_modified%))-$sub(12,$month(%last_modified%))-$sub(31,$day_of_month(%last_modified%)) $sub(24,$cut($time(%last_modified%),2)) $sub(60,$substr($time(%last_modified%),4,5))}[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
Title: Re: Biography Discussion
Post by: Smurth on 2021-07-11 09:04:24
My two cents...
Ooops... Wrong topic.
Sorry.
Title: Re: Biography Discussion
Post by: WilB on 2021-07-16 11:12:53
@Mrakobes
If I remember correctly you asked for it to be saved to:
album folder\Info Album\Album Review\Allmusic
I retried the snippet & it's saving to that path here.

Note that if the album name (%BIO_ALBUM%) doesn't match a folder in the path, it will save to the default path.

There is nothing special about the snippet. It's using standard foobar2000 title formatting (except for %profile%, %BIO_ALBUM% & %BIO_ALBUMARTIST%). So alter if required.

It can be easiest to check in Title Formatting Sandbox. For the purpose of that test you'll need to temporarily change %BIO_ALBUM% to %ALBUM%, as former won't be recognized.
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-07-16 13:42:27
@WilB thank you for your support

probably there are problems with the naming of folders containing music files, according to this mask, I do not save them to the album folder

Code: [Select]
$puts(s,'\'$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Info Album\Album Review\Lastfm,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))

my structure looks like this

Powerwolf
               |2021 - Call of the Wild
                                                  |CD1 - Album

I would like it to be stored in "2021 - Call of the Wild" it's possible??
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-07-16 14:14:10
Title format
$meta(date,0) - $meta(album,0) - ?
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-07-16 15:33:52
Another question - I could not configure the display of album cover with lastfm in the panel, only the local file is displayed, I would like to check the cover from my file structure with cover from lastfm

I also want to download the cover of the last fm in the "image" folder

Code: [Select]
$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images\Album Front Cover,%profile%\yttm\lastfm_rev_img\$lower($cut(%BIO_ALBUMARTIST%,1)))

for some reason, this code does not download to the specified folder
Title: Re: Biography Discussion
Post by: WilB on 2021-07-16 16:40:40
Review. Try:
Code: [Select]
$puts(s,- $lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Info Album\Album Review\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))

Cover image is working here as expected from your snippet. Note that it checks for a local or saved cover first & will only download if that's not found.
Title: Re: Biography Discussion
Post by: WilB on 2021-07-25 18:08:10
New Version: Biography v1.2.0 (https://hydrogenaud.io/index.php?topic=112913.msg1001097#new)

Changelog

Added
- ability of third party scripts to set biography display mode
  use window.NotifyOthers('bio_followSelectedTrack', boolean), where boolean is either true [Follow selected track (playlist)] or false [Prefer nowplaying]
- option to disable console messages (options > server settings (all panels) > miscellaneous tab)
- logos if panel is inactive

Changed
- notify tags: now also supports radio streams so artist data can be displayed or used by third party scripts

Fixed
- asynchronous loading issue with multi-biography-panel layouts
- allmusic reviews and biographies should now work in WINE (thanks to @paregistrase for help with debugging)
- occasional items not appearing in menu > open containing folder

Removed
- panel properties & configure from internal menu
    - use right click of biography while pressing the windows key + shift instead
    - works better as also gives access to all package features
Title: Re: Biography Discussion
Post by: paregistrase on 2021-07-25 19:30:13
(https://www.gastroactitud.com/wp-content/uploads/2017/07/131127195819-champagne_para_todos.jpg)

Thanks you very much for your work.
Title: Re: Biography Discussion
Post by: regor on 2021-07-25 20:05:17
Great! That solves the stream missing tags report I got I suppose. Will update the map to use the new method to sync display, thanks :)
Title: Re: Biography Discussion
Post by: kutuzof on 2021-07-26 09:13:18
I do not know if I am writing here, but if there is a folder with a Russian name on the way, then the panel crashes.
Title: Re: Biography Discussion
Post by: regor on 2021-07-26 09:20:19
I do not know if I am writing here, but if there is a folder with a Russian name on the way, then the panel crashes.
Nothing to do with bio, report at smp thread.
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-07-30 14:40:47

Cover image is working here as expected from your snippet. Note that it checks for a local or saved cover first & will only download if that's not found.

Of course, I realized that the script pulls the cover from the local folder, I really want the local file to be displayed in my playlist like everyone else, and in your panel the cover with the lastfm was displayed in parallel, for comparison, and also downloaded to the designated folder
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-07-30 14:51:53
And I also don't understand how to update, I copy with a replacement, but the paths and other settings are not saved, as if a new installation

>>> c:\Portable App\Foobar2000\foo_spider_monkey_panel\packages\{BA9557CE-7B4B-4E0E-9373-99F511E81252}\
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-07-30 14:54:32
How to make a ribbon not with circles but with squares? ffilmstrip
Title: Re: Biography Discussion
Post by: WilB on 2021-07-31 10:58:33
Options > panel settings > image tab

The filmstrip setting you want are top right

Choose auto-fill for square or regular to keep aspect ratio
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-08-03 14:29:27
@WilB    tell me the answer to my questions on the previous page?  Reply #698 Reply #699
Title: Re: Biography Discussion
Post by: WilB on 2021-08-03 18:39:43
Updating a package should be as simple as importing the new biography zip (full instructions are in download location). I've sent you a pm with more info & a response to your other post.
Title: Re: Biography Discussion
Post by: Koshingg on 2021-08-07 00:12:33

   - View by listeners: example patterns for library viewers:

Library tree:
Code: [Select]
$nodisplay{$sub(999999999,$replace([%Artist Listeners Last.fm%],',',,.,, ,)) - %artist%}[%Artist Listeners Last.fm% - ]%artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Album list:
Code: [Select]
[$replace(%Artist Listeners Last.fm%,',',,.,, ,) - ] %artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

For Album list the sorting it's in ascending order. How can we sort in descending order ? For Library tree the sorting is ok
Title: Re: Biography Discussion
Post by: regor on 2021-08-07 09:54:43

   - View by listeners: example patterns for library viewers:

Library tree:
Code: [Select]
$nodisplay{$sub(999999999,$replace([%Artist Listeners Last.fm%],',',,.,, ,)) - %artist%}[%Artist Listeners Last.fm% - ]%artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Album list:
Code: [Select]
[$replace(%Artist Listeners Last.fm%,',',,.,, ,) - ] %artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

For Album list the sorting it's in ascending order. How can we sort in descending order ? For Library tree the sorting is ok
You have to use the $sub(999999999 part. It does 9999... - X, so the greater X values will output lower final values... thus inverting the sort order. Btw you can play with sorting using Playlist Tools since it allows you to input a TF expression, so you can see in real live the changes in a playlist (and then copy back to any other plugin, the library views or into foobar2000 sorting contextual menu).

I may have copied it wrong, but you get the idea...
Code: [Select]
[$sub(999999999,$replace(%Artist Listeners Last.fm%,',',,.,, ,)) - ] %artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

EDIT: note the $nodisplay is a library tree thing. If you sort by a value in other viewers, the value must be shown at the viewer! i.e. the listening count (reversed with 9999...) will be the first value on the previous example.
Title: Re: Biography Discussion
Post by: Koshingg on 2021-08-07 23:08:14
Yes, now it's working,  @regor Thanks for explaining :)
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2021-08-16 18:53:45
@WilB
I'm using your Biography script and intercepting the 'on_notify_data' event to update album and artist related data in my script. I'm using the name = "bio_getText" to refresh this data. Is there any way that I can distinguish between album reviews and artist biography texts being received? Ideally I'd like to test the info field contents to target my refresh operations. Any ideas?
Title: Re: Biography Discussion
Post by: marc2k3 on 2021-08-17 02:39:19
Search the script(s) for instances of window.NotifyOthers. Those will set the name/info that is sent and maybe you can deduce what is happening when each one is triggered and you can customise them.
Title: Re: Biography Discussion
Post by: Black_Over_Bills_Mothers on 2021-08-17 10:50:27
@snotlicker
Thanks for the reply. I'd already considered this approach but I don't like custom solutions - they get lost! Anyways I've done as you suggested and modified WilB's script (web.js - 4 lines). Just hope I remember to re-instate them on the next version. Thanks for the push though.
Title: Re: Biography Discussion
Post by: regor on 2021-08-17 12:46:45
Alternatively you can also add your own code to a new file and just include it on every release.

Callbacks can be wrapped, thus allowing you to add additional lines of code without touching the original one (or you may also replace the original code) (*).
Such example can be found in World-Map-SMP , attached it here for informative purpose.
You would have to remember to re-add the include line of your script into bio, but you can safely reuse it on future releases.
Code: [Select]
include('YOUR_PATH_OUTSIDE_BIO_PACKAGE\biography_mod_1_2_X_xxx.js');

(*) If you are replacing an specific switch case (instead of adding a new one), you may simply add a check and swap the order calling first your own version: (let's say you replace 'bio_XXX' instead of adding 'bio_focusPpt' like the example)
Code: [Select]
if (typeof on_notify_data !== 'undefined') {
const oldFunc = on_notify_data;
on_notify_data = function(name, info) {
onNotifyData(name, info); // Note it has been swapped with original callback position -oldFunc- on the js file example.
if (name === 'bio_XXX') {return;} // Always skips original callback when it's the replaced case
oldFunc(name, info);

}
} else {var on_notify_data = onNotifyData;}

Or you may simply add a cloned modified version of 'bio_getText' and call it 'bio_getText_YOURSUFIX', not needing at all to replace the original one. Then listen for that one in your scripts and done.

This method has the bonus of being easily expandable if you code additional things on the future. And you will never lose your changes by accident, since it's an external file to the package.
Title: Re: Biography Discussion
Post by: Taynt3d on 2021-08-19 00:42:48
This is a bit random and a little off-topic, but I've been searching for a replacement for the SoftPlaylists component for a long time since it's basically broken and unsupported these days.

So, my new idea to replicate some of what SoftPlaylists used to do is to bring "popularity" metadata right into the tags of my files. Then I could sort the playlist viewer using popularity, create smart playlists with it, etc. I've been experimenting with a newish tagging tool (OneTagger), that after suggesting to the developer, can now bring in Spotify's popularity score and tag it to the file's ID3 (lookups based on Artist/Title match), and it's working out great in my initial tests. For example, I can now use the tag score in combo with the Random Pools component to quickly make playlists (or autoplaylists) like "give me the top two rated tracks of each artist in xyz genre." 

Anyway, I'm also a user of SMP/Biography (thanks for this awesome script!), and its display of Last.fm scrobbles for tracks got me thinking if it could be leveraged for the same type of thing. Or if maybe it could be tweaked for use with Playlist Tools (which I don't have much experience with). So, query Last.fm for total scrobbles of a track, then tag it to the MP3 or Flac file using a custom tag ("Popularity") -- in more of a bulk updater kind of way. I wonder how hard it might be to leverage some of this code to do that?

Crazy idea, apologies for semi-off topic rambling...
Title: Re: Biography Discussion
Post by: Koshingg on 2021-08-19 14:17:21
@Taynt3d I think it's a good idea . LastFm Artist listeners and LastFm Album listeners can be added to tags using Biography script , but LastFm listeners for a Track it's not possible until now, to add this data to tags. Hopefully it will be.

BTW , I used OneTagger a few weeks ago (and I tried again now) but I didn't noticed Spotify's popularity score .....How do you add that tag? Didn't noticed that in the settings....
Title: Re: Biography Discussion
Post by: Taynt3d on 2021-08-19 15:38:30
BTW , I used OneTagger a few weeks ago (and I tried again now) but I didn't noticed Spotify's popularity score .....How do you add that tag? Didn't noticed that in the settings....

I had an exchange with one of the developers, and he added it at my request! But not sure if it's in the official builds yet. You should be able to get the build with it added at this link (https://github.com/Marekkon5/onetagger/actions/runs/1133315491) (you need to be logged into GitHub to grab it).
Title: Re: Biography Discussion
Post by: Koshingg on 2021-08-19 16:24:07
@Taynt3d Thanks
Title: Re: Biography Discussion
Post by: Koshingg on 2021-08-19 22:04:25
@regor , it's not working https://hydrogenaud.io/index.php?topic=112914.msg1001568#msg1001568 A few days ago I said it's ok, but it seems that I was wrong. The results are something like this :

 994877484      ( for all the artists) . I tried, but I can't find the error
 ......................
 999901491
Title: Re: Biography Discussion
Post by: regor on 2021-08-19 22:53:45
EDIT: note the $nodisplay is a library tree thing. If you sort by a value in other viewers, the value must be shown at the viewer! i.e. the listening count (reversed with 9999...) will be the first value on the previous example.

Already warned you about that at the bottom. You can't sort without also showing the value used for sorting, unless you are using a non native library viewer with extended TF expressions for sorting or not displaying a value. So you will always have a number at the beginning if using CUI or DUI viewer...
Title: Re: Biography Discussion
Post by: WilB on 2021-08-20 11:32:34
For information Find & Play has a lot of the functionality that was present in foo_softplaylists, if Find & Play is used in one of it's library modes.

Next version of Find & Play should also have on the fly tagging for last.fm track scrobbles & listeners. It's a bit more relevant there than here in bio. I've already tagged mine!
Title: Re: Biography Discussion
Post by: Koshingg on 2021-08-20 18:04:55
@regor sorry, I totally forgot about the last thing you wrote then.

@WilB  "Next version of Find & Play should also have on the fly tagging for last.fm track scrobbles & listeners"

  That's good news. I don't really care if this can be done with the bio script or Find & Play (I use both scripts).
Title: Re: Biography Discussion
Post by: marchetti87 on 2021-09-06 15:58:01
Hi. First of all thanks for the great job. I'm setting up this panel on an old skin and would like to know how I can add the review stars where the arrow points in the image.

Spoiler (click to show/hide)
Title: Re: Biography Discussion
Post by: marchetti87 on 2021-09-06 16:40:59
i already got it.  :)

Spoiler (click to show/hide)

Very good script, keep it up!
Title: Re: Biography Discussion
Post by: mjm716 on 2021-09-10 06:31:30
I have a strange issue per image.

Biography panel displays correctly on play, but changes content while track is playing (no clear pattern of when; maybe on server connection?, but does not appear in console). The header switches to a different release and images default to empty.
Also seems to happen more consistently (every track) when app is in background.

If I reload the panel, display is correct again.
Title: Re: Biography Discussion
Post by: mjm716 on 2021-09-11 12:26:47
maybe on server connection?

This seems to be the case - console does report - when allmusic server request returns not found the display changes.

"Biography Server: allmusic album review: ------: not found"
Title: Re: Biography Discussion
Post by: mjm716 on 2021-09-11 14:48:21
Ok, I've done more debugging on my end with a clean install. I can not reproduce it.

The problem is in my old setup - it seems to be some other conflict.

Sorry for the multiple reports.
 :-[
Title: Re: Biography Discussion
Post by: Koshingg on 2021-09-16 15:51:58
@WilB I have a problem with the script . As you see in the left side in the photos, the circles (filmstrip) become either almost invisible, or a rectangle appears instead of a circle, and finally the third possibility , a combination between the first 2 (almost invisible circles and a rectangle) . I have the latest version  of SMP (1.5.2). If I try to resize (using Ctrl and drag the line) the circles, sometimes the problem disappears, sometimes not

Edit: I forgot to post a pic with the normal situation
Title: Re: Biography Discussion
Post by: WilB on 2021-09-16 18:38:08
Sorry but I can't reproduce, despite trying to mimic want seem to be your settings. I assume you using bio v1.2.0 as there was a possible relevant fix since the betas.

Do you have any insight into how to reproduce? Is the device busy when it happens? If images can't immediately be read from disk, that could delay loading but they should still load after a while.

You could try resetting panel properties (ensure you create a back-up first) and server settings [.yttm\biography.cfg] (should automatically back-up).

If the problem persists, then you could post the problematical panel properties & server settings to see if I can spot anything.
Title: Re: Biography Discussion
Post by: maarroyo on 2021-09-30 22:16:46
Awesome plugin! I'm not sure how I didn't discover it before.

Anyways, I saw a few people request this way back in the thread, but didn't find anything conclusive.

Is it possible to run multiple instances that use different tags for searching (eg. artist, composer, etc)? I'd like to have a tabbed panel with one tab for each working independently.

Thanks!
Title: Re: Biography Discussion
Post by: maarroyo on 2021-10-03 00:21:48
Awesome plugin! I'm not sure how I didn't discover it before.

Anyways, I saw a few people request this way back in the thread, but didn't find anything conclusive.

Is it possible to run multiple instances that use different tags for searching (eg. artist, composer, etc)? I'd like to have a tabbed panel with one tab for each working independently.

Thanks!

Took the initiative and did a simple mod to do this in addition to searching compositions. Not the cleanest, but I've made the code available here: https://github.com/mayanez/WilB-Biography-Mod The package .zip can be downloaded from the releases page.

@WilB I couldn't find a GitHub repo for the project, not sure if you have one. Just a suggestion, posting your code there might make it easier to make contributions :)
Title: Re: Biography Discussion
Post by: WilB on 2021-10-11 11:42:22
Thanks for your helpful contribution, which I have now looked at in detail.

1) I've added the ability to set the server used on a panel specific basis.

2) I've added a 'Classical music mode' in which allmusic is searched by composition instead of album. This didn't require a separate server instance, just the ability to set the composition tag to be used and a context menu item to enable on a per panel basis. It avoids changing %BIO_ALBUM% which broke other functionality.

I wasn't sure about your fuzzy matching method for the composition search. I'm not sure if it was intentional or not, given the extra matching difficulties with compositions, but AFAICT it accepted a match level of .33 (33%) which didn't seem rigorous enough to me. FuzzySet was used to return best match, which needn't be a good one since it was set at .33. That matched title was then passed into the inbuilt utility match checker, which just accepted it as it was in the list.

So I'm inclined to rework that, such that FuzzySet sorts the response, which is then checked in match order by inbuilt utility match checker. It will give a choice over whether or not to include partial matches. If partial matching is on, the fuzzy match minimum would be 80%.

The new features should be in the next version + some more exciting stuff...
Title: Re: Biography Discussion
Post by: maarroyo on 2021-10-13 05:53:45
Glad it’s useful  :))

So the way I integrated the FuzzySet to work with the existing matches was simply to minimize changes in case I had to maintain the fork going forward. Excellent news to hear that it’s going to be “mainlined”! I used the default 0.33 as I wasn’t sure what a good value was. I’d need to log a number of queries to get a better idea. Ideally, the internal matched should get entirely replaced by FuzzySet since it does more than just Levenshtein matching which is lacking for the complexity of composition names.

Additionally, slightly related, I was going to start working on adding Wikidata/Wikipedia as an additional source of data. It helps fill in some of the blanks with allmusic. Not sure if this is something you’ll eventually want to merge as well.

Looking forward to the new version!
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-10-15 19:25:08
Stopped displaying and downloading from the fins.fm photo, I don't understand why, updated to the latest beta
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-10-16 08:18:15
I restarted the player several times and even rebooted the computer until I found the "reload" button in the drop-down menu, it worked
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-10-16 12:31:48
the second time it crashes today when trying to update (((

Spoiler (click to show/hide)

Spider Monkey Panel v1.6.0 ({5A0A6AEC-AF5F-445E-8BC8-1F6340F822F7}: Biography v1.2.0 by WilB): initialized in 15 ms


Machine specifications:
OS: Windows 10.0.19041 x64
CPU: Intel(R) Core(TM) i5-8400T CPU @ 1.70GHz, features: MMX SSE SSE2 SSE3 SSE4.1 SSE4.2
CPU threads: 6
(3- CA CXA80 1.0)
Title: Re: Biography Discussion
Post by: marc2k3 on 2021-10-16 12:43:18
You should not be using SMP v1.6.0.

https://github.com/TheQwertiest/foo_spider_monkey_panel/releases

Quote
!!!
!!! DON'T USE THIS VERSION, USE v1.5.2 INSTEAD !!!
!!!
Title: Re: Biography Discussion
Post by: Mrakobes on 2021-10-17 14:30:11
I couldn't figure out why 1.6 was laid out, but it can't be used. Thanks I reinstalled
Title: Re: Biography Discussion
Post by: kahel on 2021-10-18 18:21:57
First of all, must have add-on for foobar.
Thanks a lot for sharing.

I was planning to upgrade from the 1.1.2 to the latest version... everything was working fine but I had to revert back because I couldn't reproduce a very basic behavior.

I need to be able to choose the image 'disc.jpg' for example and for it to stay fix without 'cycling'...
I thought I found a way by selecting 'cycle above' and only selecting 'disc' but once I restart foobar the image start with 'cover'...weird behavior...so...
I've checked pretty much every options... but couldn't reproduce this basic behavior, like I easily could in the 1.1.2.

Am I missing something? or it is now mandatory to have some kind of cycling... and the function to have a fix image isn't anymore?

Thanks.
Title: Re: Biography Discussion
Post by: mjm716 on 2021-10-19 03:19:26
Am I missing something?

CTRL or right-click the panel > Sources > (in the middle) PHOTO or COVER > cycle (on or off)
Title: Re: Biography Discussion
Post by: kahel on 2021-10-19 16:44:22
Thank you mjm716 for answering... but, unfortunately for me, it's nothing that simple.
I'm using this plugin as my artwork display so I've dealt with a lot of tweaking and quiet familiar with all options of the plugin (1.1.2).

Of course I tried what you suggest here and pretty much every combination of options...

...and it even work to a certain extend... I'm able to only display 'disc'... by selecting 'cycling' above, and check 'disc' while unchecking 'cover' 'back' 'artist...
...but, like I said... the issue is that... once I restart foobar... then, where it should display the 'disc' art... it revert back automatically to 'cover'... if you use the mouse scrolls then you can cycle between 'cover' and 'disc' despite the fact that 'cover' is unchecked and thus should not be displaying at all...

Anyway, weird behavior... probably a scenario that wasn't tested since the 1.2 release or a peculiar issue with my setup... at the very least I'd like someone to try and confirm this behavior...

ALTERNATIVELY... is there an already built-in way to link the 'album view' directly to a folder but 'per album' instead of 'by artist'.
by default we can do it with the built-in artist in 'img_art'... or directly via the classic 'cover' 'back' 'disc' 'artist' from the root folder...
Would be nice to have an option to display what's inside the 'scans' folder directly for example... for each album.

Seems like something that could already be built-in in this plugin... with 'covers: custom paths' But I couldn't figured it out to work... so, if someone know more about that... I'll appreciate the help.

Cheers.

Title: Re: Biography Discussion
Post by: gntlmn on 2021-11-12 11:27:21
@WilB Hello, thanks for providing this great script. I wanted to ask if there is somehow a setting I have missed to NOT display album moods in allmusic reviews. On good days you could say they are ridiculous, on bad days, well...
I am no .js programmer but I think you scrape them into the txt files and then display them out of them, right? If there is no setting for it could you show me where to prevent the display please?

Thanks
Title: Re: Biography Discussion
Post by: kahel on 2021-11-23 01:42:02
So been playing a little more with the latest version...
You're still able to display the 'disc' artwork only... by deselecting everything else... but

The confusion was due to a bug... when you refresh the panel and stay within the same album it revert back to the 'front' artwork...
Only once you change album then it display the correct one.

Which mean everytime you restart Foobar... it start with the wrong artwork until you select another album.
I'll wait to see if it get fix before upgrading since the previous version work well enough.
--------------------------------------

Oh, and... almost forgot... is there a way to keep the image aspect ratio while in the 'auto-fill' mode...?
right now it depend on the panel size relative to the image size...
if they are both close... it will stretch the image to fill to the panel size... which isn't ideal to have stretched image..
only when we pass a certain threshold...the original image is a lot different form the panel size... then the image keeps it's original ratio.
Title: Re: Biography Discussion
Post by: mjm716 on 2021-11-23 03:01:08
The confusion was due to a bug... when you refresh the panel and stay within the same album it revert back to the 'front' artwork...
Only once you change album then it display the correct one.

Do you have more than one Bio Panel in your layout?

I had a similar issue of my panel changing display and only correcting if I reload it or switch tracks:
https://hydrogenaud.io/index.php?topic=112914.msg1002748#msg1002748

I thought it was related to SMP1.6 issues, but it turns out the problem is related to having more than 1 bio panel.

In my particular case with 2 unique bio (review) panels, it seems one review panel pulls data from another review panel when a server call happens after play start.

I was able to fix this issue by installing one panel (new SMP) and then *COPYING* that layout panel into my 2nd location before adjusting customization.
Title: Re: Biography Discussion
Post by: kahel on 2021-11-23 13:57:59
Yes I have more than one panel.

And if I remember correctly I'm pretty sure I simply duplicated the first panel I had by copy paste in 'layout'... so your solution might not work for my situation... but that's

...Good news either way, glad to see you could fix it... I will try from scratch with different method and/or customisation... see if I find out more... maybe it need different customization per panel to work...

Thank you... I have a few things to try out now.
Title: Re: Biography Discussion
Post by: mygen on 2021-12-01 17:53:26
Hi

I have a issue with aritist photo display. Don't show from last.fm. I have fresh install SMP 1.5.2 + Biography 1.2.0.

When i switch on cover it is but photo artist no.

I install fresh many times and not working. Reset to default not working.

Maybe on settings its wrong?

Some idea what should i do?

Thx for replay.
Title: Re: Biography Discussion
Post by: anamorphic on 2021-12-01 18:27:52
^ Last.fm were down earlier with 503 error (service temporarily unavailable) - should be working again now.
Title: Re: Biography Discussion
Post by: aboabo on 2021-12-02 18:56:58
Thanks for your helpful contribution, which I have now looked at in detail.

1) I've added the ability to set the server used on a panel specific basis.

2) I've added a 'Classical music mode' in which allmusic is searched by composition instead of album. This didn't require a separate server instance, just the ability to set the composition tag to be used and a context menu item to enable on a per panel basis. It avoids changing %BIO_ALBUM% which broke other functionality.

I wasn't sure about your fuzzy matching method for the composition search. I'm not sure if it was intentional or not, given the extra matching difficulties with compositions, but AFAICT it accepted a match level of .33 (33%) which didn't seem rigorous enough to me. FuzzySet was used to return best match, which needn't be a good one since it was set at .33. That matched title was then passed into the inbuilt utility match checker, which just accepted it as it was in the list.

So I'm inclined to rework that, such that FuzzySet sorts the response, which is then checked in match order by inbuilt utility match checker. It will give a choice over whether or not to include partial matches. If partial matching is on, the fuzzy match minimum would be 80%.

The new features should be in the next version + some more exciting stuff...
Thanks for your helpful contribution, which I have now looked at in detail.

1) I've added the ability to set the server used on a panel specific basis.

2) I've added a 'Classical music mode' in which allmusic is searched by composition instead of album. This didn't require a separate server instance, just the ability to set the composition tag to be used and a context menu item to enable on a per panel basis. It avoids changing %BIO_ALBUM% which broke other functionality.

I wasn't sure about your fuzzy matching method for the composition search. I'm not sure if it was intentional or not, given the extra matching difficulties with compositions, but AFAICT it accepted a match level of .33 (33%) which didn't seem rigorous enough to me. FuzzySet was used to return best match, which needn't be a good one since it was set at .33. That matched title was then passed into the inbuilt utility match checker, which just accepted it as it was in the list.

So I'm inclined to rework that, such that FuzzySet sorts the response, which is then checked in match order by inbuilt utility match checker. It will give a choice over whether or not to include partial matches. If partial matching is on, the fuzzy match minimum would be 80%.

The new features should be in the next version + some more exciting stuff...
Hi, I'm very happy with the panel, but the switching of the focus between Artist and composer is exactly the missing feature I was looking for too. This version with a Classical mode isn't published yet? I'm using version 1.2.0 but can't find it there. Thanks.
Title: Re: Biography Discussion
Post by: mygen on 2022-01-11 15:54:46
Hi

I have a issue with aritist photo display. Don't show from last.fm. I have fresh install SMP 1.5.2 + Biography 1.2.0.

When i switch on cover it is but photo artist no.

I install fresh many times and not working. Reset to default not working.

Maybe on settings its wrong?

Some idea what should i do?

Thx for replay.

Can someone help resolve this issue?

Hi, I have a problem that foobar doesn't download artist pictures. When I go to the Last.fm website, the photos are there, but the program does not download them.
Descriptions download normally.

I tried on a clean install and the same.
I am currently using Foobar 1.6.8 DarkOne4Mod v1.0 (SMP).

Do you have any ideas what could be wrong or what to check in the settings?

Thx for any help.
Title: Re: Biography Discussion
Post by: marc2k3 on 2022-01-11 16:33:49
Image downloading works on default settings so you shouldn't have to change anything.

2 things I can think of right now....

lack of connectivity to the third party website last.fm uses to host files. Test this link in Internet Explorer (yes really). Using your usual browser is not a valid test.

https://lastfm.freetls.fastly.net/i/u/770x0/20070beb90f84def9ead4336d7c929d4.jpg

If the above works, you might have some issue with some over zealous security software blocking outgoing connections when a background process is spawned calling cscript.exe (windows script host) which is what the script uses to download files.
Title: Re: Biography Discussion
Post by: mygen on 2022-01-11 17:49:11
marc2k3

Thx for replay

I used Microsoft Edge and return this image.

Normaly use Firefox and effect is the same i see picture.

That means it is ok?

Title: Re: Biography Discussion
Post by: StealthX on 2022-01-14 07:55:52
The review for the album im listening to says "Add to custom list" instead of displaying the review, any way to fix this?
Title: Re: Biography Discussion
Post by: mygen on 2022-01-15 14:10:15
Image downloading works on default settings so you shouldn't have to change anything.

2 things I can think of right now....

lack of connectivity to the third party website last.fm uses to host files. Test this link in Internet Explorer (yes really). Using your usual browser is not a valid test.

https://lastfm.freetls.fastly.net/i/u/770x0/20070beb90f84def9ead4336d7c929d4.jpg

If the above works, you might have some issue with some over zealous security software blocking outgoing connections when a background process is spawned calling cscript.exe (windows script host) which is what the script uses to download files.

I check fresh instalation of Foobar on VirtualBox - work perfectly. Full biography and photo.

Someone maybe know what block downloading the picture? I using ESET Internet Security if this can be a problematic.
Someone had a similar problem and could help?

On console i get error:
Error: Image draw failed (h_iml)
This error can be a problem of this? On VirtualBox when i check this error don't occure.
Title: Re: Biography Discussion
Post by: anamorphic on 2022-02-11 15:23:05
Hey there @maarroyo and @WilB :)

Took the initiative and did a simple mod to do this in addition to searching compositions. Not the cleanest, but I've made the code available here: https://github.com/mayanez/WilB-Biography-Mod

Thanks for putting this idea forward. I was hoping to use this mod to have 2+ biography panels to display %artist% photos and %featured% artist photos simultaneously, and it (almost) works great! I can have circular, cycling artist photos for multiple artists on a track at once. (The panels are set to display image only)

X

The problem is, when the $meta(featured,0) (etc) tag is not present, it falls back to displaying the default artist image (set in Preferences > Display). This makes the concept I had not really work. I was rather hoping it would display the "stub" image (from '%profile%\yttm\artist_stub_user.png') for no artist/tag found, for which I can then use a blank image. In short, display the source tag, and if not found, display the not found image / nothing.

Is there a minor tweak I could make to the script(s) to make it work this way? And if not so minor, perhaps can be considered a feature request for the next version?

I did try setting a %bio_artist% TF string such as -

Code: [Select]
$if2($meta(featured,0),_Blank)

And making a folder in my music library for "_Blank\Artist.png" (as for any other artist) but this gets completely ignored. Even though the preview box in panel settings says it resolves to artist called "_Blank".

This is the only script to my knowledge that can do a circular crop of images, which just looks fantastic to me. Alternatively, I'm aware the SMP/JSP 'thumbs.js' sample script already works the way I would like (and probably uses less resources), but without an option for circular crop. I'm not sure, how complex would it be to integrate a basic version of that code into the thumbs sample? Basically a right-click > 'Crop (circular)' like the other crop options it has already. (Just asking here since WilB knows how the code works already)

Thanks in advance for any solutions ;)
Title: Re: Biography Discussion
Post by: anamorphic on 2022-02-13 13:00:23
I did try setting a %bio_artist% TF string such as - $if2($meta(featured,0),_Blank) - And making a folder in my music library for "_Blank\Artist.png"
I found a workaround. I already use foo_dynfil (https://hydrogenaud.io/index.php?topic=86853.0) (Dynamic Fields) and just made a new field STUB=_Blank - then insert %_stub% into the last position of %bio_artist% string. It works!

(Funny thing, it made me laugh when an anime girl appeared, apparently there is an artist called "_Blank" on last.fm :D )

I still think it would be a good idea for the next version, if now per panel source settings, to be able to specify a fallback image (or just allow it in TF text string)

Now I get to keep making this theme. I think this is another great use of this fantastic script. 8)

Cheers
Title: Re: Biography Discussion
Post by: regor on 2022-03-04 16:24:55
Not really a priority, but sometimes the panel crashes when a file is locked:
Code: [Select]
Error: Spider Monkey Panel v1.6.1 ({04DE9307-DD67-4782-894E-6E6DE2768064}: Biography v1.2.0 by WilB)
ReadTextFile failed:
WinAPI error:
  CreateFile failed with error (0x20):
    The process cannot access the file because it is being used by another process.

File: helpers.js
Line: 204, Column: 31
Stack trace:
  open@helpers.js:204:31
  write@tagger.js:189:22
  Text/this.currentTrackTags<@text.js:130:20
  T@helpers.js:78:164
  t@helpers.js:78:519
  notifyTags@text.js:1042:8
  on_playback_new_track@text.js:1047:8
  Panel/this.focusLoad<@panel.js:170:27
  T@helpers.js:78:164
  t@helpers.js:78:519
  on_metadb_changed@callbacks.js:133:8

Not only the file must be checked to exist, but also the read part wrapped in try/catch

Code: [Select]
function _open(file, codePage = 0) {
if (_isFile(file)) {
if (file.startsWith('.\\')) {file = fb.FoobarPath + file.replace('.\\','');}
return tryMethod('ReadTextFile', utils)(file, codePage) || '';  // Bypasses crash on file locked by other process
} else {
return '';
}
}

...

function tryMethod(f, parent) {
    return (...args) => {
        let cache;
        try {cache = parent[f](...args);} catch(e) {}
        return cache;
    }
}
Title: Re: Biography Discussion
Post by: WilB on 2022-05-04 17:59:37
New Version: Biography v1.3.0 (https://github.com/Wil-B/Biography/releases)

Release highlights: Wikipedia + lyrics + flags
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-04 20:29:26
New Version: Biography v1.3.0 (https://github.com/Wil-B/Biography/releases)

Release highlights: Wikipedia + lyrics + flags

Awesome additions.

Only a little glitch. On the album view when the lyrics are shown, there is no indicator

(https://i.imgur.com/O1bRkS9.png)

Edit:

The update copy the old .cfg to the new location but if you remove the old yttm folder in profile in a new startup another one is created with default values instead of read it from the new location
Title: Re: Biography Discussion
Post by: mjm716 on 2022-05-05 07:47:16
New Version: Biography v1.3.0 (https://github.com/Wil-B/Biography/releases)

wow and thanks - great to see this!!
I'm very happy to remove my extra lyrics component.

minor issue:
--if lyric tags contains bracket characters eg. "[00:48.58] lyric blah blah blah" no lyrics appear, only a '.' is displayed.

nice to have:
--default lyric fallback is bio; option to customize? (TF or album review)
--particularly for album reviews: option to 'display all' sources? (current option is only to lock selected source)
--wildcard support for textreader? eg. $directory_path(%path%)\*.txt



Title: Re: Biography Discussion
Post by: marc2k3 on 2022-05-05 11:25:40
Displaying a period in place of large chunks of text in tags has been a thing since fb2k v1.3 was released in 2015 (I think). This is done for performance reasons so the library and playlist caches don't get bloated with masses of text which can seriously slow down performance on large collections.

The foobar2000 SDK provides means for components to get info in full so any proper lyrics component will have it implemented transparently to the end user. SMP does not.

For components without this special support, you can revert to pre-1.3 behaviour by editing LargeFieldsConfig.txt in your profile folder but of course you have to aware of the side effects I mentioned above.
Title: Re: Biography Discussion
Post by: TT on 2022-05-05 11:40:59
Thanks for the new version @WilB,

great work =)

-TT
Title: Re: Biography Discussion
Post by: WilB on 2022-05-05 12:53:38

@paregistrase
- Lyrics: missing indicator in album view. I forgot to add it to the panel properties. It's fixed for the next version. But all you need to do to fix it now is paste 'lyrics' in the textreader & lyrics name box of album view. Or you can directly add it to the panel properties: Text Reader Source 4 Name (& 5 & 6 if you use those slots).

- Folder glitch. I couldn't seem to reproduce. May be certain you still haven't v1.2.0 installed somewhere as that would create it?

@mjm716
Tag lyrics displaying '.' Usually that's an issue with LargeFieldsConfig.txt file. For %LYRICS% or %UNSYNCED LYRICS% to always display properly, you must edit LargeFieldsConfig.txt and comment out or remove those specific entries under "fieldSpam".

--default lyric fallback. If you display them in album view, you'll get the review fallback.

@regor
I'll add the following simple try catch to helpers in the next version, unless you advise it's not suitable for some reason.

Code: [Select]
    open(f) {
try { // handle locked files
return this.file(f) ? utils.ReadTextFile(f) : '';
} catch (e) {
return '';
}
}
Title: Re: Biography Discussion
Post by: mjm716 on 2022-05-06 05:17:28
@mjm716
Tag lyrics displaying '.' Usually that's an issue with LargeFieldsConfig.txt file.

Per Marc & above - my LargeFieldsConfig.txt was already configured below, but I'm oddly still getting '.' for long lyrics.

Code: [Select]
# Size limit for meta fields that appear in the basic fields list
basicMetaMax=2000
# Size limit for meta fields that do not appear in either list
defaultMetaMax=1000
# Size limit for tech info fields
infoMax=200

# List of basic meta fields - essential info such as artist & title
fieldBasic=album
fieldBasic=album artist
fieldBasic=artist
fieldBasic=composer
fieldBasic=conductor
fieldBasic=date
fieldBasic=discnumber
fieldBasic=genre
fieldBasic=keywords
fieldBasic=performer
fieldBasic=producer
fieldBasic=style
fieldBasic=title
fieldBasic=totaldiscs
fieldBasic=totaltracks
fieldBasic=tracknumber
fieldBasic=comment
fieldBasic=DISCOGS_RELEASE_NOTES
fieldBasic=DISCOGS_RELEASE_CREDITS
fieldBasic=DISCOGS_ARTIST_PROFILE
fieldBasic=LYRICS
fieldBasic=UNSYNCED LYRICS

# List of spam meta fields - rarely useful stuff that *never* gets cached
fieldSpam=accurate rip
fieldSpam=aucdtect
fieldSpam=biography
fieldSpam=cuesheet
fieldSpam=eac logfile
fieldSpam=itunes_cddb_1
fieldSpam=itunmovi
fieldSpam=log
fieldSpam=logfile

Also one more minor request - tagger>tag files now has a confirmation window. Option to dismiss would be nice.  :)
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-06 08:26:39

@paregistrase
- Lyrics: missing indicator in album view. I forgot to add it to the panel properties. It's fixed for the next version. But all you need to do to fix it now is paste 'lyrics' in the textreader & lyrics name box of album view. Or you can directly add it to the panel properties: Text Reader Source 4 Name (& 5 & 6 if you use those slots).

- Folder glitch. I couldn't seem to reproduce. May be certain you still haven't v1.2.0 installed somewhere as that would create it?


Indicator showing now

About the folder, you are right, I have 1.20 installed. I deleted it and no more yttm in profile folder.

Thanks.


I would like to make some requests:

- It would be nice if there was a custom art image directory options to make the discogs art images rotate too in the panel. I have a lot of them downloaded by discogs tagger and will be cool to make some use of them beyond fallback default art image.

- last.fm/almusic/wiki sources. I supposed that display all sources will be weird with the new textreaders, but some kind of indication to show that there are more sources will be handy. The current menu entries didn't give visual clue and show no information of what kind of source is.

- On the album review option to display the album artist / album / sources in individual lines or a tooltip. Sometimes the combinations of 3 elements in the same line make impossible to know the album with large artist names.

- An option to show the panel properties, edit and configure in the normal menu without enter in editing layout mode.

- The possibility of selecting which one of the last.fm multiple artists is the correct one when there is more than one for the same name. I didn't know if this is even possible, but will be great.

Well, enough begging behavior for today.

Have a great day





Title: Re: Biography Discussion
Post by: regor on 2022-05-06 09:07:44
@mjm716
Tag lyrics displaying '.' Usually that's an issue with LargeFieldsConfig.txt file.

Per Marc & above - my LargeFieldsConfig.txt was already configured below, but I'm oddly still getting '.' for long lyrics.

Code: [Select]
# Size limit for meta fields that appear in the basic fields list
basicMetaMax=2000
# Size limit for meta fields that do not appear in either list
defaultMetaMax=1000
# Size limit for tech info fields
infoMax=200

# List of basic meta fields - essential info such as artist & title
fieldBasic=album
fieldBasic=album artist
fieldBasic=artist
fieldBasic=composer
fieldBasic=conductor
fieldBasic=date
fieldBasic=discnumber
fieldBasic=genre
fieldBasic=keywords
fieldBasic=performer
fieldBasic=producer
fieldBasic=style
fieldBasic=title
fieldBasic=totaldiscs
fieldBasic=totaltracks
fieldBasic=tracknumber
fieldBasic=comment
fieldBasic=DISCOGS_RELEASE_NOTES
fieldBasic=DISCOGS_RELEASE_CREDITS
fieldBasic=DISCOGS_ARTIST_PROFILE
fieldBasic=LYRICS
fieldBasic=UNSYNCED LYRICS

# List of spam meta fields - rarely useful stuff that *never* gets cached
fieldSpam=accurate rip
fieldSpam=aucdtect
fieldSpam=biography
fieldSpam=cuesheet
fieldSpam=eac logfile
fieldSpam=itunes_cddb_1
fieldSpam=itunmovi
fieldSpam=log
fieldSpam=logfile

Also one more minor request - tagger>tag files now has a confirmation window. Option to dismiss would be nice.  :)
Note the max size limit still applies. If you get a period, then you have to set it to a higher value.

@WilB yep that will do.
Title: Re: Biography Discussion
Post by: kahel on 2022-05-06 21:22:06
Just gave the version 1.3 a try... very nice job so far... great little additions... plus fixed all previous issue I had using multiple panel a the same time...

The only little quirk left is the ability to force a fixed aspect ratio with the fill option enable... right now, you have a little margin like 15% where the image get stretched to fill the canvas... before returning to the native aspect ratio...

But not complaining exactly the kind of release I was looking for... Thank  you.
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-07 15:47:16
I found a problem with the new Wikipedia source.

Sometimes when you change from one positive result to not found one the wiki source retain the positive one.

(https://i.imgur.com/94cwIQg.png)
Title: Re: Biography Discussion
Post by: kgena_ua on 2022-05-08 15:00:14
@WilB,
Good job. You are a good programmer.
Title: Re: Biography Discussion
Post by: regor on 2022-05-09 20:10:59
Would like to note that recent additions in HTML popups make script unusable without IE in more cases.
Now tagger menu entry opens a HTML popup first so it doesn't open the WSH popup later. A simple checking of HTML features could bypass the usage of HTML popups here (and probably in more instances).
Spoiler (click to show/hide)

settings.js: (line 629)
Code: [Select]
				const wsh = soFeatures.gecko && soFeatures.clipboard ? popUpBox.confirm(caption, prompt, 'OK', 'Cancel', continue_confirmation) : true; // Use HTML or just WSH as fallback
if (wsh) continue_confirmation('ok', $.wshPopup(prompt, caption));

If anyone wants to apply this change, just overwrite the js files with the ones attached.

Also found a bug (I think) related to the FilmStrip "overlay image area" option. When enabled, even if FilmStrip is disabled, image and text can not be moved. I spent a few minutes trying to figure what was going on  :))
Spoiler (click to show/hide)
Title: Re: Biography Discussion
Post by: WilB on 2022-05-12 13:32:46
@paregistrase  & @mjm716

The features you requested should be in the next version. (https://github.com/Wil-B/Biography/blob/main/CHANGELOG.md)

@paregistrase

You can already show panel properties, edit and configure without entering editing layout mode. Right click while pressing the windows key + shift.

last.fm multiple artists. last.fm seems to be name based & any of the same name are included in their lists & image collections. Usually they're dominated by the most popular. I don't believe anything can be done about it, except with photos, where black list can be used (menu > image > black list).

Wikipedia review occasionally not changing when item not found. I couldn't reproduce this issue. If the issue persists please try and provide exact steps to replicate. As a longshot, also verify that it isn't something simple like you're in prefer nowplaying mode, then clicking another album in playlist wouldn't be expected to change the review.

@regor

I've added your confirm dialogue box method. Thx.
The resize when the filmstrip overlays the image area should also be fixed in the upcoming version

@kahel

Auto-fill respects margin settings. May be that's what you need to change? Perhaps I didn't understand the exact issue. Also album covers where metrics are near square may be stretched slightly (<5%) rather than clipped.
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-12 17:04:48
The features you requested should be in the next version. (https://github.com/Wil-B/Biography/blob/main/CHANGELOG.md)

Cool

@paregistrase

You can already show panel properties, edit and configure without entering editing layout mode. Right click while pressing the windows key + shift.

Yeah....Only problem is that in Gnome windows key+shit bring the window menu (close.max, min,stay on top,etc). That was the reason of my request.

last.fm multiple artists. last.fm seems to be name based & any of the same name are included in their lists & image collections. Usually they're dominated by the most popular. I don't believe anything can be done about it, except with photos, where black list can be used (menu > image > black list).

That was a long shot, If the last.fm API allowed it I'm sure you would have already used it.

Wikipedia review occasionally not changing when item not found. I couldn't reproduce this issue. If the issue persists please try and provide exact steps to replicate. As a longshot, also verify that it isn't something simple like you're in prefer nowplaying mode, then clicking another album in playlist wouldn't be expected to change the review.

Is the same in every mode, nowplaying, follow selected or without playing songs.

Right now with Mark Knoffler - Privateering and a new released album Studnitzky - Nocturnal

(https://i.imgur.com/fIczrNz.png)

(https://i.imgur.com/x46yMfx.png)

(https://i.imgur.com/OsrP10L.png)

Note that even the artist image in facets that I have configured as

Code: [Select]
['Z:\mnt\wd\Musica\artist_art\'%DISCOGS_ARTIST_ID%\*]
['Z:\mnt\wd\Musica\yttm\art_img\'$replace($cut($meta(ARTIST,0),1),.,_)\$if($stricmp($cut($meta(ARTIST,0),1),.),_$substr($meta(ARTIST,0),2,$len($meta(ARTIST,0))),$meta(ARTIST,0))\*]
$if($stricmp($meta(ALBUM ARTIST,0),Various Artists),'Z:\mnt\wd\Musica\yttm\'VariousArtists.jpg,)
['Z:\mnt\wd\Musica\yttm\art_img\'$replace($cut($meta(ALBUM ARTIST,0),1),.,_)\$if($stricmp($cut($meta(ALBUM ARTIST,0),1),.),_$substr($meta(ALBUM ARTIST,0),2,$len($meta(ALBUM ARTIST,0))),$meta(ALBUM ARTIST,0))\*]
artist.*

Get a match for Studnizky with the Mark Knofler one. I diddn't have a Studnizky match in any of this path so it must display the default no artist image. But the Mark Knofler's ones was saved in the Studnizky folder

(https://i.imgur.com/fN6lvbJ.png)

Only thing I did was select Mark Knofler album and changes to the new one for tagging.

Sometimes even happen with album that have a wiki entry, but in this scenario a force update gives the correct info.

But if the album has no wiki info, it gets stuck in other previous successfully search most of the time

(https://i.imgur.com/xmuksvs.png)
Title: Re: Biography Discussion
Post by: WilB on 2022-05-12 17:36:34
So it's a download/save issue? What names were in the file tags for Studnitzky (or other cases where there's been an issue) at the time of downloading/saving? Are you using default strings for %BIO_ALBUMARTIST% & %BIO_ALBUM%? Are there any any musicbrainz_ids in the files that could be wrong as they take priority over names with Wikipedia? But then the photos seem wrong & that's lfm so it looks like the names in the file tags or values for %BIO_ARTIST%, %BIO_ALBUMARTIST% & %BIO_ALBUM% or save folder paths aren't right?

Is anybody else seeing this?
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-12 18:00:36
So it's a download/save issue? What names were in the file tags for Studnitzky (or other cases where there's been an issue) at the time of downloading/saving? Are you using default strings for %BIO_ALBUMARTIST% & %BIO_ALBUM%? Are there any any musicbrainz_ids in the files that could be wrong as they take priority over names with Wikipedia? But then the photos seem wrong & that's lfm so it looks like the names in the file tags or values for %BIO_ARTIST%, %BIO_ALBUMARTIST% & %BIO_ALBUM% or save folder paths aren't right?

Is anybody else seeing this?


The tags name are correct.

The Mark Knofler album have musicbrain info and the Studnitzky one not.

I have this paths for saving bio info in biography.cfg. I replaced %profile% with 'Z:\\mnt\\wd\\Musica'
Code: [Select]
   "fnImgCov": "album art_01",
   "foAmBio": "Z:\\mnt\\wd\\Musica\\yttm\\biography\\allmusic\\$lower($cut(%BIO_ARTIST%,1))",
   "foAmRev": "Z:\\mnt\\wd\\Musica\\yttm\\review\\allmusic\\$lower($cut(%BIO_ALBUMARTIST%,1))",
   "foCycCov": "$directory_path(%path%)",
   "foImgArt": "Z:\\mnt\\wd\\Musica\\yttm\\art_img\\$lower($cut(%BIO_ARTIST%,1))\\%BIO_ARTIST%",
   "foImgCov": "$directory_path(%path%)",
   "foImgRev": "Z:\\mnt\\wd\\Musica\\yttm\\rev_img\\$lower($cut(%BIO_ALBUMARTIST%,1))\\%BIO_ALBUMARTIST%",
   "foLfmBio": "Z:\\mnt\\wd\\Musica\\yttm\\biography\\lastfm\\$lower($cut(%BIO_ARTIST%,1))",
   "foLfmRev": "Z:\\mnt\\wd\\Musica\\yttm\\review\\lastfm\\$lower($cut(%BIO_ALBUMARTIST%,1))",
   "foLfmSim": "Z:\\mnt\\wd\\Musica\\yttm\\lastfm\\$lower($cut(%BIO_ARTIST%,1))",
   "foWikiBio": "Z:\\mnt\\wd\\Musica\\yttm\\biography\\wikipedia\\$lower($cut(%BIO_ARTIST%,1))",
   "foWikiRev": "Z:\\mnt\\wd\\Musica\\yttm\\review\\wikipedia\\$lower($cut(%BIO_ALBUMARTIST%,1))",

I didn't modify any of the script .js files.

If I delete the wrong files and made a force update the wrong wiki elements don't reappear

(https://i.imgur.com/BPtCh8s.png)
Title: Re: Biography Discussion
Post by: WilB on 2022-05-12 18:09:13
Can you also confirm these definitions:

%BIO_ARTIST%, %BIO_ALBUMARTIST%, %BIO_ALBUM% & %BIO_TITLE% (tfArtist, tfAlbumArtist, tfAlbum,  tfTitle in biography.cfg). A screenshot of the file tags may help as well.

In light of your edit it would seem these ought to be OK though.
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-12 18:29:36
Can you also confirm these definitions:

%BIO_ARTIST%, %BIO_ALBUMARTIST%, %BIO_ALBUM% & %BIO_TITLE% (tfArtist, tfAlbumArtist, tfAlbum,  tfTitle in biography.cfg). A screenshot of the file tags may help as well.

In light of your edit it would seem these ought to be OK though.

Code: [Select]
   "tfAlbum": "$meta(album,0)",
   "tfAlbumArtist": "$if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0))",
   "tfArtist": "$if3($meta(artist,0),$meta(featuring,0),$meta(mixed by,0),$meta(remixed by,0),$meta(lyricist,0),$meta(writer,0),$meta(vocals,0),$meta(conductor,0),$meta(producer,0),$meta(discogs_artists,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))",
   "tfComposition": "$if2($meta(work,0),$meta(group,0))",
   "tfTitle": "$meta(title,0)",

Mark Knofler

(https://i.imgur.com/BAY33SG.png)
(https://i.imgur.com/h0udYWb.png)
(https://i.imgur.com/d8Uwn50.png)

Studnitzky

(https://i.imgur.com/e4lhbFj.png)


Doing this test after deleting files and a force update successful, changing from one album to the other

(https://i.imgur.com/WiuPNvK.png)

Mark Knofler is back  :))
Title: Re: Biography Discussion
Post by: WilB on 2022-05-12 18:50:52
I just tested on fresh fb2k 1.6.11 install with bio at all default settings. It all works as expected for me even with those albums. See pics:
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-12 19:06:34
So are you saying it all works now? Either way I just tested on fresh fb2k 1.6.11 install with bio at all default settings. It all works fine for me even with those albums. See pics:

No. It still happens.

I close foobar. Delete all files related to KMDM and LA Vampires Meets Zola Jesus in the yttm folder.

I run foobar, select one KMDM release (with wiki info) and before LA Vampires Meets Zola Jesus (no wiki info)

and again

(https://i.imgur.com/leFofvL.png)

(https://i.imgur.com/27yQVCa.png)

Only with the wki source.

Deleting the wrong files and force update seems to get the right results for this release (no new wiki files display or saved), but changing to another one with wiki and returning bring back again mixed results
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-12 19:49:09
@WilB

I deleted the script, close foobar, deleted all the config files and start fresh.

I found a difference between my .cfg and the new default.

   "autoCache": 1,

In the old one was 0

With the 1 value the wiki source didn't get stuck

Then I changed the paths to my yttm custom folder in 'Musica'.

But now it didn't save the images and txt files in 'Musica/yttm' anymore. They are saved inside 'biography_cache' inside foobar profile
Title: Re: Biography Discussion
Post by: WilB on 2022-05-12 20:02:55
It really shouldn't matter whether custom or default cache is used. I tried with both with your test albums.

As nobody else seems to have seen the issue, it's best to do further debug via pm. I'll send something shortly.
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-12 20:33:29
It really shouldn't matter whether custom or default cache is used. I tried with both with your test albums.

As nobody else seems to have seen the issue, it's best to do further debug via pm. I'll send something shortly.

So autocache 0 or 1 is to change between default and custom.

Well, now with autocahe 0 it works well.  :-\  . I tried with all the albums that gives me problems and all of them works now

could be some mess up in the update process to the new version?

I'll tell you if I see something similar again but for now seems to go fine.

Sorry for making you waste time, I should have tried to do a clean start before report it.

Title: Re: Biography Discussion
Post by: WilB on 2022-05-25 18:02:50
New Version: Biography v1.3.1 (https://github.com/Wil-B/Biography/releases)

Enhancement and optimization of new features.
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-25 21:08:31
New Version: Biography v1.3.1 (https://github.com/Wil-B/Biography/releases)

Enhancement and optimization of new features.

Thanks for the new features and bug fixes (that Wikipedia bug was an elusive m*f*  ;) )

Said that, I think I need a little help configuring the image sources the way I like.

I have two sources for cover and artists photo, discogs_tagger and biography panel.

discogs_tagger download cover images to $directory_path(%path%) as album art_[number] and artist photo to Musica\Data\artist_art\%DISCOGS_ARTIST_ID%\%DISCOGS_ARTIST_ID%_[number]

I would like to download all the possible images that biography can download to Musica\Data\art_img and  Musica\Data\rev_img even if there is already a valid cover in $directory_path(%path%)

And display
In cycle bio artist the images of Musica\Data\artist_art\%DISCOGS_ARTIST_ID% + Musica\Data\art_img
In cycle bio review the images of Musica\Data\rev_img + $directory_path(%path%)

But I'm not able to achieve it.

what would be the correct combination of folders and custom folders for that?






Title: Re: Biography Discussion
Post by: WilB on 2022-05-27 18:53:05
If I understand you correctly you can try the following:

Photos

You should be able to set Musica\Data\artist_art\%DISCOGS_ARTIST_ID% as the photo > custom folder, which is checked first. If no images are found it will fallback to the download folder (Musica\Data\art_img).

So if you want the discogs photos, when images are available, enable menu> sources > photo > ...custom. If you want the art_img enable the menu> sources > photo > ...download folder.

If, as I believe you're on Wine and biography.cfg is being directly edited use, \\ not \ e.g. Z:\\Musica\\Data\\artist_art\\%DISCOGS_ARTIST_ID%

Review images

I'm not really sure why the rev_img is required if the album art cover is present. Consequently, the behavior is to only download rev_img if the cover is missing. To force it to get rev_img you could block loading of the album art cover until you have them. It's also possible to remove the check with a small edit:
Comment out lines 336 & 337 in server.js:
//const g_img = utils.GetAlbumArtV2(handle, 0, false);
//if (g_img) return;
I think that would be all that's needed in your case, but there are some tricky scenarios and so its not present as an option.

That should then save the rev_img.

Load:
1) $directory_path(%path%): e.g. use fb2k display > front. You can also use back cover etc if you have them.
2) rev_img: in covers: cycle folder (foCycCov) enter, e.g.  Z:\Musica\Data\rev_img (use \\ not \ if directly editing biography cfg)
    - note that your folder puts the review cover images by all artists in the same place
    - so adjust if you didn't mean that or include %BIO_ALBUMARTIST% & %BIO_ALBUM% in the path if you want one image per folder
    - either way the covers: cycle folder & review albumart save folder should be the same
3) On menu sources > cover enable: cycle above [set to front etc]  & cycle from folder
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-28 02:29:13
If I understand you correctly you can try the following:

Photos

You should be able to set Musica\Data\artist_art\%DISCOGS_ARTIST_ID% as the photo > custom folder, which is checked first. If no images are found it will fallback to the download folder (Musica\Data\art_img).

So if you want the discogs photos, when images are available, enable menu> sources > photo > ...custom. If you want the art_img enable the menu> sources > photo > ...download folder.

If, as I believe you're on Wine and biography.cfg is being directly edited use, \\ not \ e.g. Z:\\Musica\\Data\\artist_art\\%DISCOGS_ARTIST_ID%

That's what I manged to do, 2 directories and change the display in the menu.
I wonder if there is a way to display the 2 directories at once. A menu entry like the one for cover folder and foobar default photos where you can select more than one source and all are displayed and cycled at the same time.

Review images

I'm not really sure why the rev_img is required if the album art cover is present. Consequently, the behavior is to only download rev_img if the cover is missing. To force it to get rev_img you could block loading of the album art cover until you have them. It's also possible to remove the check with a small edit:
Comment out lines 336 & 337 in server.js:
//const g_img = utils.GetAlbumArtV2(handle, 0, false);
//if (g_img) return;
I think that would be all that's needed in your case, but there are some tricky scenarios and so its not present as an option.

That should then save the rev_img.

Load:
1) $directory_path(%path%): e.g. use fb2k display > front. You can also use back cover etc if you have them.
2) rev_img: in covers: cycle folder (foCycCov) enter, e.g.  Z:\Musica\Data\rev_img (use \\ not \ if directly editing biography cfg)
    - note that your folder puts the review cover images by all artists in the same place
    - so adjust if you didn't mean that or include %BIO_ALBUMARTIST% & %BIO_ALBUM% in the path if you want one image per folder
    - either way the covers: cycle folder & review albumart save folder should be the same
3) On menu sources > cover enable: cycle above [set to front etc]  & cycle from folder

I understand the logic. In a normal case there is no need to download a new cover if there is already one, but with the cover downloaded from discogs there's a potencial use.

Sometimes these images are literal photos of the album over a table, have the stickers, prices, etc. or there are specific to the album release (Japan version for example).

Instead the last.fm, allmusic are usually a standard image of the cover.

With that edit, I can download the rev_img without checking if it is already present and use the default fb2k to have two folder. Clever

But i need to do it inversely.

Using the rev_img to the fb2k display because there is only one and point the cycle folder to the $directory_path(%path%) that contains more than one.

So I need to recreate "Z:\\mnt\\wd\\Musica\\Data\\rev_img\\$lower($cut(%BIO_ALBUMARTIST%,1))\\%BIO_ALBUMARTIST%", with %album artist% because %bio_albumartist% is not accessible outside the component right?.

In the default artist image I use this replaces to show one image from the script folder
Code: [Select]
['Z:\mnt\wd\Musica\Data\art_img\'$lower($replace($cut($meta(ARTIST,0),1),.,_))'\'$replace($if($stricmp($cut($meta(ARTIST,0),1),.),_$substr($meta(ARTIST,0),2,$len($meta(ARTIST,0))),$meta(ARTIST,0)),'/','-',':','-','?',)'\'*]

Will the same replaces work with bio_album, or I need something more?

And out of curiosity...what are the possible problems?

 




Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-28 03:58:04
Well, at least for the cover, I think I do it.

I edit the server.js.

In biography.cfg

Code: [Select]
   "foCycCov": "$directory_path(%path%)",
   "foImgCov": "Z:\\mnt\\wd\\Musica\\Data\\rev_img\\$lower($cut(%BIO_ALBUMARTIST%,1))\\%BIO_ALBUMARTIST%\\%BIO_ALBUM%",
   "foImgRev": "Z:\\mnt\\wd\\Musica\\Data\\rev_img\\$lower($cut(%BIO_ALBUMARTIST%,1))\\%BIO_ALBUMARTIST%\\%BIO_ALBUM%",

In fb2k cover display

Code: [Select]
['z:\mnt\wd\musica\data\rev_img\'$lower($replace($cut($meta(ALBUM ARTIST,0),1),.,_))'\'$replace($if($stricmp($cut($meta(ALBUM ARTIST,0),1),.),_$substr($meta(ALBUM ARTIST,0),2,$len($meta(ALBUM ARTIST,0))),$meta(ALBUM ARTIST,0)),'/','-',':','-','?',)'\'$replace($if($stricmp($cut($meta(ALBUM,0),1),.),_$substr($meta(ALBUM,0),2,$len($meta(ALBUM,0))),$meta(ALBUM,0)),'/','-',':','-','?',)'\'*]

In bio sources-cycle  from folder and front

I tried some albums and seems to work. Even display the cover from rev_img first  8)

With the folder you said, it didn't download the cover to rev_image\first letter\album artist\album artist - album.jpg,

This way it does to rev_image\first letter\album artist\album\cover.jpg

Good enough.

If it is possible to merge the artist photos, will be great, but if not I can live with 2 directories and changes between them.

Thanks a lot

Edit:

Even easier. foCycCov, foImgCov, foImgRev point to $directory_path(%path%). As the file downloaded is named cover didn't interference with the one downloaded with discogs tagger. Renaming the album art_ to scan_ to make them display after cover and voilä.
Fewer directories to managed, simpler scripts and more compatible with other softwares.
Title: Re: Biography Discussion
Post by: pIv on 2022-05-28 05:29:00
Wilb
When I click the left mouse button on the image, I get the following error:

Error: Spider Monkey Panel v1.6.2-dev+fddbb743 ({DE304636-11CC-4453-A396-69E39A6D7564}: Biography v1.3.1 by WilB)
o.composer is undefined

File: text.js
Line: 1463, Column: 17
Stack trace:
  isTrackRevAvail@text.js:1463:17
  wikiRev@text.js:2099:29
  getText@text.js:1276:11
  getItem@text.js:1048:10
  click@panel.js:401:84
  on_mouse_lbtn_up@callbacks.js:181:79

I comment line 1460-1464 in text.js, and the error has disappeared.
My question is - what is the "isTrackRevAvail" function for?
Title: Re: Biography Discussion
Post by: WilB on 2022-05-28 19:15:12
@paregistrase

I'm glad you now have it sorted.

Quote
...possible to merge the artist photos

I use the feature & in my case there are duplicates between the folders & I didn't want them merged. I checked a few discogs vs lfm ones and there seemed to be some duplication of images in those two sources as well. You can always merge them yourself into the lastfm download folder. I can understand you might not want to do that, but at least there is a solution. If you decide to try, I suggest using a back-up copy in case it doesn't work out. Make sure 'Image Filter Lastfm' in panel properties is off else the discogs images won't display.

@pIv
isTrackRevAvail should be fixed in the next version (https://github.com/Wil-B/Biography/commit/4efc6a5bac2cd9d487c6790ef27a2d7507704d44)

It's used to set the grayed status of "Track review" on the load menu.

Also fixed for the next version is a regression in set language.
Title: Re: Biography Discussion
Post by: paregistrase on 2022-05-28 19:34:14
I use the feature & in my case there are duplicates between the folders & I didn't want them merged. I checked a few discogs vs lfm ones and there seemed to be some duplication of images in those two sources as well. You can always merge them yourself into the lastfm download folder. I can understand you might not want to do that, but at least there is a solution. If you decide to try, I suggest using a back-up copy in case it doesn't work out.

The duplicates were one of the reason I want to merge them in the display, to be able to spot them and delete them.
I understand that it is not good to display duplicates to the general public.

Seems that I need to rethink my folder structure to artist pictures.

Title: Re: Biography Discussion
Post by: WilB on 2022-06-04 09:59:42
Withdrawn
Title: Re: Biography Discussion
Post by: WilB on 2022-06-04 18:13:41
New Version: Biography v1.3.2 (https://github.com/Wil-B/Biography/releases)

- Improved load sub-menu
- Fixed v1.3.1 regressions
Title: Re: Biography Discussion
Post by: yeyo on 2022-06-06 06:22:14
New Version: Biography v1.3.2 (https://github.com/Wil-B/Biography/releases)

- Improved load sub-menu
- Fixed v1.3.1 regressions


Pop up prompt:

this.topAlbums.push is not a function

File: lastfm.js
Line: 153, Column: 80
Stack trace:
analyse/<@lastfm.js:153:80
htmlParse@helpers.js:176:11
analyse@lastfm.js:152:8
onStateChange@lastfm.js:31:42
getBio/dl_lfm_bio<@server.js:235:60
config@popupbox.js:46:9
open@settings.js:378:58
func@menu.js:725:25
run@menu.js:107:3
load@menu.js:70:8
rbtn_up@menu.js:1157:8
on_mouse_rbtn_up@callbacks.js:239:6
Title: Re: Biography Discussion
Post by: paregistrase on 2022-06-06 08:52:20
New Version: Biography v1.3.2 (https://github.com/Wil-B/Biography/releases)

- Improved load sub-menu
- Fixed v1.3.1 regressions

Great version @WilB.

I must say that I'm a great fan of the new system of filtering last.fm tags, some of them are just insane.

And I was wondering....why not expand that to all genre tags?

I was thinking in a text file with allowed last.fm tags (allmusic and wikipedia doesn't have garbage tags) for easy display and editing, eliminating the need of open the cfg or js files.

And centralized replaces file that will apply to all genre tags written to files.

This text files would be accessible from right click menu tagger section.

This will bring an easy to read and edit view of the tags that would be written to files and bring homogeneity to all the sources and avoid things like that

(https://i.imgur.com/WWXHBPe.png)

what do you think about it?




 
Title: Re: Biography Discussion
Post by: anamorphic on 2022-06-11 17:58:08
Small issue with v1.3.2. In Options >Display tab I have Album Ratings switched off, but Allmusic reviews are now showing the rating in the text (it was not doing this previously I think) -

Quote
>> Album rating: 5 <<  Repeating the formula of Low's half-vocal/half-instrumental structure, Heroes develops and strengthens the sonic innovations David Bowie and Brian Eno explored on their first collaboration ...

Title: Re: Biography Discussion
Post by: WilB on 2022-06-13 19:29:33
@paregistrase
I'll think about it & see if it can be done neatly. Next version will likely be a hotfix for a few issues that have arisen so maybe sometime in the future.

@anamorphic
Thanks for the report. The issue should be fixed for the next version. (https://github.com/Wil-B/Biography/commit/d07f5a9631cb4ae16cbd0beb7d22a2886f584082)

@yeyo
Does this happen with any particular artist?

Please can you provide an example artist that it occurs with. Also which language is being used. If it's not English, is "Fallback to English Server" enabled?

So far I haven't been able to reproduce the issue, so please provide the exact steps to replicate the issue.
Title: Re: Biography Discussion
Post by: paregistrase on 2022-06-13 21:51:49
@paregistrase
I'll think about it & see if it can be done neatly. Next version will likely be a hotfix for a few issues that have arisen so maybe sometime in the future.

If it can be done elegantly, it will be a cool feature. But if it is problematic or break other stuff, don't bother too much about it. It can be done with a script to replace genre values.








Title: Re: Biography Discussion
Post by: WilB on 2022-06-13 22:52:05
@yeyo
I have now managed to reproduce the issue & added a fix (https://github.com/Wil-B/Biography/commit/16ce662436fb73f8076586c5a49defb242929276) (missing reset) for the next version.
Title: Re: Biography Discussion
Post by: WilB on 2022-06-14 22:02:21
New Version: Biography v1.3.3 (https://github.com/Wil-B/Biography/releases)

Fixed a few reported issues
Title: Re: Biography Discussion
Post by: mjm716 on 2022-06-15 07:27:29
New Version: Biography v1.3.3 (https://github.com/Wil-B/Biography/releases)


Such an essential panel for FB! Many thanks and rock solid work.

If you're considering future dev ideas, displaying TF code (as alternate option to lyrics/textreader) would be amazing.

foo_textdisplay is so WIN95 compared with what you've built. ;)
Title: Re: Biography Discussion
Post by: kahel on 2022-06-15 10:16:08
On the Requirements page it says spider monkey panel 1.5.2+.

Which version are you using for your testing... and basically do you recommend using the lastest v1.6.1, stay on v1.5.2... or it doesn't matter either way.

Thanks.
Title: Re: Biography Discussion
Post by: redorb on 2022-06-16 06:44:41
Thank you WilB for Biography! It's one-of-a-kind!
Looks so good and works so well with foobar 1.6.11 and DarkOne4 theme!
Much appreciated!

I use Spider Monkey Panel v1.6.1 by TheQwertiest.
Title: Re: Biography Discussion
Post by: nikolai4ik on 2022-06-16 07:14:27
Haven't updated in years, until yesterday. Some awesome new features!
I've added 2 panels, one with library tree and another one with artist pics grid - and I can't open the settings window for one of them anymore - it says check console, there I see Library Tree: options dialog isn't available with current operating system. All settings in options are available in panel properties. Common settings are on the menu.

Why so?
Title: Re: Biography Discussion
Post by: yeyo on 2022-06-16 08:47:58
Haven't updated in years, until yesterday. Some awesome new features!
I've added 2 panels, one with library tree and another one with artist pics grid - and I can't open the settings window for one of them anymore - it says check console, there I see Library Tree: options dialog isn't available with current operating system. All settings in options are available in panel properties. Common settings are on the menu.

Why so?
+1
Same option setting problem
Title: Re: Biography Discussion
Post by: kahel on 2022-06-16 13:16:08
Me too... sometimes the options panel won't open... I think the first time it happened was on v1.3.2.
Title: Re: Biography Discussion
Post by: nikolai4ik on 2022-06-16 15:48:46
Haven't updated in years, until yesterday. Some awesome new features!
I've added 2 panels, one with library tree and another one with artist pics grid - and I can't open the settings window for one of them anymore - it says check console, there I see Library Tree: options dialog isn't available with current operating system. All settings in options are available in panel properties. Common settings are on the menu.

Why so?
I think I posted in the wrong thread lol... I meant library tree, but I guess it happens in biography as well.
Title: Re: Biography Discussion
Post by: mjm716 on 2022-06-18 08:07:12
In Biography-v1.3.3 I think there might be a tag writing issue?

I have the tags to write selected as shown, but what is written to %ALBUM GENRE LAST.FM% does not match?

Title: Re: Biography Discussion
Post by: WilB on 2022-06-18 13:03:47
Options dialogue sometimes not opening.

In v1.3.1 extra checks were added to test if ShowHtmlDialog is supported. ShowHtmlDialog should be supported for all users except those running Wine or those who don't want to install internet explorer. The extra checks use regor's getSoFeatures checker. Possibly it sometimes isn't giving the correct answer.

Attached is a debug version of so.js. Users experiencing the issue could replace so.js in ...foo_spider_monkey_panel\packages\{BA9557CE-7B4B-4E0E-9373-99F511E81252}\scripts with the debug version and post the console log when the issue happens to see if it shows anything. Note that so.js in bio & library tree aren't the same.

@kahel
Regarding SMP version. 1.6.1 has a bug in pseudotransparency handling. If you don't use pseudotransparency then use 1.6.1, otherwise use 1.5.2. The pseudotransparency bug has been fixed in the SMP development build.

@mjm716
Because the last.fm genres contain a lot of non-genre tags & some silly items, the tags written are now filtered. Only standard MusicBrainz genre tags are allowed according to this whitelist (https://musicbrainz.org/genres). I've updated the list for the next version as there are some new additions, e.g. instrumental hip hop in your example. But jazz hop isn't on the list. You can add to the whitelist on the tagger tab. It is possible to write all the last.fm tags which will include unwanted ones as well by uncommenting line 166 in the tagger as indicated in the script.
Title: Re: Biography Discussion
Post by: regor on 2022-06-18 23:17:44
Wilb note the getSoFeatures() part is being called at startup once (correct me if I'm wrong), so it only gets fixed after panel reboot. (that matches the behavior reported)

If there is a problem, is a SMP problem while creating a HTML file on startup, why? I have no idea. But since the check is only done once at startup, if it fails there, then it will fail during all the session.

You should be able to bypass it by async loading that file at a later stage (i think it's the first one on your script) or delaying calling getSoFeatures when it's needed (and memoizing the result).
Title: Re: Biography Discussion
Post by: mjm716 on 2022-06-19 06:34:47

@mjm716
Because the last.fm genres contain a lot of non-genre tags & some silly items, the tags written are now filtered. Only standard MusicBrainz genre tags are allowed according to this whitelist (https://musicbrainz.org/genres). I've updated the list for the next version as there are some new additions, e.g. instrumental hip hop in your example. But jazz hop isn't on the list. You can add to the whitelist on the tagger tab. It is possible to write all the last.fm tags which will include unwanted ones as well by uncommenting line 166 in the tagger as indicated in the script.

Thanks for the info. Uncommenting worked as expected.

On one hand I totally appreciate your effort and approach to clean up genres.

On the other hand, the nitwits (~freepurple?!) who add silly genres may actually also provide a service if they are the least bit consistent, so "jazz-hop" may actually result in a meaningful sub-segment. It is easier to post-filter out tags in FB than it is to add data at the album level.
Title: Re: Biography Discussion
Post by: kahel on 2022-06-29 21:47:46
Since I've installed the version 1.3.3, I've noticed that my 'channel spectrum panel' was freezing every now and then...
Still happen with the 1.3.2... but doesn't with the 1.3.1, except the usual, 'normal' freeze while images first load.

The version 1.3.1 work fine, so no rush needed... just letting you know in case you could think of change that could affect performance... I've tested with 'filmstrip' and 'autocycle' disable... the freeze seem to happen every few second... without any image change... maybe something update in the background...

Might be worth exploring in the future... if I'm not the only one noticing those freeze...
To test... the easiest way would be in a music visualizer for example... also seem to impact performance while I scrolls down through my music list... not positive about that since it's a lot harder to notice in that case.
Title: Re: Biography Discussion
Post by: WilB on 2022-06-29 23:57:24
@kahel

Thanks for the report. I was able to reproduce. The issue should be fixed in the next version.
Title: Re: Biography Discussion
Post by: always.beta on 2022-08-27 15:20:56
The ESLyric + Biography combination is perfect.
https://imgur.com/a/99yisL1 (https://imgur.com/a/99yisL1)
Title: Re: Biography Discussion
Post by: WilB on 2022-08-29 16:15:45
Looks good. I'm glad it's working well.
Title: Re: Biography Discussion
Post by: WilB on 2022-08-29 18:30:47
New Version: Biography v1.3.4 (https://github.com/Wil-B/Biography/releases)

Added
- Item properties. See screenshots at end of readme (https://github.com/Wil-B/Biography/blob/main/README.md)

Changed
- Tagger
    - last.fm genre whitelist is now updated automatically
    - usage of last.fm genre whitelist is now optional (tagger tab)

Fixed
- Feature detection issue. See the changelog (https://github.com/Wil-B/Biography/blob/main/CHANGELOG.md) for full info
- v1.3.2 regression: image cache issue
Title: Re: Biography Discussion
Post by: kahel on 2022-09-02 21:09:23
Updated to v1.3.4.
Everything seem to run nice, at a first glance.

I was wondering if there was already a built in way to 'open file location' -image for example-... by double clicking, middle clicking... or even a shortcut?
Title: Re: Biography Discussion
Post by: etip on 2022-09-03 16:05:58
hi there, i'm a noob at using script.
i'm enhancing a DarkOne theme therefore i'm using ColumnUI & Panel Splitter.
Does that mean there is no way i can use this Biography script ?
I've installed JSCript Panel.
Thanks in advance
Title: Re: Biography Discussion
Post by: marc2k3 on 2022-09-03 16:22:14
I'm pretty sure DarkOne* comes with a very thorough PDF manual explaining how to add your own custom panels. For this bio script, you'll need Spider Monkey Panel.

* the original ones by Tedgo - if you have other people's mods then who knows?
Title: Re: Biography Discussion
Post by: Mrakobes on 2022-09-04 09:33:44
Biography: the options html dialog doesn't appear to be available with the current operating system. All settings in options are available elsewhere: 1) panel settings are in panel properties; 2) server settings that apply to all panels are in the cfg file - default settings should be fine for most users, but can be changed by careful editing in a text editor. Common settings are on the menu.

I added another panel and a message like this pops up. The old panels seem to have been updated to the latest version and do not give such a dialog box, what did I do wrong?

+
Custom load folder

Tell me how to display the artist's image in the panel, despite the fact that the photos are in a folder with music files, the folder name is "Images" and it is located in the root directory of the artist, which contains folders with albums.

Title: Re: Biography Discussion
Post by: always.beta on 2022-09-04 10:16:12
An error occurred.
Sources > Text > Static
Code: [Select]
b is not defined

File: menu.js
Line: 1311, Column: 12
Stack trace:
  setTextType@menu.js:1311:12
  func@menu.js:319:21
  run@menu.js:112:30
  load@menu.js:98:8
  rbtn_up@menu.js:1053:8
  on_mouse_rbtn_up@callbacks.js:240:6
Title: Re: Biography Discussion
Post by: always.beta on 2022-09-04 10:22:20
Tell me how to display the artist's image in the panel, despite the fact that the photos are in a folder with music files, the folder name is "Images" and it is located in the root directory of the artist, which contains folders with albums.
At the default setting, the image is downloaded from the network and displayed. If your network can't download, you can right-click the menu - Source - Photo, switch to a custom folder, and follow the prompts to set.
Title: Re: Biography Discussion
Post by: WilB on 2022-09-04 14:12:20
@kahel
Menu > sources > open file location

@Mrakobes
Regarding message, you can manually set first panel property  ('-show html dialog...') to 1 to by pass an autodetect of features. For custom artist photo load, enter path in options: "Server Settings"\Photo\Custom photo folder, as indicated by always.beta

@always.beta : Thanks for reporting. It should be fixed in the next version.
Title: Re: Biography Discussion
Post by: kahel on 2022-09-04 15:43:38
My post was probably unclear.
I'm aware of... menu/sources/open file location.... that because I use it so much at the moment (updating my music library) I was wondering if there was an option to make it 'easier' like a double click.
Title: Re: Biography Discussion
Post by: Mrakobes on 2022-09-04 16:28:50
@always.beta
@WilB

Custom load folder

On the second question of my post. Help me make a viewer, I want to watch the artist's photo in a separate tab when listening. I always put photos in the Images folder in the artist's directory. what are the settings in the panel? So that the script finds all the image files and rises from the path to the Images folder, (maybe a folder in the folder when CD1, CD2)
Title: Re: Biography Discussion
Post by: WilB on 2022-09-04 18:05:48
@kahel
All the click actions are already assigned unless a modifier is used. I'll add it using 'alt+click' with an indicator of the shortcut on the open file location menu, unless I discover any conflicts or you think its unsuitable for some reason

@Mrakobes
Quote
I always put photos in the Images folder in the artist's directory
To enter the path in the main artist photo download folder:

Options > Server Settings > Download tab
Under cache location choose custom, then configure custom cache
Enter the path required in the last.fm photo box
Sounds like you want something like path to artist\images

If these are static images you can also use the previous method or both

Each path needs to point to a specific folder that's resolvable by title formatting. So you might need the photos in images rather than CD1 or CD2 etc., which would be more efficient anyway.
Title: Re: Biography Discussion
Post by: WilB on 2022-09-05 23:55:56
New Version: Biography v1.3.5 (https://github.com/Wil-B/Biography/releases)

Added
- Shortcut to open image: Alt+Click
-Item properties: file creation date (requires foobar2000 v2)

Fixed
- Issue with setTextType
Title: Re: Biography Discussion
Post by: kahel on 2022-09-07 12:20:03
Thank you.

Just tried the Item properties... look nice. I can easily see one of my panel make use of it.
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2022-09-13 07:15:54
Hi...
is there a way to configurate wich tags are used  for cycling? I hate it if album artist is show if it was "Various". I want cycle other tags like conductor, choir, solist or orchestra... thanks
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2022-09-15 06:26:03
Just found it myself: I modified the biography.cfg file at the end.


   "tfArtist": "$if3($meta(artist,0),$meta(album artist,0),$meta(solist,0),$meta(orchestra,0),$meta(choir,0),$meta(conductor,0),$meta(originalartist,0))",
   "tfTitle": "$meta(title,0)",
   "va": "Various"
}
Title: Re: Biography Discussion
Post by: tcmcqueen on 2022-09-22 18:20:00
semi-related to the two posts above this one about artist tags, does anyone know what i would need to modify to have the album tag filter out text in parentheses or brackets? a lot of my collection is digitized vinyl/tape where the pressing is noted in the album title, for example "Dark Side of the Moon (UK)" currently comes up with nothing for the description. appreciate any suggestions!
Title: Re: Biography Discussion
Post by: anamorphic on 2022-09-22 18:43:11
^ You could try enable "Album name auto-clean" setting (in Options > Server Settings tab (blue) > Miscellaneous tab) - description of it is written at the bottom.
Title: Re: Biography Discussion
Post by: emaulana on 2022-09-26 15:08:10
New Version: Biography v1.3.5 (https://github.com/Wil-B/Biography/releases)

Added
- Shortcut to open image: Alt+Click
-Item properties: file creation date (requires foobar2000 v2)

Fixed
- Issue with setTextType

[/quote

Could you make a x64 Jscript 3 version? I miss this beutiful component on foobar2000 x64.
Title: Re: Biography Discussion
Post by: tcmcqueen on 2022-09-26 21:58:51
^ You could try enable "Album name auto-clean" setting (in Options > Server Settings tab (blue) > Miscellaneous tab) - description of it is written at the bottom.

this definitely seemed like it would be the answer based on its description, thank you! unfortunately i couldn't get it to work even after resetting the cache and forcing updates.

as an experiment i made a new tag field called "album_clean" and manually created a tag for "Meddle" vs "Meddle (German)", went to server settings>title format and changed %BIO_ALBUM% to "$if2(%album_clean%, %album%)" which works as expected (but still doesn't clean the tag if it falls back to %album%). i'm wondering if perhaps the "utils.ReplaceIllegalChars" function is broken in v2 (32 bit)?
Title: Re: Biography Discussion
Post by: marc2k3 on 2022-09-26 22:41:54
i'm wondering if perhaps the "utils.ReplaceIllegalChars" function is broken in v2 (32 bit)?

No such thing exists in Spider Monkey Panel. That's in JScript Panel only (v2.5 and above). And it's for replacing illegal characters in windows file/folder names - nothing to do with the subject at hand.
Title: Re: Biography Discussion
Post by: tcmcqueen on 2022-09-26 23:56:28
i'm wondering if perhaps the "utils.ReplaceIllegalChars" function is broken in v2 (32 bit)?

No such thing exists in Spider Monkey Panel. That's in JScript Panel only (v2.5 and above). And it's for replacing illegal characters in windows file/folder names - nothing to do with the subject at hand.

oh gosh thank you, somehow i hadn't noticed i was exploring around the jscript folder not the SMP folder, oops!  :-[

in any case though, given my limited (to say the least) understanding of javascript the SMP js files are even more cryptic to me. i am guessing that it must be something i'm doing wrong but i'm not sure what else to do besides manually creating a separate clean album title tag. the "clean album title" checkbox doesn't seem to have any effect even if the match % numbers are turned way down.

thanks again for the clarification Marc (and for all of your other work), if anyone has any suggestions i'm open to them! :)

edit: I managed to get it working by adding "replace(/\([^)]*\)/g, ' ')" to the albumClean function in names.js!
Title: Re: Biography Discussion
Post by: emaulana on 2022-09-29 05:17:54
Could you make a x64 Jscript 3 version? I miss this beautiful biography on foobar2000 x64.
Title: Re: Biography Discussion
Post by: ifrankyman on 2022-11-14 22:04:47
I get the following error:
ActiveX_Run failed:
ActiveXObject:
  code: 0x80070005
  description: Access is denied.

  source: msxml3.dll

File: lastfm.js
Line: 638, Column: 16
Stack trace:
  search@lastfm.js:638:16
  analyse@lastfm.js:662:19
  onStateChange@lastfm.js:580:42
  getTrack/dl_lfm_track<@server.js:579:58
Title: Re: Biography Discussion
Post by: ifrankyman on 2022-11-19 11:41:14
I get the following error:
.....
The problem was solved by removing Spider Monkey Panel and putting a new one in its place.
Title: Re: Biography Discussion
Post by: Mrakobes on 2022-12-20 11:45:48
how can I install this on jscript-panel 3.1.18???
Title: Re: Biography Discussion
Post by: aboabo on 2022-12-20 13:05:37
Does the biography panel have an option to manually add a search? I have a lot of radio stations that don't add metadata of a track properly and are not properly parsed into %title%, %artist%, and then the panel finds nothing. I'd like to see the background info in the panel by just typing in the search.
Title: Re: Biography Discussion
Post by: Mrakobes on 2022-12-21 18:49:04
@marc2k3
@WilB

guys, help - the monkey panel doesn't work on version 2.0, I can't live without a biography!!! How to install???


   
Title: Re: Biography Discussion
Post by: marc2k3 on 2022-12-21 21:04:15
SMP and WilB's script should work fine on 32bit fb2k v2.

Since 64bit is brand new, no one can claim to need it. It's nice but not essential. If you have one more components that aren't available, it makes the choice so much easier. You'd be mad to give up things you find useful just to use it,

64bit JScript Panel 3 does include last.fm bio and image downloading scripts (thumbs) but of course they're rather basic compared to WilB's work. I'm useless at making things look pretty.

https://jscript-panel.github.io/gallery/lastfm-bio/
https://jscript-panel.github.io/gallery/thumbs/
Title: Re: Biography Discussion
Post by: mjm716 on 2023-01-07 18:19:51
just reporting - randomly occurs:

Error: Spider Monkey Panel v1.6.1 ({E8C329D3-03E9-4ABF-A58B-871009A023E5}: Biography v1.3.5 by WilB)

File: server.js
Line: 186, Column: 10
Stack trace:
  expired@server.js:186:10
  getRev@server.js:426:51
  download@server.js:193:8
  Server/this.on_playback_new_track<@server.js:47:9
  T@helpers.js:97:164
  t@helpers.js:97:519
  on_playback_new_track@callbacks.js:434:23
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-01-07 18:52:39
Seems to be pointing at a helper function inside scripts\helpers.js

At line 116, replace this...

Code: [Select]
	file(f) {
return fso.FileExists(f);
}

folder(fo) {
return fso.FolderExists(fo);
}

with

Code: [Select]
	file(f) {
return typeof f === 'string' && fso.FileExists(f);
}

folder(fo) {
return typeof fo === 'string' && fso.FolderExists(fo);
}
Title: Re: Biography Discussion
Post by: regor on 2023-01-08 22:51:51
Just noticed sometimes Last.fm is missing the locale tag, but it's present on the wiki data.

According to tagger.js file, locale tag is only filled with the last.fm value, so in some cases the panel does not notify the country even if it's shown on the bio panel (the flag).
X
X

Wiki/allmusic values should be used as fallback in case last.fm value is missing on window.NotifyOthers('biographyTags', ...)
Title: Re: Biography Discussion
Post by: WilB on 2023-02-22 23:22:01
I've added the fall-back for the next version.

Thanks for the feedback.
Title: Re: Biography Discussion
Post by: PeterMac on 2023-02-26 00:09:14
how to install it ? I tried two jscrpit panels select Import choose Biography-v1.3.5.zip and everytime javascript error ?
Title: Re: Biography Discussion
Post by: paregistrase on 2023-02-26 03:06:41
In the summary, not all items adjust with the panel width. I noticed that in genres, moods and members
(https://i.imgur.com/Q2ualbN.png)
(https://i.imgur.com/14IgM6g.png)
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-03-06 12:10:31
I find many .txt files in the main folder of foobar2000
These files refer to the artist's biography.
It often happens when I add music files into the playlist.
I didn't understand if I have to set something in the tool to avoid this.
Title: Re: Biography Discussion
Post by: redorb on 2023-03-13 15:44:56
how to install it ? I tried two jscrpit panels select Import choose Biography-v1.3.5.zip and everytime javascript error ?
In foobar->Menu->Preferences->Columns UI->Spider Monkey Panel->Configure panel->Spider Monkey Panel Configuration->Package->Package manager->Import->Biography (by WilB->Biography-v1.3.5.zip
Title: Re: Biography Discussion
Post by: redorb on 2023-03-13 17:50:26
I find many .txt files in the main folder of foobar2000
These files refer to the artist's biography.
It often happens when I add music files into the playlist.
I didn't understand if I have to set something in the tool to avoid this.
In foobar->right click in Biography field>Options->Biography Options->Server Settings (All Panels)->Download->Auto-download->Untick...
Title: Re: Biography Discussion
Post by: WilB on 2023-03-17 11:59:32
@aboabo  The issue of handling radio streams that contain the artist name and song title in a non-standard format has a arisen a few times. Rather than putting in a manual search, the next version should have an advanced radio stream parser so it works automatically. It has to be configured for each problematical stream which the user can do. It uses JavaScript. So far it has two cases present, as provided by @Sergey77  in a pm a while ago. I'm happy to add a few more, really as examples, and so if any one wants to post some radio stream links that are not properly parsed into %title% %artist% I'll look into adding them.

@paregistrase  To have a neat and compact summary, certain items are limited to one line by design. That particularly applies to items where there might be long lists, e.g. sometimes there can be 25+ members or moods etc, which would require several lines to accommodate.

@ApacheReal  That issue should be fixed in the next version.
Title: Re: Biography Discussion
Post by: paregistrase on 2023-03-17 13:00:21
@paregistrase  To have a neat and compact summary, certain items are limited to one line by design. That particularly applies to items where there might be long lists, e.g. sometimes there can be 25+ members or moods etc, which would require several lines to accommodate.

So no bug, a feature :-P

And any easy way to do it for people without concerns for vertical space (or aesthetic taste)?

One can scroll down easily, but the horizontal space is limited .
Title: Re: Biography Discussion
Post by: sprite on 2023-04-08 07:01:42
hey there, i was just wondering if there's a way to disable filmstrip. i can't figure out how to disable it in the options window and i'm kind of at a loss.

if it can't be disabled, what's the latest version that didn't have it?

edit: jesus christ i'm blind lol it's in the context menu. never mind  :o
Title: Re: Biography Discussion
Post by: sprite on 2023-04-23 21:31:03
sorry to double post. i want to continue using only last.fm photos, but this one artist's last.fm page is taken by another artist, and his own page isn't under his name -- so the photos that show are of some random pop group

is there any way around this? maybe disable last.fm photos for this one specific artist, or somehow make the plugin pull info from his actual page as opposed to the one his name's actually under? if not, is there a way to just upload custom photos?

allmusic has a bio for him so no issue there
Title: Re: Biography Discussion
Post by: WilB on 2023-04-29 12:01:08
You can black list the images: right click > image > black list.

You would need to black list all the unwanted ones.

You can also copy custom photos into the download folder of the artist. That requires 'options > image tab > last.fm photos' disabled.

@paregistrase

I've added the ability to toggle the summary to expand all the items for the next version.
Title: Re: Biography Discussion
Post by: paregistrase on 2023-04-29 12:24:05
@paregistrase
I've added the ability to toggle the summary to expand all the items for the next version.

Thanks
Title: Re: Biography Discussion
Post by: Majestyk on 2023-05-07 04:43:01
Can the filmstrip load photos from last.fm, etc? Mine only shows local photos of Pink Floyd, and I didn't even know I had them. (Can't find them)
Title: Re: Biography Discussion
Post by: redorb on 2023-05-07 08:10:06
If you are using foobar 1.6 (32-bit) it is located here:
C:\Users\*your user name*\AppData\Roaming\foobar2000\yttm
Replace *your user name* with yours.
I don't know about the filmstrip load.
Title: Re: Biography Discussion
Post by: kahel on 2023-05-07 17:53:46
Is there a way to disable image loading... while no track is playing...?

I have issue while editing my playlist... when playback is off... sometimes it take up to 3 second to activate the selected album.

Instead of showing art when selected... only showing while playing would solve my issue... I think.
Title: Re: Biography Discussion
Post by: Mrakobes on 2023-05-08 07:29:14
(https://i.ibb.co/MCkxCbT/2023-05-08-09-26-17.png) (https://i.ibb.co/KrxprYZ/2023-05-08-09-26-17.png)

Tell me how to configure the script to display the artist of the album and not the artist? When playing such tracks, photos are not loaded

Title: Re: Biography Discussion
Post by: WilB on 2023-05-09 11:14:12
@kahel
Quote
Is there a way to disable image loading?
You can middle click the text or use the menu to go to text only. At least see if that solves the issue. In my tests the behaviour seemed OK as is with images on. Do you have anything else loaded which would cause an issue?

If the current middle click method is insufficient, when would you change a setting if added?

Lastly it's possible to adjust the timing of the events. Go to panel.js and locate the following two functions ~lines 192 to 204
Code: [Select]
		this.focusLoad = $.debounce(() => {
if (!ppt.img_only) txt.on_playback_new_track();
if (!ppt.text_only || ui.style.isBlur || ppt.showFilmStrip) img.on_playback_new_track();
}, 250, {
'leading': true,
'trailing': true
});

this.focusServer = $.debounce(() => {
this.changed();
}, 5000, {
'leading': true,
'trailing': true
});

change them to
Code: [Select]
		this.focusLoad = $.debounce(() => {
if (!ppt.img_only) txt.on_playback_new_track();
if (!ppt.text_only || ui.style.isBlur || ppt.showFilmStrip) img.on_playback_new_track();
}, 1000, {
//'leading': true,
'trailing': true
});

this.focusServer = $.debounce(() => {
this.changed();
}, 5000, {
//'leading': true,
'trailing': true
});
You can also try adjusting the 1000 value (1000msec is 1 second delay)

If that's useful, I can add some advanced options.

@makrobes
This seems like a question you asked here (https://hydrogenaud.io/index.php/topic,112914.msg989132.html#msg989132).
You can try putting the following in options > server settings > title format > %BIO_ARTIST%:
Code: [Select]
$puts(str, feat. )$puts(len,$len($get(str)))$puts(pos,$strstr($lower(%artist%),$get(str)))$cut(%artist%,$sub($get(pos),1))

@Fizbin
Default behaviour is to show the filmstrip images provided there is greater than one, which normally there would be in artist view. May be one of the settings is wrong.

Simplest solution is to go to options > panel settings tab > click reset all panel settings. Ensure you have backed-up panel properties before doing this if you've made changes you want to keep.

If that doesn't work go to options > server settings tab > reset all server settings.

You can check if images are in the download folder. You can also try menu > sources > force update

Fresh installs put data and images in the ...spider_monkey_panel\package_data folder\{BA9557CE-7B4B-4E0E-9373-99F511E81252}.

Upgrades retain the original yttm location as outlined by redorb.
Title: Re: Biography Discussion
Post by: kahel on 2023-05-09 12:23:19
Thank you... it will allow me to look a bit more into it... Delaying it seem like a good option to try.

I've already did some testing... it suggest that the performance issue come from foobar image loading... happen with both standard display art or with 'biography'... happen with various playlist (stock one included...)
I'll need redo some testing, comparing performance against a fresh foobar install, add panel one by one... and see when the performance start to degrade... I remember already doing it a few year ago... but look like it needed again.

Right now (as a quick fix) I can play a music, pause it... and then I get good browsing playlist performance. (maybe because display art doesn't get updated, in that case... this way I can click on any track and it get selected instantly... otherwise if I let the program update art display/infos... it can become really sluggish.)

(So to be extra clear it is not the time it take to load the associate image that I consider a performance issue... it's the time it take for the track to be selected on the playlist itself...)
Title: Re: Biography Discussion
Post by: kahel on 2023-05-09 16:22:55
So I've spend a few hours looking into my foobar selection performance... issues.

Started with a fresh install of foobar2.0 x86... the selection feels almost instantaneous...
Rebuilt the basic shape of my layout... with 4 different arts (displaying at the same time)... and same here... the selection is done Very fast... and doesn't need to wait for images to get loaded...

Then I installed 'spider monkey panel' to be able to replace all 4 images with the 'biography' module.
Once all art viewer replaced by 'biography'... I noticed a (relatively) big performance difference... not only the 'same' images (only) get loaded a lot slower (from around 200 or 300 ms... to 1000-2000 ms)...
Now, the selection Need to wait for images to get loaded... (with every else equal)


At this point I decided it was worth to start modifying my own foobar... which has very bad 'selection' performance (around 5s).
Started by replacing every Biography panel with the basic artwork viewer... It did improve the performance by 1 or 2s... to around 3s or 4s (to selection to happen)
Still a lot of performance missing, tough... so kept looking...

I had others 'spider monkey panel' beside biography... decided to remove everything related, from the layout...
And it got me another improvement... a big one this time... now the performance selection is below 1s...


Still not as good as the fresh install... but it seem like the major part of the performance issue come from module using 'spider monkey panel' (1.6.1)... or spider monkey itself, not sure...
Probably worth checking if it also happen with previous version.... or why we go from the selection happening before images get loaded... to have to wait... with everything else equal... except 'spider monkey'+'biography'...
Not ideal... selection should have priority... just like it does in stock foobar...

I'll also be insterested to see how would 'biography' perform with something else than spider monkey panel as a base... might be worth the testing, if the conversion is doable.
Next step for me would be to test with previous version with both 'spider monkey' and 'biography'...

Anyway... nothing conclusive yet... some interesting 'findings' tough...
Title: Re: Biography Discussion
Post by: WilB on 2023-05-09 18:17:48
I just tried with v1.6.1 on a massive CUI and a massive DUI layout. Each are tabbed layouts with about 100 SMP panels. Menu loads fine, even if bio etc are set to follow selected track. Which playlist are you using? Have you excluded that?
Title: Re: Biography Discussion
Post by: kahel on 2023-05-12 18:51:07
Took my time to do more testing... to triple check... and being able give a better idea... of the performance... we should except...
I think I can answer now... with a lot more confidence...
To make it short... yes I excluded the playlist viewer (as a possible cause) in both my initial and follow up testing... I'm not speaking about the selection to playlist... but the track selection between different album... (I'll try to explain the procedure later)
One thing for 'sure' the 'playlist viewer' becomes very laggy... a lot slower compare to defaut foobar panel and also compare to 'Jscript panel 3'... so with that in mind... it looked like a good idea to make some direct comparison...

Here what I find out during my testing... and a short description of the procedure... (all made with foobar2.0 x86)

With the previous (quick) testing, I found that most of the performance issues seems to come from 'spider monkey panel' scripts... so I decided to make some comparison... same layout against 'defaut' foobar panels, 'spider monkey' and 'Jscript Panel 3'...
'JS3' vs 'spider monkey' felt like is a good comparison to make... since we get the same script 'samples' made by the same authors.

Simple procedure. Made the same layout (refacet+playlist+4ArtworkDisplay+Thumbs)... one with default UI panel (as a baseline)... one with 'spider monkey' and one with 'JSP3'...

What I'm interest in the testing... is once a playlist is loaded with refacet (at least 2 albums, in my case a library of 1000albums)... mesure how long it take between my mouse left click... and the selection to happen (highlighted)... by switching between track from different albums (to allow the image loading to happen)... without playing the track (only selecting it with a single click).

Results:
_With stock foobar panel... the selection is around 50ms, 80% of the time... with some (random?) small lag around 2 or 300ms...
_With 'Jscript Panel 3'... the selection feel slighty slower... around 2 or 300ms... (but) without random small lag (very small sample size test, tough)
_With 'Spider Monkey'... the selection become VERY slow... between 1500ms and 3000ms...

With those results in mind... I did some more digging... here some additional infos...
-'Thumbs' (called filmstrip in 'bio') seem to be the most performance heavy... when turned off 'JSP3' get faster around 100ms... and 'Spider Monkey' also get faster... around 1200ms... still feel very sluggish... just not as bad as before.
-While switching back and forth... I noticed that the 'spider monkey' image doesn't look the same as the original picture should... it seem like there is some kind of post-process going on... the image look darker with more contrast and we loose details...
-Also tried to run 'smooth browsing' as a side test... and (same script, same author)... also run a lot better on 'JSP3' compare to 'spider monkey'... that being said, not all script from 'spider' impact performance... so just running it with a small script is fine...


Still a lot a thing to check and figure out... but if my testing reveal to be accurate (pretty easy to reproduce, already did it myself, starting for scracth 3times, with 2 different computers)...
Seem like 'spider monkey' suffer pretty big performance issue (when it come to 'art displaying' at least)... could be (partially) explained by the 'post-processing'... some more looking into needed, I guess :)... can it be disable and will it improve perf?
After all that I checked with 'biography' itself... and we get the same 'post-effect' as 'spider monkey' 'ablum art' displayer... 'biography' also suffer performance issue... but not as bad (around 800ms-1000ms)... probably due to optimization on your part... which suggest... 'bio' could be a lot faster... if it didn't suffer whatever is going on with 'spider monkey'...

If you are able to make a version that's work with 'Jscript panel 3' or something else... I'll gladly do the testing to compare performance.
Title: Re: Biography Discussion
Post by: WilB on 2023-05-12 19:22:48
I still can't reproduce any issues.

Here is a modded panel.js you can try.

Replace the one in .\foo_spider_monkey_panel\packages\{BA9557CE-7B4B-4E0E-9373-99F511E81252}\scripts

I don't have the thumbs or smooth browser in my layout. You can't necessarily compare the smp & jsp versions of those, as latter has had more recent changes. I'm only really interested in bio performance.
Title: Re: Biography Discussion
Post by: kahel on 2023-05-12 19:59:32
Weird I can easily reproduce it... starting from scratch with very basic component.
Ok after re-reading myself... I forgot something that may or may not be important.

My baseline layout is with defaut UI... but both 'JSP3' and 'spider monkey' are done with 'columns UI'...
Is this relevant?
Title: Re: Biography Discussion
Post by: WilB on 2023-05-12 20:03:42
I've tested both. Can you try the new panel.js above? It has extra optimisations. It shouldn't take long to try.
Title: Re: Biography Discussion
Post by: kahel on 2023-05-12 20:04:55
Can't right now... but I will as soon as possible.
Title: Re: Biography Discussion
Post by: kahel on 2023-05-12 21:36:29
So I've just tried your new 'bio'...

And At first glance it seem blazing fast in term of selection... but there is more to the story.
At least it would explain why you couldn't reproduce my findings... doesn't happen anymore... like it does with 1.3.5... (still, would be nice to have somebody else validate those results...)

Tjat said, the performance issue remains... let me explain some more.
So the best comparaison (imo) is against 'Jscript panel 3'... I'll call your 'bio' 1.3.6 against 'JSP3'...

'bio' 1.3.6 is faster than 'JSP3', in terme of pure, first selection... but...
Part of my testing procedure is to go back and forth between album and scroll down...
On that front 'JSP3' is a lot faster like 5 to 10 times faster...
As an illustration, I can go back and forth between album with 'JSP3' without issue... image get fully loaded in 200-300ms.
With 1.3.6... it's another story... even tough the first selection is done instantly... going back and forth is very sluggish... and image take 1800-2200ms.
Another important differnce... with 'JSP3' i can select and immediately scroll down with the mouse... with 1.3.6... it's very sluggish... it 'hang' and it take about 2s for the scrolling to begin...

One thing I would be very intestered in... is there a way to get rid of the 'post-processing'...?... I can clearly see it with both your 'bio' and with the 'album art viewer' from 'spider monkey'. (exact same one, darker image, stronger constrast, less details)
Not only it's the main suspect... but I also don't like it... just like audio... I prefere my content 'clean'... :D

Now in term of comparison between 1.3.5 and 1.3.6... it would take some more actual use (not just brief testing) to know how much it improve (or not) the experience... probably better this way tough...
but to me there is something else going on... doesn't make sense that pretty much the same function... take 5 to 10 time longer with 'spider monkey'... I'm still under the impression that your script is let down by the same reason 'spider monkey' is so slow to display art...
I'm not happy about it... Love your script... but as it stand I have to go with 'JSP3' alternative... for now at least... but not without at least, trying to figure it out.
Title: Re: Biography Discussion
Post by: WilB on 2023-05-13 10:57:11
For me, jsp has had methods I require removed.

For image drawing, smp currently uses the original gdi image methods with, I believe, Direct2D support etc on the to do list.

However, I've never really had issues with the gdi methods.

Regarding 64 bit smp, there is cause for cautious optimism as there has been development work by TheQwertiest over the last few days...
Title: Re: Biography Discussion
Post by: WilB on 2023-05-13 13:11:53
New Version: Biography v1.4.0 (https://github.com/Wil-B/Biography/releases)

Release highlights
Added
- summary: ability to disable compact style and show all genres, moods composers & members
- new layout preset: "Full overlay": shows text over an album art background
- now playing display
- lyrics & now playing drop shadow effect
- advanced radio stream parser
- language support for menu (simplified and traditional Chinese)
- customisable playlist interaction for follow selected item

See changelog (https://github.com/Wil-B/Biography/blob/main/CHANGELOG.md) for more info

Current feature set and gallery (https://github.com/Wil-B/Biography)
Title: Re: Biography Discussion
Post by: kahel on 2023-05-13 13:25:40
ah... I was wrong it's not 1.3.6... :D

One factor could be the quality of image... may reveal more the performance difference.
I use relatively high quality... none embedded artwork... and show all 4 classic 'front' 'disc' 'back' 'artist' at the same time... all PNG around 4MB (more or less 3) on average... but goes as high as 15MB.
The one I tested with were not that impressive tough... PNG between 500kb and 2MB.

Anyway... with everything being equal... unfortunately, it just perform way to bad for me... too bad there is no 'easy' fix...

There is always the chance of something particular/weird going on... but I doubt it... it's direct, same condition, performance comparison... in the end...


Is the gdi methods suppose to change how image look that much? Can you confirm you get the same overall darker more constrasty rendered image?
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-05-13 13:32:45
Loading lots of images at once is cheap. Resizing is not. The bigger they are, the more CPU intensive it is. Unless scripting components add methods for resizing in worker threads, this is always going to be an issue.

edit: when I say "always an issue", I mean for those with high quality images. The vast majority of people using auto-downloads from last.fm will have no problem. The average image quality is quite low.
Title: Re: Biography Discussion
Post by: kahel on 2023-05-13 13:40:25
@marc2k3 Do you see a reason why the (same?) script (but different rendering method, maybe?)... 'album art' script would perform differently... when loaded from 'Jscript panel 3' or from 'spider monkey'... (both using the included samples)

I get very big performance difference between the two... and it impact how 'reactive' the playlist viewer is... under the exact same condition... with very basic layout and component. (x86 foobar2.0)


PS: if by resizing you mean use the 'crop (focus)' 'auto-fill' option... yeah... I do use it on all my art panel... that's even the main reason why I use alternative art panel... because the default foobar one doesn't allowed that, last time I checked.
(Another thing that could explain why WilB doesn't get the same performance penalty...)

PS2: just tried 'album art' from 'spider monkey... without the 'crop' option... and performance remains bad... no real difference... with a 10s quick check.
Same with 'Jscript Panel 3'... except the performance was already good from the start... it does 'feel' a bit better... but it may be placebo... pretty hard to spot difference under 200-300ms.
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-05-13 14:18:26
This is off topic for WIlB's bio thread. And I have zero interest in talking about a vs b. Pick whatever works best for you or create your own.
Title: Re: Biography Discussion
Post by: Air KEN on 2023-05-13 14:22:05
Error [Biography v1.4.0]
foobar2000 v2.0 32bit Default UI

Error: Spider Monkey Panel v1.6.1 ({52E7790E-3B45-47B6-B864-1C31FA230415}: Biography v1.4.0 by WilB)
include failed:
include failed:
Path does not point to a valid file: C:\Users\username\Documents\Online Soft 03\foobar2000\foobar2000 DUIE x32 '('STANDARD')'\foobar2000\profile\foo_spider_monkey_panel\package_data\{BA9557CE-7B4B-4E0E-9373-99F511E81252}\advanced_radio_stream_parser.js

File: names.js
Line: 3, Column: 1
Stack trace:
  @names.js:3:1
  readFiles@main.js:11:10
  async*@main.js:45:2

(https://i.imgur.com/KueMwRW.png)
Title: Re: Biography Discussion
Post by: paregistrase on 2023-05-13 14:25:55
New Version: Biography v1.4.0 (https://github.com/Wil-B/Biography/releases)

Release highlights
Added
- summary: ability to disable compact style and show all genres, moods composers & members
- new layout preset: "Full overlay": shows text over an album art background
- now playing display
- lyrics & now playing drop shadow effect
- advanced radio stream parser
- language support for menu (simplified and traditional Chinese)
- customisable playlist interaction for follow selected item

See changelog (https://github.com/Wil-B/Biography/blob/main/CHANGELOG.md) for more info

Current feature set and gallery (https://github.com/Wil-B/Biography)

Thanks for the full summary option.

Also the new delay load seems interesting. Time to play around to find the gold spot
Title: Re: Biography Discussion
Post by: kahel on 2023-05-13 14:31:25
This is off topic for WIlB's bio thread. And I have zero interest in talking about a vs b. Pick whatever works best for you or create your own.

I didn't meant it that way... but I guess you got a point here.

About WilB thread... I only compared against default UI and JSP3 as a baseline in term what to expect performance wise... to try to find out IF... and then Why I had performance issue while using HIS 'biography' script... only speaking about 'spider monkey' in the context that his script REQUIRE it... to run... and that 'album art' showed the exact same issue as 'biography'... but was easier to compare.
But out of context I get where you come from...

The goal isn't to compare... it's to troubleshoot an issue I have (I may suck at it tough)... and for that the best starting point was to compare different JavaScript panel... that lead to me test different things out... etc... etc... here I am trying to figure it out.

If that bothered you... no worries... sorry for the inconvenience... I only asked you since I saw you comment here... which was insightful btw... (if you were not bothered, and I took your comment the wrong way too... my bad)...

On the subject of doing it myself if I feel like it... totally agree... but part of the process of doing it itself involve looking, comparing, understanding and even discussing (with those willing)... what's already being done...
Cheers : )
Title: Re: Biography Discussion
Post by: ASopH on 2023-05-13 15:26:51
@Air KEN
for Error in SMP/Bio delete brackets in path ...
Title: Re: Biography Discussion
Post by: Air KEN on 2023-05-13 15:36:24
@ASopH
Changed folder name. It went well. Thanks.
Library-Tree-v2.4.0 is no prpblem.

(https://i.imgur.com/rSq7otg.png)
Title: Re: Biography Discussion
Post by: kutuzof on 2023-05-14 13:33:42
@Air KEN
for Error in SMP/Bio delete brackets in path ...


I don't want to rename the folder or I'll have to redo the whole layout. Maybe there is another solution? Thank you.
Title: Re: Biography Discussion
Post by: ASopH on 2023-05-14 14:05:59
Sadly no, you must wait until @WilB corrects this...  ;)
Title: Re: Biography Discussion
Post by: regor on 2023-05-15 09:09:40
Last release also breaks now playing/selection report.

It seems to happen only on startup; if I reload the panel, it works fine.
Title: Re: Biography Discussion
Post by: regor on 2023-05-15 09:27:43
Also I would add Segoe UI symbol greater than 5.00 as requirement. On win 7 your icons are not properly displayed, since you are using symbols added later. 6.23 and 6.27 work fine. Have not checked 5.81. Not sure if this is also relevant on wine, but anyway better to state the version required so people don't get mad with a present font not working.

Latest font version can be downloaded here:
https://www.stephanpringle.com/corrupted-segoe-ui-symbol-font/
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-05-15 11:15:51
Even I have the same problem, even removing the brackets from the path ...

Error: Spider Monkey Panel v1.6.1 ({392959F8-511B-4CB0-92F3-48FA5500AAF2}: Biography v1.4.0 by WilB)
include failed:
include failed:
Path does not point to a valid file: .........\foobar2000\foo_spider_monkey_panel\package_data\{BA9557CE-7B4B-4E0E-9373-99F511E81252}\advanced_radio_stream_parser.js

File: names.js
Line: 3, Column: 1
Stack trace:
  @names.js:3:1
  readFiles@main.js:11:10
  async*@main.js:45:2
Title: Re: Biography Discussion
Post by: redorb on 2023-05-18 07:01:45
New Version: Biography v1.4.0 (https://github.com/Wil-B/Biography/releases)

Release highlights
Added
- summary: ability to disable compact style and show all genres, moods composers & members
- new layout preset: "Full overlay": shows text over an album art background
- now playing display
- lyrics & now playing drop shadow effect
- advanced radio stream parser
- language support for menu (simplified and traditional Chinese)
- customisable playlist interaction for follow selected item

See changelog (https://github.com/Wil-B/Biography/blob/main/CHANGELOG.md) for more info

Current feature set and gallery (https://github.com/Wil-B/Biography)
foobar2000 v.2 (x32)
DarkOne v4 by tedgo (Devian Art)
Spider Monkey Panel v1.6.1 by TheQwertiest
JScript Biography v1.4.0 by WilB

Thanks for the new version of the one-of-a-kind Biography!
Much appreciated, works like a charm with my setup!
Kind regards and have a nice day.
Title: Re: Biography Discussion
Post by: WilB on 2023-05-18 13:21:04
There should soon be a new version that fixes the advanced_radio_stream_parser issue.

@regor
Now playing/selection report: I couldn't seem to see an issue on start up either with the new or old method. With the new method bio might send both modes, and receiver would need to determine which. In fact I almost took the selectionMode out as the notification now includes the artist and album name which seemed to me to be better things to use.

I've added Segoe UI symbol requirement as you suggested.
Title: Re: Biography Discussion
Post by: regor on 2023-05-18 18:12:12
Ehm... somehow I'm a fool. Don't know how but I replaced -without knowing- my find & play panel with a second bio panel. So yep, it was a bio panel. Just noticed it.

The crash happens with 2 bio panel after starting playback on a new track. Has not been able to find the exact steps, although changing tracks in a fast succession seems to trigger it. Other times it has happened just on normal usage, on first track I played on a session. I have not been able to crash both panels, but only once. It seems a single panel works fine.
Quote
Error: Spider Monkey Panel v1.6.1-mod ({DBD3A9AE-44BD-46F4-8733-7A4FA61B2904}: Biography v1.4.0 by WilB)
pth is undefined

File: panel.js
Line: 372, Column: 3
Stack trace:
  cleanPth@panel.js:372:3
  getList@panel.js:673:105
  on_playback_new_track@text.js:2123:27
  checkRefreshRates/this.focusLoad<@panel.js:318:27
  T@helpers.js:97:164
  w@helpers.js:97:384
  l@helpers.js:97:288

Spoiler (click to show/hide)

My other report was due to this thing. The second panel had a different selection mode, so I had biographytags notifications from the 2 panels, one contradicting the other. (I thought both came from the same panel due to a regression on last version) Solved ;)

Also you missed to remove some logging:
https://github.com/search?q=repo%3AWil-B%2FBiography%20allFiles.length&type=code
Title: Re: Biography Discussion
Post by: WilB on 2023-05-18 19:12:53
@regor

I still can't reproduce. But anyway, can you try putting the following in panel.js: line 372 to see if it fixes the issue:

Code: [Select]
if (!pth) return '';

i.e. put it at the very start of the cleanPth  function

Let me know it it all works properly.
Title: Re: Biography Discussion
Post by: regor on 2023-05-18 19:40:01
Fixed with that.
Title: Re: Biography Discussion
Post by: WilB on 2023-05-19 11:40:32
New Version: Biography v1.4.1 (https://github.com/Wil-B/Biography/releases)

Hotfix for v1.4.0

Fixed
- include issue with advanced radio stream parser
- pth handling issue

Release highlights: 1.4.x series
Added
- summary: ability to disable compact style and show all genres, moods composers & members
- new layout preset: "Full overlay": shows text over an album art background
- now playing display
- lyrics & now playing drop shadow effect
- advanced radio stream parser
- language support for menu (simplified and traditional Chinese)
- customisable playlist interaction for follow selected item

See changelog (https://github.com/Wil-B/Biography/blob/main/CHANGELOG.md) for more info

Current feature set and gallery (https://github.com/Wil-B/Biography)
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-05-19 14:26:45
BIG THX  :D

(https://i.postimg.cc/w3gn45wX/1.png) (https://postimg.cc/w3gn45wX)
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-05-19 15:06:11
I have a problem with the skin i use.

I have two Biography panels one on the right and one on the left.

In the one on the left i access the options panel.

In the right one it says "option: see console"

In console i see:

Biography: the options html dialog doesn't appear to be available with the current operating system. All settings in options are available elsewhere: 1) panel settings are in panel properties; 2) server settings that apply to all panels are in the cfg file - default settings should be fine for most users, but can be changed by careful editing in a text editor. Common settings are on the menu.

What should I do to have access to the options menu in the right panel as well.

(https://i.postimg.cc/vDCrcF08/5.png) (https://postimg.cc/vDCrcF08)
Title: Re: Biography Discussion
Post by: Defender on 2023-05-19 17:14:25
New Version: Biography v1.4.1 (https://github.com/Wil-B/Biography/releases)

Hotfix for v1.4.0

Fixed
- include issue with advanced radio stream parser
- pth handling issue


Thx!

I finally upgraded my BIO and REVIEW panels from 1.1.3 to 1.4.1. Love the Wikipedia addition plus countryflags.

Two issues:
Everytime I do something in the configuration Filmstrip is enabled again? I specifically unclicked Filmstrip in the display settings, but everytime it enables itself again and do I have to unclick it again. How can I change this behavior?

I tried to create a rule for Arrow Rock Radio (https://stream.arrowrockradio.com/arrowrockradio) which sends the artist as "Arrow Rock Radio: ARTIST" in advanced_radio_stream_parser.js but I cannot get it to work.
I finally got the biography panels to work correctly by changing the server settings for %BIO_ALBUMARTIST% (and %BIO_ARTIST%) to "$replace($if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0)),Arrow Rock Radio: ,)".
What code should I need to add to the parser file get the same result?
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-05-19 18:20:02
I have a problem with the skin i use.

I have two Biography panels one on the right and one on the left.

In the one on the left i access the options panel.

In the right one it says "option: see console"

In console i see:

Biography: the options html dialog doesn't appear to be available with the current operating system. All settings in options are available elsewhere: 1) panel settings are in panel properties; 2) server settings that apply to all panels are in the cfg file - default settings should be fine for most users, but can be changed by careful editing in a text editor. Common settings are on the menu.

What should I do to have access to the options menu in the right panel as well.

(https://i.postimg.cc/vDCrcF08/5.png) (https://postimg.cc/vDCrcF08)

Problem solved

I changed the value from 0 to 1 in Show HTLM dialog...

(https://i.postimg.cc/4HKGGjSK/Immagine-2023-05-19-191606.png) (https://postimg.cc/4HKGGjSK)

Title: Re: Biography Discussion
Post by: WilB on 2023-05-21 17:59:52
@Defender

Arrow Rock Radio

Try inserting the following in the advanced radio stream parser located in foo_spider_monkey_panel\package_data\{BA9557CE-7B4B-4E0E-9373-99F511E81252}
This should work with default title format settings (options > server settings... > title format)

Code: [Select]
case 'https://stream.arrowrockradio.com/arrowrockradio':

// artist needs stream name removing
artist = $.eval('[$trim($replace(' + (typeof cfg !== 'undefined' ? cfg.tf.artist : ppt.tfArtist) + ',Arrow Rock Radio:,))]', focus, ignoreLock);
//console.log('artist', artist);

// title is correct except it's uppercase: including here means it goes through the titlecase converter
title = (item || '').trim();
//console.log('title', title);

break;

Filmstrip display setting should be retained & I can't reproduce what you're seeing. Please provide exact steps to reproduce. Unlikely possibilities are a bad foobar2000 shutdown or theme file set to read only.
Title: Re: Biography Discussion
Post by: zeremy on 2023-05-29 21:10:23
@WilB
On a clean install of the package when the advanced radio stream.js file is created it needs \\\\

https://github.com/Wil-B/Biography/blob/main/scripts/settings.js#L1044

Code: [Select]
const kw = '(-\\\\s*|\\\\s+)\\\\d\\\\d\\\\d\\\\d';
to write
Code: [Select]
const kw = '(-\\s*|\\s+)\\d\\d\\d\\d';
to the file.
Title: Re: Biography Discussion
Post by: Defender on 2023-05-30 10:36:59
@Defender

Arrow Rock Radio

Filmstrip display setting should be retained & I can't reproduce what you're seeing. Please provide exact steps to reproduce. Unlikely possibilities are a bad foobar2000 shutdown or theme file set to read only.

Arrow:
The code for Arrow Rock Radio works perfectly. I reverted the title format strings to the default. I wonder though what happens when a track is played that actually has a name in CAPS :-)

Filmstrip:
I use two panels. One panel Image+Text (default Artist view) and one panel with Text (default Album/Track). The situation I had was that if I change in Display one of the options Image+Text, Image, Text or in Layout  one of the options Top, Right, Left, Bottom, Full, Part
as a result Filmstrip is automatically enabled everytime (which I don't want). This also happened if I did not use the menu but middleclick to change things in the layout.

Testing this (including things like Reset zoom, Reload and Reset style I somehow managed to get rid of the unwanted behavior in one of my panels. The second panel however still enables Filmstrip automatically. BTW I don't have any Custom styles anymore.

On another computer (scale 250) I do not have a problem with a returning Filmstrip. Only difference between the two computers is that on the computer where I do have this issue I have experimented with styles earlier.
Title: Re: Biography Discussion
Post by: Defender on 2023-05-30 23:48:12

Arrow Rock Radio


@WillB

All of a sudden Arrow changed their artist string once more. Code analogue to your code to fix it is:

Code: [Select]
         case 'https://stream.arrowrockradio.com/arrowrockradio':

            // artist needs stream name and other useless stuff to be removed
            artist = $.eval('[$trim($replace(' + (typeof cfg !== 'undefined' ? cfg.tf.artist : ppt.tfArtist) + ',Arrow Rock Radio:,))]', focus, ignoreLock);
            //console.log('artist', artist);
            artist = $.eval('[$trim($replace(' + (typeof cfg !== 'undefined' ? cfg.tf.artist : ppt.tfArtist) + ',PLAYING:,))]', focus, ignoreLock);
            //console.log('artist', artist);

            // title is correct except it's uppercase: including here means it goes through the titlecase converter
            title = (item || '').trim();
            //console.log('title', title);

            break;
Code: [Select]

			
Title: Re: Biography Discussion
Post by: WilB on 2023-06-05 16:23:04
@zeremy
Thanks for the feedback. I've changed it for the next version

@Defender
Thanks for the update to Arrow Rock radio

Regarding filmstrip, I've put some custom styles in my layout, but so far I haven't seen an issue. If I encounter it I'll add a fix.

In the meantime are you sure you're not inadvertently clicking layout > filmstrip > top/right/bottom/left menu item which looks fairly similar and which does auto-enable the filmstrip? You could also try clearing panel properties (backup first if you made changes you want to keep) to see if that resolves the issue.
Title: Re: Biography Discussion
Post by: TT on 2023-06-05 16:41:37
@WilB, please check my issue I've posted on my Github. Thanks!
Title: Re: Biography Discussion
Post by: Jul2323 on 2023-06-05 20:46:15
In my radio stream . The title of the song begin with :
Stream title :' .........'
Can I remove stream title to have the correct name for the lyrics and thumbs to work correctly?
Title: Re: Biography Discussion
Post by: DJ FRANK G. on 2023-06-07 21:54:21
Any way to show a custom picture for artists with "no image"???
Title: Re: Biography Discussion
Post by: Defender on 2023-06-08 19:31:06
Regarding filmstrip, I've put some custom styles in my layout, but so far I haven't seen an issue. If I encounter it I'll add a fix.

In the meantime are you sure you're not inadvertently clicking layout > filmstrip > top/right/bottom/left menu item which looks fairly similar and which does auto-enable the filmstrip?

Thcx for replying.

No, I'm not. No problem though I do not switch the layouts at all.

I use one panel default for Artist with Image+Text (Part Overlay + Dark) and the other panel default Album+Tracks with Text (Full overlay + Blend cover based, which nicely blends with the art I am displaying underneath). I just mentioned it, because  it seems to be a bug.
 
Only small issues I have are with LibTree, but I made a post about those in that topic.
Title: Re: Biography Discussion
Post by: WilB on 2023-06-08 19:49:24
@DJ FRANK G.
Stubs are normally set in foobar2000 preferences > display. Go to the artist tab and at the bottom set the stub image. They can also be set in panel properties ("Stub..."), which is checked first. If neither are set, the biography-styled stub is used

@Jul2323

Removing ' .........' with advanced radio stream parser should be doable. Filmstrip should work fine. Currently display of lyrics by biography isn't using the modifed artist and titles in such scenarios: I've added it for the next version. Then it should work fine for pre-existing lyrics, although the modifed artist and titles won't be used by lyric downloaders.

As this seems a very simple case, and assuming the artist is being correctly returned, it may work now for filmStrip + display of pre-existing lyrics in bio by changing the main title format in the title format tab, e.g. set %BIO_TITLE% to
Code: [Select]
$replace($meta(title,0), .........,)
[retains your leading space].

This is untested as I don't have the stream URL to check.
Title: Re: Biography Discussion
Post by: WilB on 2023-06-09 00:22:24
@Defender

I've still not seen the filmStrip misbehaviour. If you have a set of panel properties that always shows the issue when you do X, and the issue is retained on import of the panel properties into a new panel, then post the panel properties and I can take a look. But say what X is. You may as well post the biography.cfg as well if you do have a reproducible scenario. Otherwise I'll keep an eye open for the issue.

Also, alt + middle click toggles filmStrip on/off.
Title: Re: Biography Discussion
Post by: Defender on 2023-06-09 02:10:58
@Defender

I've still not seen the filmStrip misbehaviour. If you have a set of panel properties that always shows the issue when you do X, and the issue is retained on import of the panel properties into a new panel, then post the panel properties and I can take a look. But say what X is. You may as well post the biography.cfg as well if you do have a reproducible scenario. Otherwise I'll keep an eye open for the issue.

Also, alt + middle click toggles filmStrip on/off.

Like I said ... Not a big deal, but I understand you want no bugs :-)

In the first panel ("Artist" no issues with Filmstrip). Second panel ("Txt only Album+Track) always shows all of a sudden Filmstrip when I change anything with images (Display / Layout). Easy enough to disable Filmstrip via the rightclick menu of ALT-double middleclick.

I attached my biography.cfg. It seems as if it it shared between both biography panels I have. If you need more info please ask.

Another thing is that when there's no artist found (happens a  lot when you click on a not running radio stream) artist_stub_user.png is displayed which is actually the last successful artist. So I copied a blank (not a No Artist image since nothing is playing anyway) in the same folder where biography.cfg is located and set it to read only which solves the issue. Don't know if you knew that one but anyway it is solved.
Had the same issue in biography 1.1.3 but there it displayed the artist picture of the first group it found in YTTM\C which was artist C :-D (took me ages to find that picture and thus the folder).

I'll look into your LibTree reply a bit later today :-)

Thx for being so responsive
Title: Re: Biography Discussion
Post by: redorb on 2023-06-09 09:58:33
Thanks for Biography, a true gem for foobar2000!

My setup Win 10 x64
foobar2000 2.0 32-bit (2023-04-26) 
Layout DarkOne v4.0 by Tedgo
Spider Monkey Panel Hotfix1.6.1
WilB Biography 1.4.0

C:\Users\***\AppData\Roaming\foobar2000
Wikipedia shows up in here.
I have changed the Biography>yttm folder location to this
*:\Biography\yttm
For some reason wikipedia does not show up here, I can't figure out why?

After new install of foobar2000 2.0 32-bit a new folder got addded in C:\
C:\Users\***\AppData\Roaming\foobar2000-v2
Wikipedia shows up in here.
How do I configure and merge the new foobar2000-v2 Biography>yttm to
*:\Biography\yttm
Would also like to have wikipedia moved and to show up in new folder.

Also, is it possible to manually add images to Biography>yttm folder?
For lesser-known artists that do not appear in the biography?
Also would like to add own text about the artist.

Any info and tips highly appreciated!

Thanks and best regards,
redorb
Title: Re: Biography Discussion
Post by: WilB on 2023-06-09 10:55:58
@Defender
Quote
Second panel ("Txt only Album+Track) always shows all of a sudden Filmstrip when I change anything with images (Display / Layout)

Can you export and post the panel properties for that?
Title: Re: Biography Discussion
Post by: Defender on 2023-06-09 12:46:47
@Defender
Quote
Second panel ("Txt only Album+Track) always shows all of a sudden Filmstrip when I change anything with images (Display / Layout)

Can you export and post the panel properties for that?

Here you are ...
Title: Re: Biography Discussion
Post by: WilB on 2023-06-09 18:21:15
@redorb

Quote
Thanks for Biography, a true gem for foobar2000!
Thanks for you kind words!

Quote
Is it possible to manually add images to Biography..
You can copy custom photos into the download folder of the artist. That requires 'options > image tab > last.fm photos' disabled.

Quote
Also would like to add own text about the artist
Use menu > sources > paste text from clipboard. You may need to press shift for that menu item to show (behaviour can be changed in options > behaviour tab)

Quote
For some reason wikipedia does not show up here, I can't figure out why?
I can't see anything obvious in the parts of the path visible. But you've hidden part of the path (for obvious reasons).

Most likely reason is the path isn't entered correctly, e.g. a missing \ etc

You can check the location using the preview.

If you can't see anything, if the last.fm path works, copy it into notepad.
Then copy the wikipedia path directly underneath.
That way it can be easier to see less obvious differences.

You should just be able to copy/move yttm or subfolders, so long as folder/file structure is same.

You could also consider using the default cache, unless you have a specific reason why it's unsuitable for you. It's neat and out of the way in package_data. You may have to click hide folders on download tab to access the setting. If you let bio download a few things it will create the folders. The folder/file structure is the standard one, and so long as you haven't changed yttm subfolders, you can copy existing items in obviously omitting yttm. If you go down this route, do a few items of each type to begin with to ensure it's all working as expected.

@Defender
Thanks for the feedback. The issue seems to be related to filmstrip > overlay image area being enabled. Disabling should stop the issue (if the menu item is greyed out, change to a different layout temporarily [e.g. top]). The next version should have a proper fix.
Title: Re: Biography Discussion
Post by: Defender on 2023-06-09 20:18:26
@redorb

@Defender
Thanks for the feedback. The issue seems to be related to filmstrip > overlay image area being enabled. Disabling should stop the issue (if the menu item is greyed out, change to a different layout temporarily [e.g. top]). The next version should have a proper fix.

Yes, that solved it. Thx!
Title: Re: Biography Discussion
Post by: redorb on 2023-06-11 09:34:14
@ WilB
Thanks for the info, much appreciated!
Did some changes.
Rolled back to foobar2000 1.6.16
Updated to Biography 1.4.0
I can access allmusic, last.fm and wikipedia and the paths are correct to saving on other HDD.
This seems to solve the issue with paths.
 
When updated to foobar2000 2.0, which creates a new folder on C:, there are now two foobar folders,
foobar2000 and foobar2000 v2.
Now "my" paths to Biography, Wikipedia on other HDD no longer works and I can't figure out why.
I can access allmusic, last.fm but can't change the wikipedia path, it won't stick.
An example, Nina Simone (this works fine on foobar2000 1.6.16)
%profile% <-- change this to my path doesn't work.
C:\Users\***\AppData\Roaming\foobar2000\yttm\review\wikipedia\n\
%profile%\yttm\review\wikipedia\$lower($cut(%BIO_ALBUMARTIST%,1))
C:\Users\***\AppData\Roaming\foobar2000\yttm\biography\wikipedia\n\
%profile%\yttm\biography\wikipedia\$lower($cut(%BIO_ARTIST%,1))

This is no biggie, maybe it's foobar v2 that causes the issue?
Wondering if I really need the foobar v2 update, I'm perfectly happy with the setup I now have.
foobar2000, DarkOne4 theme and Biography looks fabulous and works great, so I guess case closed.
Thanks and best regards,
redorb
Title: Re: Biography Discussion
Post by: Defender on 2023-06-13 14:30:34
Hi WilB,

Using foobar current 2.1 x86 view with Biography 1.4.1.

Something weird. I have two streams who play fine, have the correct Bio Artist name, but cannot store the Artist image because the cycle folder it wants to store the image is illegal.

Normally the system wants to create a subfolder based on lowercase first letter of bio artist and then a folder with the artistname.
However the first character seems to be an underscore (???). If I change the cycle folder to a $cut of 2 characters the result is a 1 letter subfolder.

Streams are:
https://playerservices.streamtheworld.com/api/livestream-redirect/SUBLIME_FUNK_DISCO.mp3
https://playerservices.streamtheworld.com/api/livestream-redirect/SUBLIMESOUL.mp3

What's wrong?
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-06-13 16:10:51
Sublime, it reminded me of something:

(https://i.postimg.cc/Xr88SxSL/Screenshot-2023-06-13-170806.png) (https://postimg.cc/Xr88SxSL)

 :))
Title: Re: Biography Discussion
Post by: Defender on 2023-06-13 16:37:24
Sublime, it reminded me of something:

(https://i.postimg.cc/Xr88SxSL/Screenshot-2023-06-13-170806.png) (https://postimg.cc/Xr88SxSL)

 :))

Same same, but different ...

Would like to have an artistpic :-D
Title: Re: Biography Discussion
Post by: Defender on 2023-06-14 04:26:34
Hi WilB,

Using foobar current 2.1 x86 view with Biography 1.4.1.

Something weird. I have two streams who play fine, have the correct Bio Artist name, but cannot store the Artist image because the cycle folder it wants to store the image is illegal.

Normally the system wants to create a subfolder based on lowercase first letter of bio artist and then a folder with the artistname.
However the first character seems to be an underscore (???). If I change the cycle folder to a $cut of 2 characters the result is a 1 letter subfolder.

Streams are:
https://playerservices.streamtheworld.com/api/livestream-redirect/SUBLIME_FUNK_DISCO.mp3
https://playerservices.streamtheworld.com/api/livestream-redirect/SUBLIMESOUL.mp3

What's wrong?

UPDATE:
Apparently the %artist% and/or %album artist% tags contain non-ansi characters which are not visually displayed.

For the time being I altered the %BIO_ALBUMARTIST% to $replace($ansi($if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0))),PLAYING: ,,?,) and %BIO_ARTIST% similarly.
That solves the issue.

However I would prefer not to have this code in %BIO_ALBUMARTIST% and %BIO_ARTIST%. But I'm not handy enough to make alterations in the parser file.

Would you be so kind to give some code that does the trick in the parser file?

Thx
Title: Re: Biography Discussion
Post by: Defender on 2023-06-15 12:56:52
Hi WilB,

Using foobar current 2.1 x86 view with Biography 1.4.1.

Something weird. I have two streams who play fine, have the correct Bio Artist name, but cannot store the Artist image because the cycle folder it wants to store the image is illegal.

Normally the system wants to create a subfolder based on lowercase first letter of bio artist and then a folder with the artistname.
However the first character seems to be an underscore (???). If I change the cycle folder to a $cut of 2 characters the result is a 1 letter subfolder.

Streams are:
https://playerservices.streamtheworld.com/api/livestream-redirect/SUBLIME_FUNK_DISCO.mp3
https://playerservices.streamtheworld.com/api/livestream-redirect/SUBLIMESOUL.mp3

What's wrong?

UPDATE:
Apparently the %artist% and/or %album artist% tags contain non-ansi characters which are not visually displayed.

For the time being I altered the %BIO_ALBUMARTIST% to $replace($ansi($if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0))),PLAYING: ,,?,) and %BIO_ARTIST% similarly.
That solves the issue.

However I would prefer not to have this code in %BIO_ALBUMARTIST% and %BIO_ARTIST%. But I'm not handy enough to make alterations in the parser file.

Would you be so kind to give some code that does the trick in the parser file?

Thx

UPDATE2: The $ansi workaround is certainly not a good solution :-( It also kills all cyrillic characters. So in that case I don't get an artist name at all anymore.

UPDATE3: Apparently These Sublime stations add an invisible UTF-8 character to the artistname.

New workaround is:
%BIO_ALBUMARTIST% $replace($if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0)),PLAYING: ,,$char(65279),)
%BIO_ARTIST% $replace($if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0)),PLAYING: ,,$char(65279),)

NB. Found it because in country_codes.json the artist was written preceeded by the culprit character.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-06-23 01:03:16
Is there a reason why artist images won't update? When I initially install the package it will download the artist picture of the first track I play. But subsequent tracks from a different artist will not download.

So I keep getting photos of the same (initial) band, no matter which artist I click on.

(This happens with 1.4.1 and earlier versions)
Title: Re: Biography Discussion
Post by: Majestyk on 2023-06-23 03:14:21
Ok, I figured out the issue. It turns out this script doesn't work in portable mode. Is there a way to set it up so it can?

Another issue I'm having is Lyrics. I don't get that option on 1.4.1. I do on earlier versions.

With 1.4.1 Right click/Load  I get:

Allmusic.biography
Last.fm.biography
Wikipedia.biography
Nowplaying

With earlier versions I get:

Allmusic.biography
Last.fm.biography
Wikipedia.biography
Lyrics
Title: Re: Biography Discussion
Post by: Majestyk on 2023-06-23 05:57:50
Ok, Lyrics no longer works on any version. It only works for the first album I play after installing the package. (Sound familiar?). All subsequent albums, Lyrics won't work. This time it doesn't matter if I install portable or standard.

Why am I the only one with this issue?
Title: Re: Biography Discussion
Post by: Majestyk on 2023-06-23 07:42:53
One more comment. (I would edit everything in one post if I could).

The lyrics still doesn't work. I tried it on another PC and the same thing. The reason why it picks up lyrics when I first install was a coincidence. Some lyrics will work but only existing ones that are in my lyrics directory in appdata/foobar2000/lyrics directory.  If I delete the directory, it will not display any lyrics.

By the way, I discovered this...

Code: [Select]
Error: Spider Monkey Panel v1.6.1 ({B147439D-85D4-47B7-93C7-49B657E6F05C}: Biography v1.4.1 by WilB)
item.replace is not a function

File: text.js
Line: 1440, Column: 15
Stack trace:

Here are the steps to produce it...

In Options/Textreader & Lyrics check the 4th Lyrics Source box on the right and then at the bottom select Scroll Unsynced.

When you press OK, it will crash when you click the panel to switch to biography. If you're already on biography it will crash
right away.

Title: Re: Biography Discussion
Post by: Majestyk on 2023-06-24 02:54:56
Ok, I think I've finally seen the forest for the trees. Unlike info and images, Biography does not grab lyrics. It just displays existing lyrics or 'runs along side' an existing lyrics grabber like Open Lyrics. That would explain why there aren't any Lyric source options. :)

And no it didn't take me this long to figure it out, I figured it out after my final post last night.

I wish I could delete the above posts, although my minor quibble about this not working portable still stands. Maybe that can be remedied in the future.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-06-29 22:15:55
It's a real ghost town around here. Anyway, I reset my Foobar's preferences and now Biography works in portable mode. I have no idea which setting could have caused it to not work.

But now I've discovered another oddity. Some of the images that Biography pulls in will slow my theme down to a crawl.  Kahel has mentioned this, a couple of pages back. So for now I'm not sure what to do other than to disable images.

Title: Re: Biography Discussion
Post by: Majestyk on 2023-06-30 23:35:32
I feel like I have this whole place to myself. I might start chatting about my personal life here.

Anyway, 'just for the record', I figured out once and for all why Biography wasn't grabbing images with my portable version. It's because the title of the folder was too large. Once I shorten it, it starts working.

As for the slow speed I am experiencing, I've discovered that using User Interface (as opposed to Dark, etc) in the options makes the program twice as fast. But unfortunately, it's still too slow for me when using images.

Despite this, it's still a really well done and must-have panel for Foobar.
Title: Re: Biography Discussion
Post by: kahel on 2023-07-01 00:36:56
7 posts in a row... might be some kind of record... sorry for breaking the streak... : )

The User interface vs dark mode... is interesting, weird, but interesting. I'll double check what I'm running and if I see a performance difference.
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-07-24 14:12:59
For the next update please fix the following error:

Error: Spider Monkey Panel v1.6.1 (Biography: Biography v1.4.1 by WilB)
f is null

File: text.js
Line: 1362, Column: 23
Stack trace:
  getItemProperties/<@text.js:1362:23
  getItemProperties@text.js:1315:8
  txtReader@text.js:2374:42
  getText@text.js:1581:28
  on_size@text.js:2134:8
  on_size@callbacks.js:554:6

This error occurs when closing on a radio in playlist and then reopening the foobar skin.
Title: Re: Biography Discussion
Post by: mjm716 on 2023-07-28 22:17:34
I've tried all the tips about corrupt font etc, installed Segoe Symbol from win11 install and tried several other sources, verified Segoe Symbol in Char Map, but the rectangles remain... any ideas?

win11 (new OS) FB1.6.16 latest SMP scripts

Sorry - nevermind, it was fontawesome problem, not Segoe Symbol
Title: Re: Biography Discussion
Post by: handleyman on 2023-08-01 13:07:44
Really hope this hasn't been asked before? If so, I couldn't find it. I'm trying to get the Biogs to download to the same file without the source being appended. So, I don't want:
THREE DOG NIGHT [Lastfm Biography].txt
THREE DOG NIGHT [Allmusic Biography].txt
just
THREE DOG NIGHT.txt.

I realise one will overwrite the other but I'm not bothered about that - I just want some basic info. At the moment, the Options are set to download to:
D:\AUDIO\SongBiogs\
Any way to do this?

I'm using the latest GReborn, but with a few changes as I don't like ESLyric. It never finds what I'm looking for whereas Lyrics Show 3 is instant and finds everything, esp with foo_multisource added. The changes have also meant ('cos I don't fully understand where everything is in the newer GR releases) that I have lost the Wikipeadia search in Biog. Dunno if there's an easy way to get that back??

Many thanks for any help.

Jeff
Title: Re: Biography Discussion
Post by: regor on 2023-10-09 18:21:51
I would like to request splitting the current All Music genre tag into Genre and style tags (just like provided by the web).
The current approach loses all hierarchical info about genre/styles already provided at the source.

Also talking just the first value of the current genre tag doesn't work since some albums have multiple genres.

Display on panel could still left as is, with both mixed.
Title: Re: Biography Discussion
Post by: nikosach on 2023-10-10 21:25:20
Hi All
I need some assistance as I am not very familiar with all this.  I am using the Bio script and it works fine. thanks for that!

My QUESTION:
How can I read the file created in the yttm folder.
I mean I would like to use a simple textreader to access the file %artist% - %album%.txt 
that is saved
in %profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1))

In the txtreader i can have a custom path like $directory_path(%path%)/*.txt

HOW CAN I ACCESS THE FILE IN "%profile%\yttm\review\allmusic"?

Thanks!
Title: Re: Biography Discussion
Post by: Majestyk on 2023-10-11 05:01:24
I really like this script and I wish I could use it but it needs a tune-up.

www.youtube.com/watch?v=hl5r6Vi_-cE
Title: Re: Biography Discussion
Post by: Steve Forte Rio on 2023-10-25 22:23:51
Hi. Is there any way to use the script with foobar2000 x64? Spider Monkey Panel is not available for it
Title: Re: Biography Discussion
Post by: Majestyk on 2023-10-26 06:37:11
Sure, if you can convert it to JScript.
Title: Re: Biography Discussion
Post by: Air KEN on 2023-10-26 07:17:07
I have no knowledge, but this SKin accomplishes something similar.

La Noire foobar2000 v2.0 64-bit Columns UI theme By: Jul2323
LA NOIRE 64-bit Columns UI theme: https://hydrogenaud.io/index.php/topic,124489.0.html
Latest Download: https://hydrogenaud.io/index.php/topic,124489.msg1031503.html#msg1031503
Title: Re: Biography Discussion
Post by: Steve Forte Rio on 2023-10-26 08:47:00
Sure, if you can convert it to JScript.

I tried transpilling to ES5 with Babel and running in the latest JScript Panel but no luck yet. Maybe someone has done this already?
I'm a BE web dev, not JScript dev, so... :)
Title: Re: Biography Discussion
Post by: regor on 2023-10-26 10:52:40
Sure, if you can convert it to JScript.

I tried transpilling to ES5 with Babel and running in the latest JScript Panel but no luck yet. Maybe someone has done this already?
I'm a BE web dev, not JScript dev, so... :)
It doesn't work like that... SMP methods are totally different to JSP methods. It can not be automated, unless someone creates a transpiler for SMP/JSP, something which is not gonna happen.

I don't see anyone having any interest on going from ES6 to ES5 and then porting SMP scripts to JSP, so I would bet the answer is no xd

I see zero reason for that, just ask for a SMP x64 build, which could be done more easily.
Title: Re: Biography Discussion
Post by: Steve Forte Rio on 2023-10-26 12:42:12
just ask for a SMP x64 build, which could be done more easily.

It is still planned. For more than 6 month already. https://github.com/TT-ReBORN/Georgia-ReBORN/issues/102
Title: Re: Biography Discussion
Post by: regor on 2023-10-26 13:17:08
just ask for a SMP x64 build, which could be done more easily.

It is still planned. For more than 6 month already. https://github.com/TT-ReBORN/Georgia-ReBORN/issues/102
Well that's partially true. Planned is the V2 version which implies a total rework of the plugin, true.

But I still see no reason why a simple port to x64, from the current build, has not been offered. Which does not require 6 months for sure. So That's why I say if people ask for it, maybe it's done...
Title: Re: Biography Discussion
Post by: MaFred on 2023-10-28 10:34:19
I gave up waiting, and set up something similar with JScript Panel 3. Works for last.fm-picture, album art and biography. Can't compare to Wil-B's great biography script, of course.
Title: Re: Biography Discussion
Post by: Air KEN on 2023-10-28 11:18:09
@MaFred
I am using this.
Combines JScript Panel 3 Sample.
(Text Display, Thumbs and Last.fm Bio)

If you have the knowledge, you can probably edit it stylishly.

(https://i.imgur.com/wa0Uaxj.png)
Title: Re: Biography Discussion
Post by: Steve Forte Rio on 2023-10-31 18:29:22
@MaFred
I am using this.
Combines JScript Panel 3 Sample.
(Text Display, Thumbs and Last.fm Bio)

Could you share the script?
Title: Re: Biography Discussion
Post by: Air KEN on 2023-10-31 19:51:02
@Steve Forte Rio

 JScript Panel 3 Sample.
(Text Display, Thumbs and Last.fm Bio)

Text Display
https://foobar2000.xrea.jp/up/files/up1669.zip
Text Display+Album Art 6.txt

Text:
Text Landscape.txt
Panel right click > Custom text...
Horizontal alignment > Left
Vertical alignment > Center

No special options have been added. It's just changing the numbers.
https://hydrogenaud.io/index.php/topic,110516.msg1033718.html#msg1033718

Image size and position vary depending on panel width, height, and font size
---
Please post more in this thread.
https://hydrogenaud.io/index.php/topic,110516.msg1034640.html#msg1034640
Title: Re: Biography Discussion
Post by: Majestyk on 2023-10-31 22:09:49
Allmusic is no longer working.
Title: Re: Biography Discussion
Post by: Defender on 2023-11-07 20:27:47
Hi,

I'm a happy user of a couple of WilB scripts in my skin.
Biography (BIO), Biography (Review), Library Tree (two instances) and Find & Play.

I and some other people are running this particular skin in different windows scaling (100%, 150%, 250%, 300%).

I spent a lot of time making the skin scaling independent, but every time I make a new build of the skin for different windows scaling there's a couple of things I always have to change since the corresponding values in their respective settings are fixed values.

Row Height in ELP and ESP, which are both rather old plugins.

And as a minimum in the WilB scripts:
BIO      : Settings - Panel Settings - Display - Left=4xScale - Right=4xScale
REVIEW      : Settings - Panel Settings - Display - Left=4xScale - Right=4xScale

Find&Play   : Display - Margin=8xScale
Find&Play   : Advanced - Scrollbar - Bar Width=8xScale & Arrow Width=8xScale

LIBRARY TREE   : Advanced - Scrollbar - Bar Width=8xScale & Arrow Width=8xScale
LIBRARY TREE   : Display - Layout Metrics - Line padding tree (half of scrollbar)
LIBRARY TREE   : Album Art - Thumbnail size=Small/Mini (small in 100-150, mini 175-350)
LIBRARY TREE   : Album Art - Thumbnail padding (half of scrollbar)

Is their a way to make these values aware of the current windows scaling and automatically adjust?
Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-10 06:26:28
I really like this script and I wish I could use it but it needs a tune-up.

www.youtube.com/watch?v=hl5r6Vi_-cE

With some simple tweaks I can use this script now...

www.youtube.com/watch?v=3xOIdbxaODY
Title: Re: Biography Discussion
Post by: Defender on 2023-11-10 11:57:18
I really like this script and I wish I could use it but it needs a tune-up.

www.youtube.com/watch?v=hl5r6Vi_-cE

With some simple tweaks I can use this script now...

www.youtube.com/watch?v=3xOIdbxaODY

What do you mean with "real time"? Do you mean the screen only updates correctly when changing a track or resizing the whole window that foobar lives in?

I guess the two buttons on top are splittercode? If so, you can force initiate a screen redraw/repaint upon clicking it by first forcing all panels to be not shown and then show the ones you want to see.

Just change the standard REFRESH to something like this:
$puts(refresh,PANELSHOW:Left Panel:0;PANELSHOW:Center Panel:0;PANELSHOW:Right Panel:0;PANELSHOW:WSH_Seekbar:0;REFRESH)

Imagebutton:
Change the standard REFRESH to $get(refresh)

And then just show the panels you want to see again. All relevant panels will be shown repainted.

(And thanks for the idea to add an imagebutton in the top bar to collapse/uncollapse the bottom panel :-) )
Title: Re: Biography Discussion
Post by: Defender on 2023-11-10 13:09:01
Another method for forcing screen redraws from splittercode is the following:

This also works wonders in forcing screen repaints from splittercode for underlying panels (or in an underlying panel of an underlying panel).
Let's say your spidermonkey panel with Bio script is in a panel located in panel Left and you want to force a redraw of the Bio panel:

1) Save current x,y,w,h of Left panel
2) Then $movepanel_c(Left, 0, 0, 0, 0)
3) Then $movepanel_c(Left, x, y, w, h)
4) Then $showpanel_c(Left,1)

Gives instant redraw of Bio page without having to change a track or waiting for the autocycle within Bio.
Title: Re: Biography Discussion
Post by: TheQwertiest on 2023-11-10 13:18:21
But I still see no reason why a simple port to x64, from the current build, has not been offered. Which does not require 6 months for sure. So That's why I say if people ask for it, maybe it's done...
V1 won't have a 64bit version.
Reason is simple: I only have so much time that I can spend on my projects, thus I have to prioritize. V1 is stable enough for everyday use, so I would rather focus on finishing V2 as soon as possible.

PS: WilB, sorry for the off-topic.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-10 22:56:33
I really like this script and I wish I could use it but it needs a tune-up.

www.youtube.com/watch?v=hl5r6Vi_-cE

With some simple tweaks I can use this script now...

www.youtube.com/watch?v=3xOIdbxaODY

What do you mean with "real time"? Do you mean the screen only updates correctly when changing a track or resizing the whole window that foobar lives in?

I guess the two buttons on top are splittercode? If so, you can force initiate a screen redraw/repaint upon clicking it by first forcing all panels to be not shown and then show the ones you want to see.

Just change the standard REFRESH to something like this:
$puts(refresh,PANELSHOW:Left Panel:0;PANELSHOW:Center Panel:0;PANELSHOW:Right Panel:0;PANELSHOW:WSH_Seekbar:0;REFRESH)

Imagebutton:
Change the standard REFRESH to $get(refresh)

And then just show the panels you want to see again. All relevant panels will be shown repainted.

(And thanks for the idea to add an imagebutton in the top bar to collapse/uncollapse the bottom panel :-) )

'Real time' as in whenever the left panel changes size the Biography's image immediately changes size, which (if the image is large enough) slows every to a crawl. Now I have it so the image only changes size when the next image loads.

It has nothing to do with switch refreshing. The same image that I used in the video also slows the panel switching on Eole theme, as well.

By the way, I don't use Panel Stack Splitter.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-11 00:11:53
Here's another video I did of to illustrate the slow resizing issue with Biography. This time I used Eole and Georgia Reborn.
(Although Georgia does not exhibit any issues in normal use because the left panel always stays the same size)

www.youtube.com/watch?v=7ugP3Gn03xc
Title: Re: Biography Discussion
Post by: TT on 2023-11-11 13:29:46
About the image resizing, there are some factors to keep in mind when it comes to performance.

01. JavaScript is single-threaded and can not process various code in multi-tasking ( let's not start discussion with the web workers )
     That means, the better your single-threaded CPU performs, the faster the code execution with its task will finish.
     Here is the list: https://www.cpubenchmark.net/singleThread.html
     I would still buy AMD CPU's though because multi-threading is more important.

02. You need to keep in mind that there are a lot of heavy CPU intensive tasks going on in the background.
      For example drawing various UI elements ( in your video EOLE has two blended background images, with filmstrip images, with
      continuous lyrics refresh update and playlist, Georgia-ReBORN has beveled bars, styled buttons, rounded progress bar,
      blended background image in biography, filmstrip and playlist ). Also GDI+ is a slow and old graphics renderer.
      @TheQwertiest, has planned to implement Direct2D which would help and have better performance.

03. Performance hit also occurs depending on image size/resolution. If your CPU is old and slow, you can test and try open large
      images in Windows Photo Viewer, e.g 5 mb -10 mb images versus small images, e.g 100 kb - 500 kb images. Then cycle through
      those images and you will see the difference. So this also applies to Biography image resizing, keep in mind it also needs to
      process and finish all tasks illustrated in point 02.

---

Image resizing happens in the on_size callback. When you resize the player, numerous calls need to be executed and finished which are stacked in the queue.
For better performance, you could debounce the on_size method in images.js, like this:

Code: [Select]
	on_size() {
this.debounce = $.debounce(() => {
if (ppt.text_only) {
this.clearCovCache();
this.getFbImg();
}
if (ppt.text_only && !ui.style.isBlur && !ppt.showFilmStrip) return this.init = false;
filmStrip.logScrollPos();
this.clearCache();
if (ppt.artistView) {
if (this.init) this.artistReset();
this.getArtImg();
} else {
this.getFbImg();
if (this.init) {
this.id.albCyc = '';
this.id.curAlbCyc = '';
}
}
this.init = false;
if (ppt.img_only) panel.getList(true, true);
but.refresh(true);
}, 500);
this.debounce();
}

Try playing with various refresh rates, e.g 25, 50, 100, 250, 500, 750, 1000 ( the higher, the better performance ).
When using slow refresh rates, it will have ugly image resizing delays when resizing the player.

The best of course would be to just buy a faster CPU :P

-TT
Title: Re: Biography Discussion
Post by: halle on 2023-11-11 15:36:01
Allmusic is no longer working.

File: <main>
Line: 3911, Column: 17
Stack trace:
  Dl_allmusic_rev/this.Search@:3911:17
  Dl_allmusic_rev/this.Analyse@:3949:43
  Dl_allmusic_rev/this.on_state_change@:3904:209
  get_rev/dl_am_rev<@:3803:71
Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-11 21:55:56
About the image resizing, there are some factors to keep in mind when it comes to performance.

01. JavaScript is single-threaded and can not process various code in multi-tasking ( let's not start discussion with the web workers )
     That means, the better your single-threaded CPU performs, the faster the code execution with its task will finish.
     Here is the list: https://www.cpubenchmark.net/singleThread.html
     I would still buy AMD CPU's though because multi-threading is more important.

02. You need to keep in mind that there are a lot of heavy CPU intensive tasks going on in the background.
      For example drawing various UI elements ( in your video EOLE has two blended background images, with filmstrip images, with
      continuous lyrics refresh update and playlist, Georgia-ReBORN has beveled bars, styled buttons, rounded progress bar,
      blended background image in biography, filmstrip and playlist ). Also GDI+ is a slow and old graphics renderer.
      @TheQwertiest, has planned to implement Direct2D which would help and have better performance.

03. Performance hit also occurs depending on image size/resolution. If your CPU is old and slow, you can test and try open large
      images in Windows Photo Viewer, e.g 5 mb -10 mb images versus small images, e.g 100 kb - 500 kb images. Then cycle through
      those images and you will see the difference. So this also applies to Biography image resizing, keep in mind it also needs to
      process and finish all tasks illustrated in point 02.

---

Image resizing happens in the on_size callback. When you resize the player, numerous calls need to be executed and finished which are stacked in the queue.
For better performance, you could debounce the on_size method in images.js, like this:

Code: [Select]
	on_size() {
this.debounce = $.debounce(() => {
if (ppt.text_only) {
this.clearCovCache();
this.getFbImg();
}
if (ppt.text_only && !ui.style.isBlur && !ppt.showFilmStrip) return this.init = false;
filmStrip.logScrollPos();
this.clearCache();
if (ppt.artistView) {
if (this.init) this.artistReset();
this.getArtImg();
} else {
this.getFbImg();
if (this.init) {
this.id.albCyc = '';
this.id.curAlbCyc = '';
}
}
this.init = false;
if (ppt.img_only) panel.getList(true, true);
but.refresh(true);
}, 500);
this.debounce();
}

Try playing with various refresh rates, e.g 25, 50, 100, 250, 500, 750, 1000 ( the higher, the better performance ).
When using slow refresh rates, it will have ugly image resizing delays when resizing the player.

The best of course would be to just buy a faster CPU :P

-TT

Out of countless programs and scripts I run on my computer (i5-12400 / 32GB RAM / RX 580 8GB GPU) only Biography (when sizing large images) is slow. Heck, I can use Photoshop with videos and games running.

With my sizing tweak and display theme set to User Interface, Biography runs adequately.

I invite you to read kahel's posts on page 35. He has written about this in more depth. Fortunately, Biography runs fine on your theme because your left side never changes size.

Anyway. thanks for the info.
Title: Re: Biography Discussion
Post by: TT on 2023-11-11 22:50:18
I've forgot to tell you that you can put the whole debounce method in the Image's constructor to be sure to call it only once in on_size to improve performance:

Code: [Select]
class Images {
constructor() {
       // Put the debounce code at the end of the constructor
}
}

Code: [Select]
on_size() {
this.debounce();
}

Fortunately, Biography runs fine on your theme because your left side never changes size.
What do you exactly mean by that? You can change width or height or both at the same time so all the sizes change.

P.S So yeah, I've read the kahel's posts you pointed out and it confirms that it very well may be the slow old GDI+ ( that SMP is using )
I've mentioned at the end in point 02. JSP uses Direct2D which should have better performance of course...

-Tom
Title: Re: Biography Discussion
Post by: TT on 2023-11-11 23:13:53
Here is what GPT-4 says:

Q: Is Direct2D faster to render large images than GDI+ ?

A: Yes, Direct2D is generally faster and more efficient at rendering large images than GDI+.

GDI+ is an older API and while it can still be useful for simple 2D graphics, it doesn't take full advantage of modern graphics hardware. GDI+ primarily uses the CPU for rendering, which can be slower and less efficient, especially for large and complex images.

On the other hand, Direct2D is a newer, hardware-accelerated API. It uses the GPU for rendering, which can handle large and complex images more efficiently. Direct2D is designed to work well with other Direct family APIs like Direct3D, and it supports more advanced features like shader effects.

However, the speed advantage of Direct2D may not be noticeable for simple graphics or small images. The difference becomes more apparent when dealing with larger images, complex drawing operations, or when you need to take advantage of the advanced features Direct2D offers.

---

It would be great to do a comparison between GDI+ and Direct2D but we have to wait until TheQwertiest has implemented and
released it in SMP v2.

-Tom
Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-11 23:33:04
Here is another window resizing comparison. Wil-B vs kgena_ua.

www.youtube.com/watch?v=C7huUT6Q0bk

Of course, Wil'B's Bio is constantly resizing the image to its proper aspect ratio with each movement of the window. kgena_ua's Bio does not do this, and I don't know of any other script (except for Wil-B's Library) that does this.

My 'winner' comment at the end of the video does not imply that I like kgena_ua's Bio better.

Edit: "and I don't know of any other script (except for Wil-B's Library) that does this." - This could be an inaccurate comment. (Still processing all this stuff)
Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-11 23:36:23
I've forgot to tell you that you can put the whole debounce method in the Image's constructor to be sure to call it only once in on_size to improve performance:

Code: [Select]
class Images {
constructor() {
       // Put the debounce code at the end of the constructor
}
}

Code: [Select]
on_size() {
this.debounce();
}

Fortunately, Biography runs fine on your theme because your left side never changes size.
What do you exactly mean by that? You can change width or height or both at the same time so all the sizes change.

P.S So yeah, I've read the kahel's posts you pointed out and it confirms that it very well may be the slow old GDI+ ( that SMP is using )
I've mentioned at the end in point 02. JSP uses Direct2D which should have better performance of course...

-Tom


Ok, got it. Thanks again for your info. I'll try the debounce thing and report back if there is any improvement.
Title: Re: Biography Discussion
Post by: TT on 2023-11-12 01:34:18
The video comparison is not really fair, try to disable filmstrip and use the Biography's default theme "User Interface", i.e no blending.
( The blending, bio themes "Dark", "Blend", "Light", "Random" are complex and CPU intensive ).
You will see the resizing performance is much better when you're using the default settings, because it does not need to calculate
the large blended background image, the filmstrip thumbnails and the large image itself.

Drawing blended backgrounds/images ( basically blends the large image in the background ), gradients, fast refresh rates, etc
hits on the performance. It also depends how many UI elements have these styles that need to be constantly drawn.
I know this from experience when I've created the many theme presets in Georgia-ReBORN, the performance will become even
worse when the window size becomes larger and larger. 4K res hits even harder.
But if you have a decent CPU, even a 4K res player size with different styles should not be a problem because you listen to music
and do not constantly resize your player all the time...

You can also check and test for yourself, I have implemented various Georgia-ReBORN performance presets depending
on CPU speed. If you want to stress test your CPU, try top menu Options > Settings > Theme performance > Highest quality.
This preset was intended only for benchmark on very high end CPUs, it hits really hard if additionally using a blended
preset, for example top menu Options > Preset > Reborn > Blended and now also go to the Details panel.
When using slow and decent CPUs, foobar will become unresponsive. To make it responsive again, click the foobar pause button
when mouse hovering on your desktop taskbar.
Then you can right click on the progress bar and change refresh rate to 60 or 100 ms, disable disc art opacity etc.
Or just change to high/balanced performance preset. As you see, it all depends on various operations how complex drawing is...

So all in all, I still blame the poor performance of GDI+ when drawing complex elements and large images.

-Tom
Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-12 05:19:25
The video comparison is not really fair, try to disable filmstrip and use the Biography's default theme "User Interface", i.e no blending.
( The blending, bio themes "Dark", "Blend", "Light", "Random" are complex and CPU intensive ).
You will see the resizing performance is much better when you're using the default settings, because it does not need to calculate
the large blended background image, the filmstrip thumbnails and the large image itself.

Drawing blended backgrounds/images ( basically blends the large image in the background ), gradients, fast refresh rates, etc
hits on the performance. It also depends how many UI elements have these styles that need to be constantly drawn.
I know this from experience when I've created the many theme presets in Georgia-ReBORN, the performance will become even
worse when the window size becomes larger and larger. 4K res hits even harder.
But if you have a decent CPU, even a 4K res player size with different styles should not be a problem because you listen to music
and do not constantly resize your player all the time...

You can also check and test for yourself, I have implemented various Georgia-ReBORN performance presets depending
on CPU speed. If you want to stress test your CPU, try top menu Options > Settings > Theme performance > Highest quality.
This preset was intended only for benchmark on very high end CPUs, it hits really hard if additionally using a blended
preset, for example top menu Options > Preset > Reborn > Blended and now also go to the Details panel.
When using slow and decent CPUs, foobar will become unresponsive. To make it responsive again, click the foobar pause button
when mouse hovering on your desktop taskbar.
Then you can right click on the progress bar and change refresh rate to 60 or 100 ms, disable disc art opacity etc.
Or just change to high/balanced performance preset. As you see, it all depends on various operations how complex drawing is...

So all in all, I still blame the poor performance of GDI+ when drawing complex elements and large images.

-Tom


Although I haven't really delved into your options, I have no performance issues with your Georgia theme. I just used your theme, in the first window resizing test, as example. Everyone runs these themes full screen,
so hardly anyone is going to be dragging windows like that

You are correct about disabling blending, and I forgot to kill the filmstrip.  It does speed things up. If I were to rate the scaling of Wil-B's Biography with blending and filmstrip ON, I'd give it a 2/10. With blending and filmstrip OFF, I'd say more like 6/10. With my tweak (which is necessary for my theme, with the panel switching), I'd give it a 10/10...even with blending and filmstrip on.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-12 06:05:43
One more time, with with filmstrip and blending OFF. Plus my 'tweak' version. (It's not much of a tweak, really)

www.youtube.com/watch?v=phaK3iFr3ng
Title: Re: Biography Discussion
Post by: TheQwertiest on 2023-11-13 17:31:42
let's not start discussion with the web workers
It should be mentioned though, that it's highly likely, that webworker support in v2 would be implemented before direct2d =)
Reasoning: direct2d is faster, but it could be still slow in some cases (e.g. loading image from disk or internet). Off-loading time-intensive tasks from the main thread would solve this problem for every type of graphic backend (and for non graphics tasks as well).
Title: Re: Biography Discussion
Post by: TT on 2023-11-13 18:33:06
@TheQwertiest,

OK, if SMP can provide it, we will gladly take it!

SMP v2 sounds more and more promising BUT I have big fears that we need to rewrite big portions of our scripts
cause of compatibility!? I hope that is not the case and we need to adjust only some things here and there...
The big question is the release date, people are getting a bit impatient and are SO HOT and HUNGRY for it =)
Please do some more small status updates in the SMP thread to inform us a little bit, thanks!

-Tom
Title: Re: Biography Discussion
Post by: K59638586 on 2023-11-13 21:28:49
What is the best/easiest way to disable the filmstrip in WilB's biography script?
Title: Re: Biography Discussion
Post by: TT on 2023-11-13 22:02:01
What is the best/easiest way to disable the filmstrip in WilB's biography script?

The fastest way would be Alt + mouse wheel click
or
right click in the Biography panel > Display > Filmstrip.

-TT
Title: Re: Biography Discussion
Post by: K59638586 on 2023-11-13 22:13:45
Perfect! Thanks!
Title: Re: Biography Discussion
Post by: mygen on 2023-11-17 18:56:54
Hi everyone

I have problem with dowloading picture from last.fm on bioghrapy 1.4.1. I don't know why.

I using DarkOne4Mod v1.0 (SMP). Before picture was downloading.

Maybe you have idea what i should to do or what check on settings?

In attachement few screenshot from my settings.

Thx for help.

Title: Re: Biography Discussion
Post by: Majestyk on 2023-11-22 06:40:47
Hi everyone

I have problem with dowloading picture from last.fm on bioghrapy 1.4.1. I don't know why.

I using DarkOne4Mod v1.0 (SMP). Before picture was downloading.

Maybe you have idea what i should to do or what check on settings?

In attachement few screenshot from my settings.

Thx for help.



Last.fm with Biography 1.41 works fine for me.

Have you tried mainstream artists?
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-11-22 09:56:58
The issue is probably related to the redirect (see last.fm web site screenshot).

I guess the url could be formed like this...

Code: [Select]
https://last.fm/music/+noredirect/ARTIST_NAME/+images
Title: Re: Biography Discussion
Post by: mygen on 2023-11-23 18:56:18
The issue is probably related to the redirect (see last.fm web site screenshot).

I guess the url could be formed like this...

Code: [Select]
https://last.fm/music/+noredirect/ARTIST_NAME/+images


for example artist Aly & Fila (from url last.fm web)
https://www.last.fm/pl/music/Aly+&+Fila/+images/c8d2c8e493bf4235b61977cd8fb8d3fa

Can you explain what means or what i must do with this code which you write?
Title: Re: Biography Discussion
Post by: mygen on 2023-11-25 18:48:02
I make a test and install virtualbox and put foobar and work well. I have artist image. I think it is something which block dowloading image but i dont know where i must search issue.
Title: Re: Biography Discussion
Post by: srdn on 2023-11-26 19:34:00
I have some problem with download artist pic from lastfm and download review from allmusic
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-11-28 15:28:47
Allmusic hasn't worked in a few weeks now. Inspecting the website html in the browser doesn't show the review text at all so scripts like this can't scrape it. Pretty sure nothing can be done about that.
Title: Re: Biography Discussion
Post by: srdn on 2023-11-28 16:36:55
Allmusic hasn't worked in a few weeks now. Inspecting the website html in the browser doesn't show the review text at all so scripts like this can't scrape it. Pretty sure nothing can be done about that.
Lastfm picture downloader broke too?
Title: Re: Biography Discussion
Post by: regor on 2023-11-28 18:57:21
Reviews appear fine on my browser, but the dropdown uses javascript
https://www.allmusic.com/album/nowhere-to-go-but-up-mw0004132140#review

No idea if that link also works on xmlhttp requests though. Inspecting the js dropdown, it reads a variable on cookies.. which can be used as query too.
https://www.allmusic.com/album/mag-earwhig!-mw0000019690?autotune=false

That seems to load the entire page with reviews.

For user reviews, only checks for the URL hash this way:
Code: [Select]
...
  if (!0 === t.scroll && (window.location.hash = "userReviews"), !i.next().hasClass("tabContent")) {
...
https://www.allmusic.com/album/mag-earwhig!-mw0000019690?autotune=false#userReviews
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-11-29 09:28:28
When I said "inspect the website html" I meant right click the page and view source. That is html. That's what scripts see and they can only parse that.

Since I've forgotten to use xmlhttp objects and can't be bothered to trawl old code looking for it, I'll post an example for JScript Panel 3 only......
Code: [Select]
var url = "https://www.allmusic.com/album/nowhere-to-go-but-up-mw0004132140#review";

// second arg 0 means GET request
utils.HTTPRequestAsync(window.ID, 0, url); // returns a task_id but we don't need it here

function on_http_request_done(task_id, success, response) {
   if (success) utils.ShowPopupMessage(response);
   else utils.ShowPopupMessage("FAIL :/");
}

If you can find the review text in that response, you win a prize.

Title: Re: Biography Discussion
Post by: marc2k3 on 2023-11-29 09:30:57
Lastfm picture downloader broke too?

Nope.
Title: Re: Biography Discussion
Post by: regor on 2023-11-29 09:52:39
Wonder what have I won:
Album:
https://www.allmusic.com/album/mag-earwhig!-mw0000019690
Review:
https://www.allmusic.com/album/mag-earwhig!-mw0000019690/reviewAjax
User review:
https://www.allmusic.com/album/mag-earwhig!-mw0000019690/userReviewsAjax

Code: [Select]
function onStateChange(timer, resolve, reject, func = null) {
if (this !== null && timer !== null) { // this is xmlhttp bound
if (this.readyState === 4) {
clearTimeout(timer); timer = null;
if (this.status === 200) {
if (func) {return func(this.responseText);}
else {resolve(this.responseText);}

} else {
if (!func) {reject({status: this.status, responseText: this.responseText});}
}
}
} else if (!func) {reject({status: 408, responseText: this.responseText})}; // 408 Request Timeout
return null;
}

// May be used to async run a func for the response or as promise
function send({method = 'GET', URL, body = void(0), func = null, requestHeader = [/*[header, type]*/], bypassCache = false}) {
const p = new Promise((resolve, reject) => {
let timer = null;
const xmlhttp = new ActiveXObject('Microsoft.XMLHTTP');
// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#bypassing_the_cache
// Add ('&' + new Date().getTime()) to URLS to avoid caching
xmlhttp.open(
method,
URL + (bypassCache
? (/\?/.test(URL) ? '&' : '?') + new Date().getTime()
: '')
);
requestHeader.forEach((pair) => {
if (!pair[0] || !pair[1]) {console.log('HTTP Headers missing: ' + pair); return;}
xmlhttp.setRequestHeader(...pair);
});
if (bypassCache) {
xmlhttp.setRequestHeader('Cache-Control', 'private');
xmlhttp.setRequestHeader('Pragma', 'no-cache');
}
timer = setTimeout((xmlhttp) => {
xmlhttp.abort();
timer = null;
if (!func) { // 408 Request Timeout
let status = 408;
try {status = xmlhttp.status;} catch(e) {}
reject({status, responseText: 'Request Timeout'});
}
}, 30000, xmlhttp);
xmlhttp.onreadystatechange = onStateChange.bind(xmlhttp, timer, resolve, reject, func);
xmlhttp.send(method === 'POST' ? body : void(0));
});
return p;
}


send({method: 'GET', URL: "https://www.allmusic.com/album/mag-earwhig!-mw0000019690/reviewAjax", func: fb.ShowPopupMessage.bind(fb)});

X
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-11-29 09:57:31
Congratulations. Your prize is submitting a pull request to WilB's github repo which fixes it. :P
Title: Re: Biography Discussion
Post by: regor on 2023-11-29 10:21:19
 :))
Not going to touch biography code unless I wanna spend an entire day to get what's going on, just to find the single line of code to build an URL xd Also it probably needs somre rework to properly parse the new source.
Have enough on my side, not gonna happen.

Maybe TT wants to do it, who has done some work before on Wil-B's cripts.
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-11-29 11:29:20
Appending reviewAjax isn't entirely reliable. This url has a review...

https://www.allmusic.com/album/desire-i-want-to-turn-into-you-mw0003879034

but this is no good.

https://www.allmusic.com/album/desire-i-want-to-turn-into-you-mw0003879034/reviewAjax

The success rate is probably 20-30% on a handful of albums I've tested so far.

edit: must admit, not tried setting headers yet. I'll test that later.

Title: Re: Biography Discussion
Post by: regor on 2023-11-29 12:39:37
That's pretty weird yep.
The code is clear about using that though, for any album (and tab)
Also checked the fullURLWithPath variable, and it's the same than the on found at  the original URL.
Code: [Select]
function(e, t = {
  scroll: !0,
  toggle: !0
}) {
  let i = $(this);
  if (!0 === t.scroll && (window.location.hash = "review"), !i.next().hasClass("tabContent")) {
    let e = protocol + urlSubdomain + ".allmusic.com" + fullURLWithPath + "/reviewAjax";
    $('<div class="tabContent review"><div class="loading"></div></div>').insertAfter(this), fetch(e, {
      cache: "no-store"
    }).then((function(e) {
      return e.text()
    })).then((e => {
      document.querySelector(".tabContent.review").innerHTML = e, "no-scroll" === scroll_v7 && ramp.que.push((function() {
        ramp.addUnits([{
          selectorId: "reviewLB",
          type: "leaderboard_btf"
        }]).then((() => {
          ramp.displayUnits()
        }))
      }))
    }))
  }
  handleTabClick(i, t), setActiveSidebarNavItem("review")
}

So it must be something related to the fetch part yep.
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-11-30 13:10:44
Had another look just now and setting a Referer header seems to solve it. I just use https://allmusic.com

While I'm at it, I thinking setting a fake browser as the User-Agent won't hurt either.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-01 00:03:20
You might want to also look at this code (below) that I found in a search. It has references to allmusic, reviewAjax, referer header. Maybe it will give you some more ideas and save you time.

https://greasyfork.org/en/scripts/389583-red-ops-upload-assistant/code

Title: Re: Biography Discussion
Post by: marc2k3 on 2023-12-01 09:21:45
I'd already fixed my implementation when I posted yesterday. It's now in the latest release of JSP3.

I can't use modern javascript and my internet access is done via methods built in to my component. Setting headers is like nothing you'd see in anyone else's code.

I think even SMP scripters are stuck using antiquated activex objects for web access/parsing html so I'm not sure if looking at that would help them either??
Title: Re: Biography Discussion
Post by: regor on 2023-12-01 12:38:46
Setting headers is trivial with the code I put, but there is a huge problem using activeX.

Referer can not be set due to Miscrosoft policies on MSXML2.ServerXMLHTTP.
https://stackoverflow.com/questions/7980911/vba-serverxmlhttp-and-request-header-referer
https://www.autohotkey.com/boards/viewtopic.php?t=9554

So this still retrieve the 404 error.
Code: [Select]
send({
    method: 'GET',
    bypassCache: true,
    requestHeader: [['referer', 'https://www.allmusic.com/album/mag-earwhig!-mw0000019690'],  ['cache', 'no-store'], ['user-agent', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36']],
    URL: "https://www.allmusic.com/album/mag-earwhig!-mw0000019690/reviewAjax"
})

That means SMP needs an update to make this work, some kind of other activeX, or BIography will have to make use of 'curl.exe' to retrieve data.
Title: Re: Biography Discussion
Post by: regor on 2023-12-08 20:36:37
Working sample. 'WinHttp.WinHttpRequest.5.1'
Title: Re: Biography Discussion
Post by: regor on 2023-12-20 19:17:47
Just in case people have not noticed it at the forums, it has already been fixed and Allmusic working fine :)
https://github.com/Wil-B/Biography/releases/tag/v1.4.2
Quote

Biography v 1.4.2 Latest
@Wil-B Wil-B released this 13 Dec 16:09
v1.4.2
4ca106b
Fixed

    AllMusic (thx to @regorxxx)
    Various other issues

Added

    scrollbar: new options (behaviour tab > scroll)
        windows dark mode scrollbar // has to be manually enabled as SMP isn't dark mode aware
        rounded thumb gripper

See the changelog for full info
Title: Re: Biography Discussion
Post by: chamuco on 2023-12-20 21:10:57
Just in case people have not noticed it at the forums, it has already been fixed and Allmusic working fine :)
https://github.com/Wil-B/Biography/releases/tag/v1.4.2
Quote

Biography v 1.4.2 Latest
@Wil-B Wil-B released this 13 Dec 16:09
v1.4.2
4ca106b
Fixed

    AllMusic (thx to @regorxxx)
    Various other issues

Added

    scrollbar: new options (behaviour tab > scroll)
        windows dark mode scrollbar // has to be manually enabled as SMP isn't dark mode aware
        rounded thumb gripper

See the changelog for full info

Panel crashes when clicking confirm dialog for tagging files. Anyone else?

Code: [Select]
locale[i] is undefined

File: tagger.js
Line: 294, Column: 11
Stack trace:
  write@tagger.js:294:11
  continue_confirmation@settings.js:655:16
  confirm@popupbox.js:13:9
  setTag@settings.js:660:61
  func@menu.js:561:21
  run@menu.js:112:30
  load@menu.js:98:8
  rbtn_up@menu.js:1054:8
  on_mouse_rbtn_up@callbacks.js:250:6
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-22 09:35:05
With 1.4.2 I sometimes get a crash on exit, I've never had that happen with Biography before. Also, for a few artists (so far) Bio images won't download. But they will on 1.4.1.
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-12-22 09:47:56
If you have problems with specific artists, you should list a few.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-22 10:34:59
I think it's random. But two that I can think of were Smashing Pumpkins and Simon and Garfunkel,. They download just fine with 1.4.1 and they probably will download fine for some people using 1.4.2.

By the way, when I delete the folders they still won't download.

Edit: Found another one that won't download: Crosby, Stills, Nash & Young.
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-12-22 12:50:52
It's probably redirects. If you browse the website, Smashing Pumpkins goes to The Smashing Pumpkins and Simon and Garfunkel goes to Simon & Garfunkel.

I have no idea why the previous version works. That's for WilB/other SMP users to figure out. :P

edit: it may be possible to inspect the reponse headers and get the correct url. It's something I need to do to improve the behaviour in my own JScript Panel 3 component. I guess it should be possible with whatever ActiveX object this SMP script uses too.
Title: Re: Biography Discussion
Post by: srdn on 2023-12-22 15:15:29
I think it's random. But two that I can think of were Smashing Pumpkins and Simon and Garfunkel,. They download just fine with 1.4.1 and they probably will download fine for some people using 1.4.2.

By the way, when I delete the folders they still won't download.

Edit: Found another one that won't download: Crosby, Stills, Nash & Young.
In my fb download images for artist:Smashing Pumpkins
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-12-22 22:32:01
I really couldn't bothered to test it earlier but having tried it just now, it appears fine. Ignore my posts about redirects. :P
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-23 03:26:58
Well after doing some more investigating, those same titles (plus more) are not loading on 1.4.1 either.

Now here's the weird thing: As far as 1.4.1 goes, all the artist photos load fine on my Darkone tweak theme, which uses a custom path,...pretty much the same as Georgia Reborn. (Haven't converted 1.4.2 to custom path yet)

But the loading issue with certain artists persists when Biography is installed via the package manager. And yes, I saw srdn's post above.

Furthermore, I have not been getting the crash on exit today.

Strange.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-23 10:55:49
I figured out the issue. It's sort of like the 'bracket bug' that I discovered with both Biography and Georgia Reborn, which were both fixed by the authors.

The problem is the paths are too long, depending of course on where your theme resides. My test themes lie in a number of sub folders. The one test theme, which has Bio installed via the package manager, is the one that gives me problems. The other resides in the same folder but it has custom paths which are much shorter.

The reason only some artist were giving me issues is because of the number of characters in their names. For example, The Alan Parsons Project would not download images, but Alan Parsons would download the images.

So there you have it.

Title: Re: Biography Discussion
Post by: mygen on 2023-12-25 12:08:32
Hi everyone and Marry Xmas  :)

I still fight with my DarkOne4Mod v1.0 (SMP) - fb2k v2.1 (Kutuzov edition) - portable. My Biography dont download artist photo. Now is 1.4.2 but with 1.4.1 was this same problem. I read posts which was write befere my. I dont have idea what should do more. Nothing help.

I install fresh copy foobar 2.1 and put JSP3 set Last.fm Bio + Images and photo are downloading without problem.

Someone have idea what can be a problem or what i should have change on settings etc? to starting dowloading photo on DakrOne4Mode.
Title: Re: Biography Discussion
Post by: srdn on 2023-12-25 13:46:29
Hi everyone and Marry Xmas  :)

I still fight with my DarkOne4Mod v1.0 (SMP) - fb2k v2.1 (Kutuzov edition) - portable. My Biography dont download artist photo. Now is 1.4.2 but with 1.4.1 was this same problem. I read posts which was write befere my. I dont have idea what should do more. Nothing help.

I install fresh copy foobar 2.1 and put JSP3 set Last.fm Bio + Images and photo are downloading without problem.

Someone have idea what can be a problem or what i should have change on settings etc? to starting dowloading photo on DakrOne4Mode.
Possible long file path. Try to move foobar2000 folder into root of drive
Title: Re: Biography Discussion
Post by: marc2k3 on 2023-12-25 17:05:36
Might be. JSP3's root folder structure is...

Code: [Select]
profile-path\js_data\artists\ARTIST

SMP Bios is

Code: [Select]
profile-path\foo_spider_monkey_panel\package_data\{BA9557CE-7B4B-4E0E-9373-99F511E81252}\biography-cache\art_img\FIRST_LETTER\ARTIST

Amusingly (or not), SMP just crashed on shutdown for me (not a script error but a proper component crash). I can't remember the last time I saw that happen. :P
Title: Re: Biography Discussion
Post by: mygen on 2023-12-25 18:00:22
Hi everyone and Marry Xmas  :)

I still fight with my DarkOne4Mod v1.0 (SMP) - fb2k v2.1 (Kutuzov edition) - portable. My Biography dont download artist photo. Now is 1.4.2 but with 1.4.1 was this same problem. I read posts which was write befere my. I dont have idea what should do more. Nothing help.

I install fresh copy foobar 2.1 and put JSP3 set Last.fm Bio + Images and photo are downloading without problem.

Someone have idea what can be a problem or what i should have change on settings etc? to starting dowloading photo on DakrOne4Mode.
Possible long file path. Try to move foobar2000 folder into root of drive

I do this. Copy foobar folder in to root hard disk. No efect. Still not downloading photo.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-25 22:06:10
In addition to long file path, make sure there are no brackets in your folder names, if you're running portable. I know there was a fix for this posted on GitHub but I don't know if the fix was implemented in 1.4.2.
Title: Re: Biography Discussion
Post by: mygen on 2023-12-26 12:20:21
In addition to long file path, make sure there are no brackets in your folder names, if you're running portable. I know there was a fix for this posted on GitHub but I don't know if the fix was implemented in 1.4.2.
@Majestyk
My path folder look like:

Main location of foo
e:\Portable\DarkOne4Mod v1.0 (SMP)\foobar2000\
image
e:\Portable\DarkOne4Mod v1.0 (SMP)\foobar2000\yttm\art_img\
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-26 12:23:15
Try it without the brackets in SMP.

e:\Portable\DarkOne4Mod v1.0 SMP\foobar2000\
Title: Re: Biography Discussion
Post by: mygen on 2023-12-26 13:18:34
Try it without the brackets in SMP.

e:\Portable\DarkOne4Mod v1.0 SMP\foobar2000\
I remove brackets and nothig. Still without effect.
Title: Re: Biography Discussion
Post by: redorb on 2023-12-26 15:39:27
Try it without the brackets in SMP.

e:\Portable\DarkOne4Mod v1.0 SMP\foobar2000\
I remove brackets and nothig. Still without effect.
@ mygen
I can feel your frustration...

I don't know if this will help you but these are the "WilB JScript Biography 1.4.2" paths on my foobar 2000 2.1 (x86) DarkOne v.4 theme.
Not portable foobar 2000 (C:\Program Files (x86)\foobar2000) and all lyrics, texts, and images are saved to other hdd.
Works like a charm!

Best regards and Happy Holidays,
redorb

Code: [Select]
*hdd* = your drive.

*hdd*:\--=
*hdd*:\--=\Biography
*hdd*:\--=\Biography\yttm
*hdd*:\--=\Biography\yttm\art_img
*hdd*:\--=\Biography\yttm\bio_supplemental
*hdd*:\--=\Biography\yttm\bio_supplemental\rev_img
*hdd*:\--=\Biography\yttm\bio_supplemental\review
*hdd*:\--=\Biography\yttm\biography
*hdd*:\--=\Biography\yttm\biography\allmusic
*hdd*:\--=\Biography\yttm\biography\lastfm
*hdd*:\--=\Biography\yttm\rev_img
*hdd*:\--=\Biography\yttm\review
*hdd*:\--=\Biography\yttm\review\allmusic
*hdd*:\--=\Biography\yttm\review\lastfm
*hdd*:\--=\Biography\yttm\biography\wikipedia
*hdd*:\--=\Biography\yttm\review\wikipedia
Title: Re: Biography Discussion
Post by: mygen on 2023-12-26 19:14:25
Try it without the brackets in SMP.

e:\Portable\DarkOne4Mod v1.0 SMP\foobar2000\
I remove brackets and nothig. Still without effect.
@ mygen
I can feel your frustration...

I don't know if this will help you but these are the "WilB JScript Biography 1.4.2" paths on my foobar 2000 2.1 (x86) DarkOne v.4 theme.
Not portable foobar 2000 (C:\Program Files (x86)\foobar2000) and all lyrics, texts, and images are saved to other hdd.
Works like a charm!

Best regards and Happy Holidays,
redorb

Code: [Select]
*hdd* = your drive.

*hdd*:\--=
*hdd*:\--=\Biography
*hdd*:\--=\Biography\yttm
*hdd*:\--=\Biography\yttm\art_img
*hdd*:\--=\Biography\yttm\bio_supplemental
*hdd*:\--=\Biography\yttm\bio_supplemental\rev_img
*hdd*:\--=\Biography\yttm\bio_supplemental\review
*hdd*:\--=\Biography\yttm\biography
*hdd*:\--=\Biography\yttm\biography\allmusic
*hdd*:\--=\Biography\yttm\biography\lastfm
*hdd*:\--=\Biography\yttm\rev_img
*hdd*:\--=\Biography\yttm\review
*hdd*:\--=\Biography\yttm\review\allmusic
*hdd*:\--=\Biography\yttm\review\lastfm
*hdd*:\--=\Biography\yttm\biography\wikipedia
*hdd*:\--=\Biography\yttm\review\wikipedia
Can you put some screenshot to better uderstood for me?
Title: Re: Biography Discussion
Post by: mygen on 2023-12-26 21:16:55
@redorb i do this like you write and WORKING !!!  Thank You very much. Probably i don't uderstand how its work but work :)

And one question - bio supplemental if for what?

*hdd*:\--=\Biography\yttm\bio_supplemental
*hdd*:\--=\Biography\yttm\bio_supplemental\rev_img
*hdd*:\--=\Biography\yttm\bio_supplemental\review

Happy New Year 2024
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-27 01:12:33
I know this doesn't help but I just tried the latest kutuzof Darkone with Biography 1.4.1 and it works fine for me.

I didn't need to change paths/settings or anything, it just worked on startup.
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-12-27 10:38:15
After updating to:

https://github.com/Wil-B/Biography/releases/tag/v1.4.2

when I exit foobar2000, it crashes:

Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-27 13:02:53
I had that same problem on the first day I installed it, then it mysteriously went away and I haven't had a crash since.
Title: Re: Biography Discussion
Post by: yeyo on 2023-12-27 13:13:26
After updating to:

https://github.com/Wil-B/Biography/releases/tag/v1.4.2

when I exit foobar2000, it crashes:



I'm having the same problem.
Title: Re: Biography Discussion
Post by: redorb on 2023-12-27 15:14:17
@redorb i do this like you write and WORKING !!!  Thank You very much. Probably i don't uderstand how its work but work :)

And one question - bio supplemental if for what?

*hdd*:\--=\Biography\yttm\bio_supplemental
*hdd*:\--=\Biography\yttm\bio_supplemental\rev_img
*hdd*:\--=\Biography\yttm\bio_supplemental\review

Happy New Year 2024
I'm glad it worked out for you!

That's a very good question and I really don't know how and why the paths and folders therein were created.
In rev_img folder 2 subfolders named m and v, in m folder an artist image of Moondog.jpg and in folder v an artist image of Vieux Farka Toure - Vieux Farka Touré.jpg
In review folder 2 subfolders named allmusic and lastfm, in both these folders 2 subfolders, v and m, text files with Album Ratings and Top Tags of Moondog and Vieux Farka Toure.
And I have no idea how they got there... a bit of a mystery and I like mysteries so I just left them there. :)

Happy New Year 2024
Title: Re: Biography Discussion
Post by: yeyo on 2023-12-28 01:58:50
I had that same problem on the first day I installed it, then it mysteriously went away and I haven't had a crash since.

The “init” in line 446 of the server.js file causes the program to exit and crash. It will not crash after changing to “search”.
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-28 04:04:06
I had that same problem on the first day I installed it, then it mysteriously went away and I haven't had a crash since.

The “init” in line 446 of the server.js file causes the program to exit and crash. It will not crash after changing to “search”.

Allmusic doesn't work if you do that. It will show if you already have it downloaded before making the change, but it will not download after making the change.
Title: Re: Biography Discussion
Post by: yeyo on 2023-12-28 04:20:40
I had that same problem on the first day I installed it, then it mysteriously went away and I haven't had a crash since.

The “init” in line 446 of the server.js file causes the program to exit and crash. It will not crash after changing to “search”.

Allmusic doesn't work if you do that. It will show if you already have it downloaded before making the change, but it will not download after making the change.
This is a temporary solution to deal with the crash and will have to wait for WilB to follow up on it
Title: Re: Biography Discussion
Post by: Majestyk on 2023-12-28 05:18:25
I doubt this will work but you could try adding a setTimeout like below. I haven't had the crash in a few days so it's hard for me to trouble shoot.

Code: [Select]
		if (this.album) {
if (!onlyForceLfm) {
const art_upd = cfg.dlAmBio && (force || this.expired(am_bio.pth, this.exp, 'Bio ' + cfg.partialMatch + ' ' + am_rev.pth, false) && !$.open(am_bio.pth).includes('Custom Biography'));
let rev_upd = false;
if (cfg.dlAmRev) {
rev_upd = force;
if (!rev_upd) {
rev_upd = !$.file(am_rev.pth) && !this.done('Rev ' + cfg.partialMatch + ' ' + am_rev.pth, this.exp);
}
}
let dn_type = '';
if (rev_upd || art_upd) {
if (rev_upd && art_upd) dn_type = 'review+biography';
else if (rev_upd) dn_type = 'review';
else if (art_upd) dn_type = 'biography';
setTimeout(() => {
        const dl_am_rev = new DldAllmusicRev;
    dl_am_rev.init(server.url.am + 'albums/' + encodeURIComponent(this.album + (!va ? ' ' + this.albumArtist : '')), 'https://allmusic.com', this.album, this.albumArtist, artiste, va, dn_type, am_rev.fo, am_rev.pth, am_bio.fo, am_bio.pth, art, force);
    }, 1200);
}
}
} else this.getBio(force, art, 1);



Title: Re: Biography Discussion
Post by: yeyo on 2023-12-28 07:57:14
I doubt this will work but you could try adding a setTimeout like below. I haven't had the crash in a few days so it's hard for me to trouble shoot.

Code: [Select]
		if (this.album) {
if (!onlyForceLfm) {
const art_upd = cfg.dlAmBio && (force || this.expired(am_bio.pth, this.exp, 'Bio ' + cfg.partialMatch + ' ' + am_rev.pth, false) && !$.open(am_bio.pth).includes('Custom Biography'));
let rev_upd = false;
if (cfg.dlAmRev) {
rev_upd = force;
if (!rev_upd) {
rev_upd = !$.file(am_rev.pth) && !this.done('Rev ' + cfg.partialMatch + ' ' + am_rev.pth, this.exp);
}
}
let dn_type = '';
if (rev_upd || art_upd) {
if (rev_upd && art_upd) dn_type = 'review+biography';
else if (rev_upd) dn_type = 'review';
else if (art_upd) dn_type = 'biography';
setTimeout(() => {
        const dl_am_rev = new DldAllmusicRev;
    dl_am_rev.init(server.url.am + 'albums/' + encodeURIComponent(this.album + (!va ? ' ' + this.albumArtist : '')), 'https://allmusic.com', this.album, this.albumArtist, artiste, va, dn_type, am_rev.fo, am_rev.pth, am_bio.fo, am_bio.pth, art, force);
    }, 1200);
}
}
} else this.getBio(force, art, 1);
fb2k still has a chance to crash when exiting
Title: Re: Biography Discussion
Post by: ApacheReal on 2023-12-29 10:13:37
I doubt this will work but you could try adding a setTimeout like below. I haven't had the crash in a few days so it's hard for me to trouble shoot.

Code: [Select]
		if (this.album) {
if (!onlyForceLfm) {
const art_upd = cfg.dlAmBio && (force || this.expired(am_bio.pth, this.exp, 'Bio ' + cfg.partialMatch + ' ' + am_rev.pth, false) && !$.open(am_bio.pth).includes('Custom Biography'));
let rev_upd = false;
if (cfg.dlAmRev) {
rev_upd = force;
if (!rev_upd) {
rev_upd = !$.file(am_rev.pth) && !this.done('Rev ' + cfg.partialMatch + ' ' + am_rev.pth, this.exp);
}
}
let dn_type = '';
if (rev_upd || art_upd) {
if (rev_upd && art_upd) dn_type = 'review+biography';
else if (rev_upd) dn_type = 'review';
else if (art_upd) dn_type = 'biography';
setTimeout(() => {
        const dl_am_rev = new DldAllmusicRev;
    dl_am_rev.init(server.url.am + 'albums/' + encodeURIComponent(this.album + (!va ? ' ' + this.albumArtist : '')), 'https://allmusic.com', this.album, this.albumArtist, artiste, va, dn_type, am_rev.fo, am_rev.pth, am_bio.fo, am_bio.pth, art, force);
    }, 1200);
}
}
} else this.getBio(force, art, 1);

No way.

On output, especially after a radio stream, it crashes.

It cannot be used.

I remove SMP and return to Bio Panel JS3.
Title: Re: Biography Discussion
Post by: chamuco on 2024-02-01 23:52:47
I'll try again.

Windows 11 version 23H2 (OS Build 22631.3007)
Foobar2000 V2.0 [x86]
Spider Monkey Panel 1.6.1
Biography v1.4.2

The panel is downloading and displaying data from allmusic, but when attempting to tag files (select all album tracks in playlist>shift+rt. click on Bio panel>tagger->tag files...) panel crashes with 2 popups pictured below.

Can anyone see what is causing this crash? What is the Script Error box referring to? Any help is appreciated.
Title: Re: Biography Discussion
Post by: marc2k3 on 2024-02-02 00:50:02
The SMP error dialog on the left is what someone needs to look at.

tagger.js line 294
Title: Re: Biography Discussion
Post by: chamuco on 2024-02-03 00:43:04
Can anyone see what is causing this crash? What is the Script Error box referring to? Any help is appreciated.

UPDATE

I suppose I should have mentioned that on my Tagger settings page I had all Last.fm tags unchecked (and have for years). After much experimenting I've found that checking 'Artist Genre Last.fm' has the panel working properly without crashing. Ideally this wouldn't be necessary as I don't need last.fm tags, but I'll take it.
Title: Re: Biography Discussion
Post by: regor on 2024-02-24 12:37:17
Latest versions have bugged notification of selection mode.
In any mode, keeps sending notifications with both values, totally breaking other panels relying on it.

Quote
[13:29:58] Prefer nowplaying
[13:29:59] Prefer nowplaying
[13:29:59] Opening track for playback: ...
[13:29:59] Using decoder shim instead of DSP: Skip Track
[13:30:01] HDD wakeup - touching file: H:\{A53AE67A-5343-4E7C-9C19-63BC430EA8C7}
[13:30:01] HDD wakeup - touched file: H:\{A53AE67A-5343-4E7C-9C19-63BC430EA8C7}
[13:30:01] Biography Server: last.fm album review: Angie - Silver train / The Rolling Stones: not found Status error: 404
[13:30:02] Prefer nowplaying
[13:30:02] Follow selected track (playlist)
[13:30:02] Prefer nowplaying
[13:30:02] Follow selected track (playlist)
[13:30:03] Biography Server: wikipedia: Angie - Silver train: not found
[13:30:04] Opening track for playback: ...
[13:30:05] Using decoder shim instead of DSP: Skip Track
[13:30:09] Prefer nowplaying
[13:30:16] Prefer nowplaying
[13:30:19] Prefer nowplaying
[13:30:21] Prefer nowplaying

I suppose it was introduced here:
https://github.com/Wil-B/Biography/commit/b8086ec822095570ff5095410b558df9ac75bc32

Title: Re: Biography Discussion
Post by: Majestyk on 2024-02-26 04:13:58
There sure are a lot of images missing at Last.fm. With Biography, many of my artist are now either pulling in just three or less images (when they were pulling in 10 before) or are no longer pulling in images at all.

I wonder what's up?
Title: Re: Biography Discussion
Post by: marc2k3 on 2024-02-26 05:38:45
Here's a few lines of code that tests connectivity/images found with JScript Panel 3. I'm not suggesting anyone has to use it - it's just a debugging tool.

Install panel from here...

https://jscript-panel.github.io/docs/

....and add code. Then watch the fb2k console each time you play a new track.

Code: [Select]
// ==PREPROCESSOR==
// @import "%fb2k_component_path%helpers.txt"
// @import "%fb2k_component_path%samples\js\lodash.min.js"
// @import "%fb2k_component_path%samples\js\common.js"
// ==/PREPROCESSOR==

var artists = {};
var tfo = fb.TitleFormat('$meta(artist,0)');

var type = {
GET : 0,
POST : 1,
};

var headers = JSON.stringify({
'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0',
'Referer' : 'https://www.last.fm',
});

function on_playback_new_track() {
var artist = tfo.Eval();
if (artist.length) {
var url = 'https://www.last.fm/music/' + encodeURIComponent(artist) + '/+images';
var task_id = utils.HTTPRequestAsync(window.ID, type.GET, url, headers);
artists[task_id] = artist;
}
}

function on_http_request_done(task_id, success, response_text, status, response_headers) {
var artist = artists[task_id];
if (!artist) return;

if (!success) {
console.log('Web request for', artist, 'failed:', response_text);
return;
}

console.log('Web request for', artist, 'completed.');

if (status != 200) {
console.log('Status:', status);
return;
}

var urls = _(_getElementsByTagName(response_text, 'li'))
.filter({ className : 'image-list-item-wrapper' })
.value();

console.log('Image urls found:', urls.length);
}