Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Biography Discussion (Read 228505 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Biography Discussion

Reply #650
Hi WilB,

As I mentioned in the Library Tree topic, I have updated from JScript panel to Spider Monkey panel (I am really grateful that you are still maintaining this script!) and I have managed to set up everything as it was before. In this case I have also encountered 2 minor issues, so I am listing them below if you'd be so kind to take a look:

1. The last.fm stats for Top Albums and Similar Artists are still being displayed despite setting them as disabled in panel properties. I have checked if this isn't a cached issue by removing the existing artist bio but it is still being displayed. Let me know if there is something I have missed. I have this info displayed at the bottom after the bio text. This is how it looks like:



2. I have been able to fix the second issue, however I will mention it just in case someone else runs into the same problem or if you decide that this behavior is a bug. Basically there is an issue with displaying accented characters (e.g. á, é, č) in the text. I have investigated why it happens and found out that the old cached files (from earlier versions of the script) have been saved in UTF-8 format. After converting all of the txt files into UTF-8-BOM they are now displayed correctly. Not sure if this is intended so I am mentioning it just in case. Here is how it looked before and after conversion:



Thank you for the feedback and thank you for maintaining this script!

Re: Biography Discussion

Reply #651
Hi WilB,
2 questions related to getting the country for a given artist: https://hydrogenaud.io/index.php?topic=120729.msg995115#msg995115
- Tried to save last.fm locale tag to some tracks but it doesn't work if the tracks were not played before. Is there an option to force downloading ALL data (at least the text) from selected tracks on demand (even if there are rate limits imposed and takes some time)? (never used the script so I'm not familiar with it)
- Could you consider notifying tags from current track to other panels?  this.write_tags has already the logic for a handle list the idea would be replacing the write part with:
Code: [Select]
window.NotifyOthers('Biography tags',JSON.stringify(tags));

The second would allow other scripts to re-use the data from the current track. My current script just uses tags from files (and that's what I want for myself), but having data directly from your panel would also cover other use-cases (and work as fallback when no tags are present).

Re: Biography Discussion

Reply #652
Is there an option to force downloading ALL data (at least the text) from selected tracks on demand

The best way I managed to do this (batch load all artist data) was to generate a playlist with one track by every artist (or album for reviews) in my collection (via Random Pools plugin).

Then I used autohotkey to automate skipping tracks every 5 sec. which seemed to be enough time to load the bios/reviews.
Code: [Select]
    #Persistent
    SetTimer, PressTheKey, 5000
    Return

    PressTheKey:
    Send, {NumpadDown}
    Return

Something similar should have worked via built-in seek control>preview, but it didn't for some reason that I can't recall.

btw Regor - I'm anxious for a public release - unfortunately I haven't had the time to keep up with your beta release schedule.

Re: Biography Discussion

Reply #653

Then I used autohotkey to automate skipping tracks every 5 sec. which seemed to be enough time to load the bios/reviews.
Code: [Select]
    #Persistent
    SetTimer, PressTheKey, 5000
    Return

    PressTheKey:
    Send, {NumpadDown}
    Return

Could've used foo_preview for that.

Re: Biography Discussion

Reply #654
Yep I know both methods as workaround, but the point is the procedure should involve the minimum steps. I think it should be done within the script scope, not requiring other scripts or plugins to simulate playback. Although I understand the rate limits if we talk about images, the text data may have more relaxed rules. Asking regular users to install my scripts, plus this one, plus another plugin to get a tag and make it work seemed too much.

My 2nd suggestion would at least partially solve the problem since variables would be exposed on playback. Thanks to both anyway!

Quote
btw Regor - I'm anxious for a public release - unfortunately I haven't had the time to keep up with your beta release schedule.
Will send you a PM next time I send links to people. Should be this week

Re: Biography Discussion

Reply #655
Hey WilB,

Just a minor request please. When Covers are set to 'Cycle From Folder' they load alphabetically, which for me means -

Back.jpg -> Disc.jpg -> Front.jpg

However, I'd much rather have the Front image appear first when an album starts playing, then the rest. I notice it already does that when 'Cycle Above' is also enabled, where the order preferably goes -

Front -> Back -> Disc -> Artist

Unfortunately that method is no use for me because I use the art threader for genre icons and would rather they not show up as album art. ;)

