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 191847 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Biography Discussion

Reply #750
Hey there @maarroyo and @WilB :)

Took the initiative and did a simple mod to do this in addition to searching compositions. Not the cleanest, but I've made the code available here: https://github.com/mayanez/WilB-Biography-Mod

Thanks for putting this idea forward. I was hoping to use this mod to have 2+ biography panels to display %artist% photos and %featured% artist photos simultaneously, and it (almost) works great! I can have circular, cycling artist photos for multiple artists on a track at once. (The panels are set to display image only)

X

The problem is, when the $meta(featured,0) (etc) tag is not present, it falls back to displaying the default artist image (set in Preferences > Display). This makes the concept I had not really work. I was rather hoping it would display the "stub" image (from '%profile%\yttm\artist_stub_user.png') for no artist/tag found, for which I can then use a blank image. In short, display the source tag, and if not found, display the not found image / nothing.

Is there a minor tweak I could make to the script(s) to make it work this way? And if not so minor, perhaps can be considered a feature request for the next version?

I did try setting a %bio_artist% TF string such as -

Code: [Select]
$if2($meta(featured,0),_Blank)

And making a folder in my music library for "_Blank\Artist.png" (as for any other artist) but this gets completely ignored. Even though the preview box in panel settings says it resolves to artist called "_Blank".

This is the only script to my knowledge that can do a circular crop of images, which just looks fantastic to me. Alternatively, I'm aware the SMP/JSP 'thumbs.js' sample script already works the way I would like (and probably uses less resources), but without an option for circular crop. I'm not sure, how complex would it be to integrate a basic version of that code into the thumbs sample? Basically a right-click > 'Crop (circular)' like the other crop options it has already. (Just asking here since WilB knows how the code works already)

Thanks in advance for any solutions ;)

Re: Biography Discussion

Reply #751
I did try setting a %bio_artist% TF string such as - $if2($meta(featured,0),_Blank) - And making a folder in my music library for "_Blank\Artist.png"
I found a workaround. I already use foo_dynfil (Dynamic Fields) and just made a new field STUB=_Blank - then insert %_stub% into the last position of %bio_artist% string. It works!

(Funny thing, it made me laugh when an anime girl appeared, apparently there is an artist called "_Blank" on last.fm :D )

I still think it would be a good idea for the next version, if now per panel source settings, to be able to specify a fallback image (or just allow it in TF text string)

Now I get to keep making this theme. I think this is another great use of this fantastic script. 8)

Cheers

Re: Biography Discussion

Reply #752
Not really a priority, but sometimes the panel crashes when a file is locked:
Code: [Select]
Error: Spider Monkey Panel v1.6.1 ({04DE9307-DD67-4782-894E-6E6DE2768064}: Biography v1.2.0 by WilB)
ReadTextFile failed:
WinAPI error:
  CreateFile failed with error (0x20):
    The process cannot access the file because it is being used by another process.

File: helpers.js
Line: 204, Column: 31
Stack trace:
  open@helpers.js:204:31
  write@tagger.js:189:22
  Text/this.currentTrackTags<@text.js:130:20
  T@helpers.js:78:164
  t@helpers.js:78:519
  notifyTags@text.js:1042:8
  on_playback_new_track@text.js:1047:8
  Panel/this.focusLoad<@panel.js:170:27
  T@helpers.js:78:164
  t@helpers.js:78:519
  on_metadb_changed@callbacks.js:133:8

Not only the file must be checked to exist, but also the read part wrapped in try/catch

Code: [Select]
function _open(file, codePage = 0) {
if (_isFile(file)) {
if (file.startsWith('.\\')) {file = fb.FoobarPath + file.replace('.\\','');}
return tryMethod('ReadTextFile', utils)(file, codePage) || '';  // Bypasses crash on file locked by other process
} else {
return '';
}
}

...

function tryMethod(f, parent) {
    return (...args) => {
        let cache;
        try {cache = parent[f](...args);} catch(e) {}
        return cache;
    }
}


Re: Biography Discussion

Reply #754
New Version: Biography v1.3.0

Release highlights: Wikipedia + lyrics + flags

Awesome additions.

Only a little glitch. On the album view when the lyrics are shown, there is no indicator



Edit:

The update copy the old .cfg to the new location but if you remove the old yttm folder in profile in a new startup another one is created with default values instead of read it from the new location

Re: Biography Discussion

Reply #755
New Version: Biography v1.3.0

wow and thanks - great to see this!!
I'm very happy to remove my extra lyrics component.

