Hydrogenaudio Forums

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: 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: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: 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: San_dr on 2017-04-21 14:13:32
спасибо, WilB!
Rapid development, convenient application  :))
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: 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: 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: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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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.
SimplePortal 1.0.0 RC1 © 2008-2019