So if any chance you could make 'Cycle From Folder' start with the Front.jpg / Cover.jpg, that would be cool. (Or an option?)

Cheers

Re: Biography Discussion

Reply #656
@anamorphic

'Cycle From Folder' loads all the images in the folder using SMP utils. They appear to be returned in a random order. Biography doesn't sort them. So the fact you obtained them in alphabetical order seems fortuitous. When I tried I happened to get Front first. It might be possible to sort the list alphabetically using a rule based method. But that may mean the user defining the rules & complex options hardly anybody would use. 'Cycle Above' can call the images in order.

In your case there seems to be a simple fix: use 'Cycle Above' and exclude the artist pattern. I could add check marks against the menu items to select which of Front, Back, Disc, Icon Artist are used, if the method works for you.

To test if the method works, change on line 3130:

for (let i = 0; i < 5; i++) to
for (let i = 0; i < 4; i++)

i.e. just replace the 5 with 4.

That will exclude the artist look up, then you can use 'Cycle Above'

@regor  It seems you've essentially solved the issue another way. It doesn't seem worth the effort of trying to supply data through notify for what may be a few residuals - it's not even clear that lfm would have missing ones anyway compared with listings on the MusicBrainz site.

@culinko Last.fm stats for Top Albums and Similar Artists are always in the bio. The setting you refer to controls display on the drop down menu.

Re: Biography Discussion

Reply #657
Thanks for the reply. I was wondering, would it be possible to add this as a setting so people could hide some of the sections from Last.fm?

Additionally, I have found that for some reason the Last.fm biography is not displayed for a Slovak group called Polemic. I was not able to figure out why, since it has a biography on the Last.fm page: https://www.last.fm/music/Polemic.

Only the Last.fm sections are being displayed, please see the following screenshot:


My Last.fm language for the script is set to EN and this is the only artist that I encountered where the discography is not being fetched properly.

Let me know if you need any more information regarding this issue, thank you for taking a look.

Re: Biography Discussion

Reply #658
Hi WilB :)

To test if the method works, change on line 3130:

for (let i = 0; i < 5; i++) to
for (let i = 0; i < 4; i++)
That works to exclude Artist, yes. I had to go further and set it to 1 to only show Front (and then it loads Back / Disc from folder) - this works perfect for me.

To clarify, my setup is a bit unconventional - for album art patterns I use Disc thread to load genre icons, and Back to load artist icons (in Facets). Artist thread loads artist photos in the parent folder.

Since probably no one else does that, I'm happy to just use that modification if you think is not worth changing the official script.

Cheers

Re: Biography Discussion

Reply #659
Greetings,

I have an issue with the %profile% placeholder in biography.ini

i'm using a portable installation and one of the folders that the portable installation is inside of starts with a period

so for example: %profile% = C:\Users\Me\MyStuff\.problematic_folder\foobar\profile

the problem is that the folder that begins with a period gets converted from .problematic_folder to _problematic_folder

so my reviews/bios, etc get saved to the wrong location

any ideas?

thanks



ah, i think i see the offending line

Code: [Select]
.replace(/\\\./g, "\\_")

not exactly sure why that would be necessary though

Re: Biography Discussion

Reply #660
@regor  It seems you've essentially solved the issue another way. It doesn't seem worth the effort of trying to supply data through notify for what may be a few residuals - it's not even clear that lfm would have missing ones anyway compared with listings on the MusicBrainz site.

@culinko Last.fm stats for Top Albums and Similar Artists are always in the bio. The setting you refer to controls display on the drop down menu.
Nope, the problem is not solved at all. Data is only downloaded with playback and makes no sense to ask users to playback their entire library to fetch a tag, then write them and then use my plugin...

Anyway I don't understand your reticence, since the main point of getting tags from the lastfm/allmusic servers is to use them (?) Obviously since they are not available to other plugins, no one is using them outside your panel. That may change if you share the tags, just saying. (for sure I would create much more things if I could use tags like similar artist, etc. shared by your panel)