minor issue:
--if lyric tags contains bracket characters eg. "[00:48.58] lyric blah blah blah" no lyrics appear, only a '.' is displayed.

nice to have:
--default lyric fallback is bio; option to customize? (TF or album review)
--particularly for album reviews: option to 'display all' sources? (current option is only to lock selected source)
--wildcard support for textreader? eg. $directory_path(%path%)\*.txt




Re: Biography Discussion

Reply #756
Displaying a period in place of large chunks of text in tags has been a thing since fb2k v1.3 was released in 2015 (I think). This is done for performance reasons so the library and playlist caches don't get bloated with masses of text which can seriously slow down performance on large collections.

The foobar2000 SDK provides means for components to get info in full so any proper lyrics component will have it implemented transparently to the end user. SMP does not.

For components without this special support, you can revert to pre-1.3 behaviour by editing LargeFieldsConfig.txt in your profile folder but of course you have to aware of the side effects I mentioned above.


Re: Biography Discussion

Reply #758

@paregistrase
- Lyrics: missing indicator in album view. I forgot to add it to the panel properties. It's fixed for the next version. But all you need to do to fix it now is paste 'lyrics' in the textreader & lyrics name box of album view. Or you can directly add it to the panel properties: Text Reader Source 4 Name (& 5 & 6 if you use those slots).

- Folder glitch. I couldn't seem to reproduce. May be certain you still haven't v1.2.0 installed somewhere as that would create it?

@mjm716
Tag lyrics displaying '.' Usually that's an issue with LargeFieldsConfig.txt file. For %LYRICS% or %UNSYNCED LYRICS% to always display properly, you must edit LargeFieldsConfig.txt and comment out or remove those specific entries under "fieldSpam".

--default lyric fallback. If you display them in album view, you'll get the review fallback.

@regor
I'll add the following simple try catch to helpers in the next version, unless you advise it's not suitable for some reason.

Code: [Select]
    open(f) {
try { // handle locked files
return this.file(f) ? utils.ReadTextFile(f) : '';
} catch (e) {
return '';
}
}

Re: Biography Discussion

Reply #759
@mjm716
Tag lyrics displaying '.' Usually that's an issue with LargeFieldsConfig.txt file.

Per Marc & above - my LargeFieldsConfig.txt was already configured below, but I'm oddly still getting '.' for long lyrics.

Code: [Select]
# Size limit for meta fields that appear in the basic fields list
basicMetaMax=2000
# Size limit for meta fields that do not appear in either list
defaultMetaMax=1000
# Size limit for tech info fields
infoMax=200

# List of basic meta fields - essential info such as artist & title
fieldBasic=album
fieldBasic=album artist
fieldBasic=artist
fieldBasic=composer
fieldBasic=conductor
fieldBasic=date
fieldBasic=discnumber
fieldBasic=genre
fieldBasic=keywords
fieldBasic=performer
fieldBasic=producer
fieldBasic=style
fieldBasic=title
fieldBasic=totaldiscs
fieldBasic=totaltracks
fieldBasic=tracknumber
fieldBasic=comment
fieldBasic=DISCOGS_RELEASE_NOTES
fieldBasic=DISCOGS_RELEASE_CREDITS
fieldBasic=DISCOGS_ARTIST_PROFILE
fieldBasic=LYRICS
fieldBasic=UNSYNCED LYRICS

# List of spam meta fields - rarely useful stuff that *never* gets cached
fieldSpam=accurate rip
fieldSpam=aucdtect
fieldSpam=biography
fieldSpam=cuesheet
fieldSpam=eac logfile
fieldSpam=itunes_cddb_1
fieldSpam=itunmovi
fieldSpam=log
fieldSpam=logfile

Also one more minor request - tagger>tag files now has a confirmation window. Option to dismiss would be nice.  :)

Re: Biography Discussion

Reply #760

@paregistrase
- Lyrics: missing indicator in album view. I forgot to add it to the panel properties. It's fixed for the next version. But all you need to do to fix it now is paste 'lyrics' in the textreader & lyrics name box of album view. Or you can directly add it to the panel properties: Text Reader Source 4 Name (& 5 & 6 if you use those slots).

- Folder glitch. I couldn't seem to reproduce. May be certain you still haven't v1.2.0 installed somewhere as that would create it?


Indicator showing now

About the folder, you are right, I have 1.20 installed. I deleted it and no more yttm in profile folder.

Thanks.


I would like to make some requests:

- It would be nice if there was a custom art image directory options to make the discogs art images rotate too in the panel. I have a lot of them downloaded by discogs tagger and will be cool to make some use of them beyond fallback default art image.

