Skip to main content

Topic: Biography Discussion (Read 32203 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • WilB
  • [*][*][*][*][*]
Biography Discussion
JScript Biography

Requirement: JScript Panel 1.1.0+

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

Enjoy

Re: Biography Discussion
Reply #1
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. 

  • tedgo
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #2
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.
  • Last Edit: 21 October, 2016, 06:10:52 AM by tedgo

  • PeteG
  • [*][*][*]
Re: Biography Discussion
Reply #3
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.

  • marc2003
  • [*][*][*][*][*]
  • Developer
Re: Biography Discussion
Reply #4
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!


  • Last Edit: 21 October, 2016, 10:54:38 AM by marc2003

  • tedgo
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #5
@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)
  • Last Edit: 21 October, 2016, 12:09:28 PM by tedgo

  • marc2003
  • [*][*][*][*][*]
  • Developer
Re: Biography Discussion
Reply #6
Yep, it's dead for me as well. I tried checking their status pages and even twitter is down too.

  • tedgo
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #7
It's back again :)

Re: Biography Discussion
Reply #8
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.

Re: Biography Discussion
Reply #9
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%

Re: Biography Discussion
Reply #10
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

Re: Biography Discussion
Reply #11
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





  • tr0ner
  • [*]
Re: Biography Discussion
Reply #12
thank you so much for this!!!!

  • WilB
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #13
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

Re: Biography Discussion
Reply #14
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

  • jazzthieve
  • [*][*][*][*]
Re: Biography Discussion
Reply #15
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.

  • tedgo
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #16
What about an option to auto-update all x days, where x can be defined in the ini-file?
Should be easy to implement.

  • WilB
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #17
New Version: JScript Biography 0.3 beta

CHANGELOG

Small bug fix

Biography 0.3 beta

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.
  • Last Edit: 05 November, 2016, 01:10:17 PM by WilB

  • tedgo
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #18
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?
  • Last Edit: 05 November, 2016, 02:06:01 PM by tedgo

  • wcs13
  • [*][*][*]
Re: Biography Discussion
Reply #19
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. :)
  • Last Edit: 06 December, 2016, 11:01:43 AM by wcs13

  • WilB
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #20
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

  • wcs13
  • [*][*][*]
Re: Biography Discussion
Reply #21
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. ;)
  • Last Edit: 06 December, 2016, 09:40:13 PM by wcs13

  • WilB
  • [*][*][*][*][*]
Re: Biography Discussion
Reply #22
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.

  • wcs13
  • [*][*][*]
Re: Biography Discussion
Reply #23
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. :)
  • Last Edit: 07 December, 2016, 10:35:10 AM by wcs13

  • wcs13
  • [*][*][*]
Re: Biography Discussion
Reply #24
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