Apart from that... it's a matter of changing 3 lines to do it, and that's just a dirty edit I made to check it:
tagger().this.notifyCountry already has all the code, unused.. (at least for the country tag, the tag writing routine has code for all tags)
Code: [Select]
	this.notifyCountry = (handles) => {
       if (!handles) return;
        let a = "", a_o = "####",  aa = "", aa_o = "####", l = "", l_o = "####";
        let locale = [], rem = [], sa = [], tags = [], artTags = []; // THIS
        const tf_a = FbTitleFormat(p.tf.a), tf_aa = FbTitleFormat(p.tf.aa), tf_cue = FbTitleFormat("$ext(%path%)"), tf_l = FbTitleFormat(p.tf.l);
        const artist = tf_a.EvalWithMetadb(handles).toUpperCase(), album = tf_l.EvalWithMetadb(handles).toUpperCase();  // THIS to metadb
if (!name.alb_strip) l = l.replace(/CD(\s*\d|\.0\d)|CD\s*(One|Two|Three)|Disc\s*\d|Disc\s*(III|II|I|One|Two|Three)\b/gi,"").replace(/\(\s*\)|\[\s*\]/g, " ").replace(/\s\s+/g, " ").replace(/-\s*$/g, " ").trim();
else l = l.replace(/CD(\s*\d|\.0\d)|CD\s*(One|Two|Three)|Disc\s*\d|Disc\s*(III|II|I|One|Two|Three)\b|(Bonus\s*Track|Collector's|(Digital\s*|Super\s*|)Deluxe|Digital|Expanded|Limited|Platinum|Reissue|Special)\s*(Edition|Version)|(Bonus\s*(CD|Disc))|\d\d\w\w\s*Anniversary\s*(Expanded\s*|Re(-|)master\s*|)(Edition|Re(-|)master|Version)|((19|20)\d\d(\s*|\s*-\s*)|)(Digital(ly|)\s*|)(Re(-|)master(ed|)|Re(-|)recorded)(\s*Edition|\s*Version|)|\(Deluxe\)|\(Mono\)|\(Reissue\)|\(Revisited\)|\(Stereo\)|\(Web\)|\[Deluxe\]|\[Mono\]|\[Reissue\]|\[Revisited\]|\[Stereo\]|\[Web\]/gi,"").replace(/\(\s*\)|\[\s*\]/g, " ").replace(/\s\s+/g, " ").replace(/-\s*$/g, " ").trim();
if (artist != a_o) {
// remove any reference to [i] changed to var
a_o = artist;
if (p.tag[6].enabled || p.tag[7].enabled || p.tag[8].enabled && p.tag[8].enabled < 7) {
const lfmBio = p.cleanPth(p.pth.lfmBio, handles, 'tag') + artist.clean() + ".txt";
if (s.file(lfmBio)) {
const lfm_a = s.open(lfmBio);
if (p.tag[6].enabled) {ix = lfm_a.lastIndexOf("Top Tags: "); if (ix != -1) {artTags = lfm_a.substring(ix + 10); artTags = lfmTidy(artTags, artist, l);}}
if (p.tag[7].enabled) {
let loc = lfm_a.match(RegExp(kww, "i")); if (loc) {
loc = loc.toString();
ix = lfm_a.lastIndexOf(loc);
if (ix != -1) {
locale = lfm_a.substring(ix + loc.length);
locale = locale.split('\n')[0].trim().split(", ");
}
}
}
}
}
}
window.NotifyOthers(window.Name + ' notifyCountry', locale);
}

Then on text()
Code: [Select]
 this.draw = gr => {
tag.notifyCountry(s.handle(ppt.focus));
...

And don, country is notified to the world map
X

Re: Biography Discussion

Reply #661
@culinko

Polemic. There are issues at last.fm. The main wiki page (https://www.last.fm/music/Polemic/+wiki) is giving a 503 error.

To exclude similar artists from the bio you can change line 3999 to :
Code: [Select]
/*if (simArtists.length) simArtists = "\r\n\r\n" + similar[p.lfmLang_ix] + simArtists.join(", "); else*/ simArtists = ""; s.doc.close();

To exclude top albums from the bio you can change line 4021 to :
Code: [Select]
/*if (topAlbums.length) topAlbums = "\r\n\r\n" + topAlb[p.lfmLang_ix] + topAlbums.join(", "); else*/ topAlbums = "";

@regor
Well I thought Pickard could do it based on your other post??? I can look into adding something for the next version. Probably it will be after on_playback_new_track() when it has the data. I think this.draw is called too frequently.

@FritzLn From the documentation:
Quote
The script always replaces leading dots in metadata with underscores in folders and file names. This is because foobar2000 doesn't automatically handle this case and won't load images* if any folder in the search pattern has a leading dot "."
* this means if you try & load saved images through fb2k preferences\display\album art patterns. Without the fix images for artists like .38 Special don't seem to load through this route & so won't be available to other album art viewers & playlists. Anyway you found what to change so it works for you.

Re: Biography Discussion

Reply #662
@culinko

Polemic. There are issues at last.fm. The main wiki page (https://www.last.fm/music/Polemic/+wiki) is giving a 503 error.

To exclude similar artists from the bio you can change line 3999 to :
Code: [Select]
/*if (simArtists.length) simArtists = "\r\n\r\n" + similar[p.lfmLang_ix] + simArtists.join(", "); else*/ simArtists = ""; s.doc.close();

To exclude top albums from the bio you can change line 4021 to :
Code: [Select]
/*if (topAlbums.length) topAlbums = "\r\n\r\n" + topAlb[p.lfmLang_ix] + topAlbums.join(", "); else*/ topAlbums = "";

@regor
Well I thought Pickard could do it based on your other post??? I can look into adding something for the next version. Probably it will be after on_playback_new_track() when it has the data. I think this.draw is called too frequently.

@FritzLn From the documentation:
Quote
The script always replaces leading dots in metadata with underscores in folders and file names. This is because foobar2000 doesn't automatically handle this case and won't load images* if any folder in the search pattern has a leading dot "."
* this means if you try & load saved images through fb2k preferences\display\album art patterns. Without the fix images for artists like .38 Special don't seem to load through this route & so won't be available to other album art viewers & playlists. Anyway you found what to change so it works for you.
No I would have to write a plugin for picard to make it work. Can be don (no ETA), but obviously using your plugin during playback is more convenient. Also having other tags, apart from locale, would open a world of possibilities -specially for similar artists- (while I would be restricted to just locale tags using Picard+plugin). And yep, my dirty edit was just to test it, better on new track. Thank you so much!

Re: Biography Discussion

Reply #663
@WilB Thank you so much with the script change for Similar Artists/Top Albums, I can confirm the sections are now gone after forcing the data to update :)

As for the 503 page, I will wait to see if it comes back up at some point in the future and if not I will just report it on Last.fm forums.

Thanks once again for the awesome support!

Re: Biography Discussion

Reply #664
Hi people !

I just found that new searchs for allmusic always returns not found.

I didn't notice before because almost all artist have downloaded data already.

For example I add The Chemical Brothers to my library and last.fm data was downloaded but allmusic returns
Quote
Biography Server: allmusic biography: The Chemical Brothers: not found
Biography Server: allmusic album review: Exit Planet Dust / The Chemical Brothers: not found

and allmusic have both
https://www.allmusic.com/artist/the-chemical-brothers-mn0000067631/biography
https://www.allmusic.com/album/exit-planet-dust-mw0000175359

Anyone having something similar and found a solution?

Thanks in advanced

Edit: Using foobar2000 v1.6.5 biography 1.13 spidermonkey 1.4.1 running in ubuntu 21.04 with wine-staging 6.7

Re: Biography Discussion

Reply #665
This will be related to your post in the main SMP thread where it was unable to load the htmlfile ActiveXObject under WINE - there would be no issues on Windows. For scraping the allmusic website, it's absolutely required.

Re: Biography Discussion

Reply #666
This will be related to your post in the main SMP thread where it was unable to load the htmlfile ActiveXObject under WINE - there would be no issues on Windows. For scraping the allmusic website, it's absolutely required.

Makes sense.

And this time will not be as easy as comment out some line I suppose.

At least last.fm works...

And talking about requieres ActiveX...there must be a version of biography that worked in a different way because I have a lot of reviews downloaded and always used wine to foobar so it was working in the past.

Do you know which one?

Re: Biography Discussion

Reply #667
It's always required it. Perhaps you had a different WINE configuration? I see from the SMP thread, you're avoiding a 32bit prefix/IE8. That would probably fix it.

edit: i've not tried this script for awhile but I'm pretty it's required for last.fm too - definitely for images. bios are available via the web service/JSON but IIRC, WilB scrapes for extra info from the webpages.

Re: Biography Discussion

Reply #668
It's always required it. Perhaps you had a different WINE configuration? I see from the SMP thread, you're avoiding a 32bit prefix/IE8. That would probably fix it.

edit: i've not tried this script for awhile but I'm pretty it's required for last.fm too - definitely for images. bios are available via the web service/JSON but IIRC, WilB scrapes for extra info from the webpages.

Download images never worked in wine, at least for me, not even in the old times of first wsh or jscript panel.

A 32 bit prefix doesn't make any differences besides that is mandatory if you want to install ie8 verb.

But ie8 doesn't help with download images neither to get allmusic reviews. (I makes it right know and he gives "Biography Server: allmusic album review / biography: In Your Nature / Zola Jesus: not found Status error: 12157")

Sometime ago was necessary to even makes the panel works but with spider monkey and new wine versions is no more mandatory. The panel almost works in a default install without winetricks verbs. With wsh57, gdi+ and a key in regedit (AppliedDPI) you can use all complete samples, the cool album list and biography.

The only problems (in the "you can fix now" list) that left is the crash in right click and the allmusic data

But if you go the way of ie8 verb you can't download images anyway, allmusic doesn't works, the links in all the profile are linked to ie8 (and ie8 in wine doesn't open almost any page and get stuck all time) and some script like musicbrainz info doesn't works.

Is a no go that way.

And I had to use it a long time

https://hydrogenaud.io/index.php?topic=112914.msg975148#msg975148

In this allmusic worked, I know now where my download data comes from.

Yeah last modification of Fear Factory.txt 20 dic 2019, so around this time the panel stop downloading data.

The newest are from August 2020







Re: Biography Discussion

Reply #670
I suspect this would be servers being updated to block ye olde clients without modern TLS support. It's like Windows 7 is pretty useless out of the box until it's fully updated.

Sure it is  ;D

With ie8 you can forget about any https.or similar inside the prefix, even if you changes the keys in regedit ie8 always find the way to come back.

I even used a old 32 firefox installed inside wine to try to avoid ie8 but was a race lost before start

 

Re: Biography Discussion

Reply #671
Of course installing 3rd party browsers in WINE won't make any difference. If you can install/browse with them, that's because they will use 3rd party libraries like OpenSSL and have their own certificate stores which have no dependences on the underlying APIs provided by the OS.

All internet connectivity in JScript Panel and Spider Monkey Panel is through the xmlhttp ActiveXObject / built in windows certificate store which is entirely dependent on how updated the OS is. It doesn't necessarily have to be that way but that's the way all scripts are currently written. No one has gone out of their way with alternatives because no one cares about WINE enough.

Re: Biography Discussion

Reply #672
Of course installing 3rd party browsers in WINE won't make any difference. If you can install/browse with them, that's because they will use 3rd party libraries like OpenSSL and have their own certificate stores which have no dependences on the underlying APIs provided by the OS.

All internet connectivity in JScript Panel and Spider Monkey Panel is through the xmlhttp ActiveXObject / built in windows certificate store which is entirely dependent on how updated the OS is. It doesn't necessarily have to be that way but that's the way all scripts are currently written. No one has gone out of their way with alternatives because no one cares about WINE enough.
I only try to used it to open links, didn't expect that solved the conection issues

I understand this, the program is for windows and is must be more convenient use the already existing tools of the OS.

It will be cool if it was different but linux users are a minority.

Until then the only thing that left is wait for a implementation in the wine side.

Re: Biography Discussion

Reply #673
WilB, Is it possible to make a search successful when both the artist's name and the song's name are in the title?
for example like in this internet radio:
Code: [Select]
http://broadcast.infomaniak.ch/energylove-high.mp3
Please consider this question for Bio and YTTM scripts.

Re: Biography Discussion

Reply #674
Hi, my composer tag is like "Franz Liszt [1811 - 1886]" Obviously no last.fm response when I select it within the "More Tags" menu. Is there a way to trick  the last.fm query sending only "Franz Liszt"?
Thank you