- last.fm/almusic/wiki sources. I supposed that display all sources will be weird with the new textreaders, but some kind of indication to show that there are more sources will be handy. The current menu entries didn't give visual clue and show no information of what kind of source is.

- On the album review option to display the album artist / album / sources in individual lines or a tooltip. Sometimes the combinations of 3 elements in the same line make impossible to know the album with large artist names.

- An option to show the panel properties, edit and configure in the normal menu without enter in editing layout mode.

- The possibility of selecting which one of the last.fm multiple artists is the correct one when there is more than one for the same name. I didn't know if this is even possible, but will be great.

Well, enough begging behavior for today.

Have a great day






Re: Biography Discussion

Reply #761
@mjm716
Tag lyrics displaying '.' Usually that's an issue with LargeFieldsConfig.txt file.

Per Marc & above - my LargeFieldsConfig.txt was already configured below, but I'm oddly still getting '.' for long lyrics.

Code: [Select]
# Size limit for meta fields that appear in the basic fields list
basicMetaMax=2000
# Size limit for meta fields that do not appear in either list
defaultMetaMax=1000
# Size limit for tech info fields
infoMax=200

# List of basic meta fields - essential info such as artist & title
fieldBasic=album
fieldBasic=album artist
fieldBasic=artist
fieldBasic=composer
fieldBasic=conductor
fieldBasic=date
fieldBasic=discnumber
fieldBasic=genre
fieldBasic=keywords
fieldBasic=performer
fieldBasic=producer
fieldBasic=style
fieldBasic=title
fieldBasic=totaldiscs
fieldBasic=totaltracks
fieldBasic=tracknumber
fieldBasic=comment
fieldBasic=DISCOGS_RELEASE_NOTES
fieldBasic=DISCOGS_RELEASE_CREDITS
fieldBasic=DISCOGS_ARTIST_PROFILE
fieldBasic=LYRICS
fieldBasic=UNSYNCED LYRICS

# List of spam meta fields - rarely useful stuff that *never* gets cached
fieldSpam=accurate rip
fieldSpam=aucdtect
fieldSpam=biography
fieldSpam=cuesheet
fieldSpam=eac logfile
fieldSpam=itunes_cddb_1
fieldSpam=itunmovi
fieldSpam=log
fieldSpam=logfile

Also one more minor request - tagger>tag files now has a confirmation window. Option to dismiss would be nice.  :)
Note the max size limit still applies. If you get a period, then you have to set it to a higher value.

@WilB yep that will do.

Re: Biography Discussion

Reply #762
Just gave the version 1.3 a try... very nice job so far... great little additions... plus fixed all previous issue I had using multiple panel a the same time...

The only little quirk left is the ability to force a fixed aspect ratio with the fill option enable... right now, you have a little margin like 15% where the image get stretched to fill the canvas... before returning to the native aspect ratio...

But not complaining exactly the kind of release I was looking for... Thank  you.

Re: Biography Discussion

Reply #763
I found a problem with the new Wikipedia source.

Sometimes when you change from one positive result to not found one the wiki source retain the positive one.



Re: Biography Discussion

Reply #764
@WilB,
Good job. You are a good programmer.
UR5EQF. Ukraine

 

Re: Biography Discussion

Reply #765
Would like to note that recent additions in HTML popups make script unusable without IE in more cases.
Now tagger menu entry opens a HTML popup first so it doesn't open the WSH popup later. A simple checking of HTML features could bypass the usage of HTML popups here (and probably in more instances).
Spoiler (click to show/hide)

settings.js: (line 629)
Code: [Select]
				const wsh = soFeatures.gecko && soFeatures.clipboard ? popUpBox.confirm(caption, prompt, 'OK', 'Cancel', continue_confirmation) : true; // Use HTML or just WSH as fallback
if (wsh) continue_confirmation('ok', $.wshPopup(prompt, caption));

If anyone wants to apply this change, just overwrite the js files with the ones attached.

Also found a bug (I think) related to the FilmStrip "overlay image area" option. When enabled, even if FilmStrip is disabled, image and text can not be moved. I spent a few minutes trying to figure what was going on  :))
Spoiler (click to show/hide)

Re: Biography Discussion

Reply #766
@paregistrase  & @mjm716

The features you requested should be in the next version.

@paregistrase

You can already show panel properties, edit and configure without entering editing layout mode. Right click while pressing the windows key + shift.

last.fm multiple artists. last.fm seems to be name based & any of the same name are included in their lists & image collections. Usually they're dominated by the most popular. I don't believe anything can be done about it, except with photos, where black list can be used (menu > image > black list).

Wikipedia review occasionally not changing when item not found. I couldn't reproduce this issue. If the issue persists please try and provide exact steps to replicate. As a longshot, also verify that it isn't something simple like you're in prefer nowplaying mode, then clicking another album in playlist wouldn't be expected to change the review.

@regor

I've added your confirm dialogue box method. Thx.
The resize when the filmstrip overlays the image area should also be fixed in the upcoming version

@kahel

Auto-fill respects margin settings. May be that's what you need to change? Perhaps I didn't understand the exact issue. Also album covers where metrics are near square may be stretched slightly (<5%) rather than clipped.

Re: Biography Discussion

Reply #767
The features you requested should be in the next version.

Cool

@paregistrase

You can already show panel properties, edit and configure without entering editing layout mode. Right click while pressing the windows key + shift.

Yeah....Only problem is that in Gnome windows key+shit bring the window menu (close.max, min,stay on top,etc). That was the reason of my request.

last.fm multiple artists. last.fm seems to be name based & any of the same name are included in their lists & image collections. Usually they're dominated by the most popular. I don't believe anything can be done about it, except with photos, where black list can be used (menu > image > black list).

That was a long shot, If the last.fm API allowed it I'm sure you would have already used it.

Wikipedia review occasionally not changing when item not found. I couldn't reproduce this issue. If the issue persists please try and provide exact steps to replicate. As a longshot, also verify that it isn't something simple like you're in prefer nowplaying mode, then clicking another album in playlist wouldn't be expected to change the review.

Is the same in every mode, nowplaying, follow selected or without playing songs.

Right now with Mark Knoffler - Privateering and a new released album Studnitzky - Nocturnal







Note that even the artist image in facets that I have configured as

Code: [Select]
['Z:\mnt\wd\Musica\artist_art\'%DISCOGS_ARTIST_ID%\*]
['Z:\mnt\wd\Musica\yttm\art_img\'$replace($cut($meta(ARTIST,0),1),.,_)\$if($stricmp($cut($meta(ARTIST,0),1),.),_$substr($meta(ARTIST,0),2,$len($meta(ARTIST,0))),$meta(ARTIST,0))\*]
$if($stricmp($meta(ALBUM ARTIST,0),Various Artists),'Z:\mnt\wd\Musica\yttm\'VariousArtists.jpg,)
['Z:\mnt\wd\Musica\yttm\art_img\'$replace($cut($meta(ALBUM ARTIST,0),1),.,_)\$if($stricmp($cut($meta(ALBUM ARTIST,0),1),.),_$substr($meta(ALBUM ARTIST,0),2,$len($meta(ALBUM ARTIST,0))),$meta(ALBUM ARTIST,0))\*]
artist.*

Get a match for Studnizky with the Mark Knofler one. I diddn't have a Studnizky match in any of this path so it must display the default no artist image. But the Mark Knofler's ones was saved in the Studnizky folder



Only thing I did was select Mark Knofler album and changes to the new one for tagging.

Sometimes even happen with album that have a wiki entry, but in this scenario a force update gives the correct info.

But if the album has no wiki info, it gets stuck in other previous successfully search most of the time



Re: Biography Discussion

Reply #768
So it's a download/save issue? What names were in the file tags for Studnitzky (or other cases where there's been an issue) at the time of downloading/saving? Are you using default strings for %BIO_ALBUMARTIST% & %BIO_ALBUM%? Are there any any musicbrainz_ids in the files that could be wrong as they take priority over names with Wikipedia? But then the photos seem wrong & that's lfm so it looks like the names in the file tags or values for %BIO_ARTIST%, %BIO_ALBUMARTIST% & %BIO_ALBUM% or save folder paths aren't right?

Is anybody else seeing this?

Re: Biography Discussion

Reply #769
So it's a download/save issue? What names were in the file tags for Studnitzky (or other cases where there's been an issue) at the time of downloading/saving? Are you using default strings for %BIO_ALBUMARTIST% & %BIO_ALBUM%? Are there any any musicbrainz_ids in the files that could be wrong as they take priority over names with Wikipedia? But then the photos seem wrong & that's lfm so it looks like the names in the file tags or values for %BIO_ARTIST%, %BIO_ALBUMARTIST% & %BIO_ALBUM% or save folder paths aren't right?

Is anybody else seeing this?


The tags name are correct.

The Mark Knofler album have musicbrain info and the Studnitzky one not.

I have this paths for saving bio info in biography.cfg. I replaced %profile% with 'Z:\\mnt\\wd\\Musica'
Code: [Select]
   "fnImgCov": "album art_01",
   "foAmBio": "Z:\\mnt\\wd\\Musica\\yttm\\biography\\allmusic\\$lower($cut(%BIO_ARTIST%,1))",
   "foAmRev": "Z:\\mnt\\wd\\Musica\\yttm\\review\\allmusic\\$lower($cut(%BIO_ALBUMARTIST%,1))",
   "foCycCov": "$directory_path(%path%)",
   "foImgArt": "Z:\\mnt\\wd\\Musica\\yttm\\art_img\\$lower($cut(%BIO_ARTIST%,1))\\%BIO_ARTIST%",
   "foImgCov": "$directory_path(%path%)",
   "foImgRev": "Z:\\mnt\\wd\\Musica\\yttm\\rev_img\\$lower($cut(%BIO_ALBUMARTIST%,1))\\%BIO_ALBUMARTIST%",
   "foLfmBio": "Z:\\mnt\\wd\\Musica\\yttm\\biography\\lastfm\\$lower($cut(%BIO_ARTIST%,1))",
   "foLfmRev": "Z:\\mnt\\wd\\Musica\\yttm\\review\\lastfm\\$lower($cut(%BIO_ALBUMARTIST%,1))",
   "foLfmSim": "Z:\\mnt\\wd\\Musica\\yttm\\lastfm\\$lower($cut(%BIO_ARTIST%,1))",
   "foWikiBio": "Z:\\mnt\\wd\\Musica\\yttm\\biography\\wikipedia\\$lower($cut(%BIO_ARTIST%,1))",
   "foWikiRev": "Z:\\mnt\\wd\\Musica\\yttm\\review\\wikipedia\\$lower($cut(%BIO_ALBUMARTIST%,1))",

I didn't modify any of the script .js files.

If I delete the wrong files and made a force update the wrong wiki elements don't reappear


Re: Biography Discussion

Reply #770
Can you also confirm these definitions:

%BIO_ARTIST%, %BIO_ALBUMARTIST%, %BIO_ALBUM% & %BIO_TITLE% (tfArtist, tfAlbumArtist, tfAlbum,  tfTitle in biography.cfg). A screenshot of the file tags may help as well.

In light of your edit it would seem these ought to be OK though.

Re: Biography Discussion

Reply #771
Can you also confirm these definitions:

%BIO_ARTIST%, %BIO_ALBUMARTIST%, %BIO_ALBUM% & %BIO_TITLE% (tfArtist, tfAlbumArtist, tfAlbum,  tfTitle in biography.cfg). A screenshot of the file tags may help as well.

In light of your edit it would seem these ought to be OK though.

Code: [Select]
   "tfAlbum": "$meta(album,0)",
   "tfAlbumArtist": "$if3($meta(album artist,0),$meta(artist,0),$meta(composer,0),$meta(performer,0))",
   "tfArtist": "$if3($meta(artist,0),$meta(featuring,0),$meta(mixed by,0),$meta(remixed by,0),$meta(lyricist,0),$meta(writer,0),$meta(vocals,0),$meta(conductor,0),$meta(producer,0),$meta(discogs_artists,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))",
   "tfComposition": "$if2($meta(work,0),$meta(group,0))",
   "tfTitle": "$meta(title,0)",

Mark Knofler





Studnitzky




Doing this test after deleting files and a force update successful, changing from one album to the other



Mark Knofler is back  :))

Re: Biography Discussion

Reply #772
I just tested on fresh fb2k 1.6.11 install with bio at all default settings. It all works as expected for me even with those albums. See pics:

Re: Biography Discussion

Reply #773
So are you saying it all works now? Either way I just tested on fresh fb2k 1.6.11 install with bio at all default settings. It all works fine for me even with those albums. See pics:

No. It still happens.

I close foobar. Delete all files related to KMDM and LA Vampires Meets Zola Jesus in the yttm folder.

I run foobar, select one KMDM release (with wiki info) and before LA Vampires Meets Zola Jesus (no wiki info)

and again





Only with the wki source.

Deleting the wrong files and force update seems to get the right results for this release (no new wiki files display or saved), but changing to another one with wiki and returning bring back again mixed results

Re: Biography Discussion

Reply #774
@WilB

I deleted the script, close foobar, deleted all the config files and start fresh.

I found a difference between my .cfg and the new default.

   "autoCache": 1,

In the old one was 0

With the 1 value the wiki source didn't get stuck

Then I changed the paths to my yttm custom folder in 'Musica'.

But now it didn't save the images and txt files in 'Musica/yttm' anymore. They are saved inside 'biography_cache' inside foobar profile