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 224996 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: Biography Discussion

Reply #675
Hi there!
@eamatag71,
from my side the following worked:
In the biography.ini file of the Bio script settings, which is called by the right mouse button from the context menu "Sources / Server Settings... / Configure...", change the line:
Code: [Select]
[NAMES]
%BIO_ARTIST%=$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0))
to the next view:
Code: [Select]
[NAMES]
%BIO_ARTIST%=$if($left(%artist%,11),$left(%artist%,11),$if3($meta(artist,0),$meta(album artist,0),$meta(composer,0),$meta(performer,0)))
Perhaps there is probably a more elegant way.

@WilB , сould you consider the possibility of increasing the sensitivity of recognition of song artists in the new version of the script (especially important for Internet radio streams).
Alternatively, the ability to manually edit the title in the script panel.

Re: Biography Discussion

Reply #676
Sorry...it doesn't work

Re: Biography Discussion

Reply #677
@Sergey77
Both biography & yttm support title formatting for both artist & title already (former in ini and latter in panel properties), e.g.
Code: [Select]
Test title: madonna-music
artist titleformat
$if2(%artist%,$puts(-,$strstr(%title%,'-'))$cut(%title%,$sub($get(-),1))) gives madonna

title titleformat
$puts(-,$strstr(%title%,'-'))$if($get(-),$puts(l,$len(%title%))$right(%title%,$sub($get(l),$get(-)))) gives music

Next versions have title format preview for both biography & yttm so these things will be easier [title format strings tested on those versions].

@eamatag71 While you can do what you want with the main artist, tags on the more  tags menu are displayed as is. It's always best to keep tags clean for web look-ups.

Re: Biography Discussion

Reply #678
@WilB
Since the title contains a non-displayable special character, the proposed option will not affect for this radio stream: http://broadcast.infomaniak.ch/energylove-high.mp3
I have modified these lines a bit:
Code: [Select]
artist titleformat
$if2(%artist%,$puts(-,$strstr($ansi(%title%),'?'))$cut(%title%,$sub($get(-),1)))

title titleformat
$puts(-,$strstr($ansi(%title%),'?'))$if($get(-),$puts(l,$len(%title%))$right(%title%,$sub($get(l),$get(-))))

Re: Biography Discussion

Reply #679
New Version: Biography

v1.2.0-Beta.1



Updated features list
- downloads and displays artist photos, biographies and reviews from last.fm and allmusic
- main artist, similar artists, contributing artists, performers and composers etc
- main album and top albums
- history
- layout presets: top, left, right, bottom and overlay. Fully customizable with freestyle layouts
- themes: user interface, dark, blend and light
- custom colours and fonts
- filmstrip: top, left, right, bottom or hidden
- image+text, image only or text only
- drag resizing of image and filmstrip (press Ctrl while panel has focus)
- custom title format for field remapping and save locations
- and more...

Changelog v1.2.0

Added
- New options dialog
- Filmstrip
   - Supports circular as well as normal images
   - Click filmstrip to load main image
   - Middle click filmstrip to ensure main image visible in filmstrip
   - Enable/disable: menu > display
- Image size filter
   - Configurable
   - Can be used to exclude large images or small images or those below a certain pixel size
   - Enable/configure: options > image
- Ability to expand lists
   - Enable/disable: options > display
- Extra tagger options
   - Notify tags of current track to other Spider Monkey Panels
   - Add ability to write last.fm listeners (artist & album)
   - View by listeners: example patterns for library viewers:

Library tree:
Code: [Select]
$nodisplay{$sub(999999999,$replace([%Artist Listeners Last.fm%],',',,.,, ,)) - %artist%}[%Artist Listeners Last.fm% - ]%artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Album list:
Code: [Select]
[$replace(%Artist Listeners Last.fm%,',',,.,, ,) - ] %artist%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Other enhancements and fixes
- Blend theme: optimized default
- Cover cycler: now fully supports embedded images
- Cover cycler: can select on menu which cover sources to cycle
- Look up button can now either be top left or in heading
- Photo download: improved accessibility to settings (options > photo)
- Refactored code
- Save: reviews and biographies can now all be saved in the same folder
- Sleep time: optimized time between consecutive internet calls
- Smooth scroll: enhanced smoothness when using scrollbar
- Tagger: fixed rare handling issue with certain exotic characters
- UNC paths: sorted handling

Re: Biography Discussion

Reply #680
Hi WilB.

With the previous version you told one trick to disable the copy and paste funtion that give an error in wine.

In this new version give me a similar error when right click in menu.js so i find a similar line and comment it out

Code: [Select]
line 1029
/*this.docTxt = doc.parentWindow.clipboardData.getData('text');*/

With that i can right click without crashing the pannel.

But when i try options... a new crash popup with this error

Code: [Select]
Error: Spider Monkey Panel v1.4.1 ({0F783C2D-4D2B-4069-9773-5DAE4691A095}: Biography v1.2.0-Beta.1 by WilB)
ShowHtmlDialog failed:
DoModal failed: -1

File: popupbox.js
Line: 44, Column: 9
Stack trace:
  config@popupbox.js:44:9
  open@settings.js:226:12
  func@menu.js:646:11
  run@menu.js:106:3
  load@menu.js:69:8
  rbtn_up@menu.js:1045:8
  on_mouse_rbtn_up@callbacks.js:232:6

Is there a way to avoid this?

Other thing that i found.

I have my music in a folder named "Música" and inside this folder another named "atist_art" when I download the artist images of discogs.

I used this folder in the old bio to display artist images (the pannel doesn't download images in wine).

When I update to the new versión i can't use "Música". It is changed to "M(some weird characters)sica"

Is posible to continue using this folder or i must change the path?

The update look nice with the new features  ;)

Re: Biography Discussion

Reply #681
- Extra tagger options
   - Notify tags of current track to other Spider Monkey Panels
   - Add ability to write last.fm listeners (artist & album)
   - View by listeners: example patterns for library viewers:

Great! Will take a look at it, adding a mod will not be a requisite anymore for the map. Looking forward to expand integration with other scripts if it can access all tags.
Thanks :)

Re: Biography Discussion

Reply #682
Quote
2) Try using the development build of spider monkey panel which has the required bug fix.
Okay, okay, no need to be so pushy! I will try to reserve some time for the release with the fixes... >_<

PS: Since it's the internet and intonations don't travel that well in here, I have to clarify that it was a (mostly self-deprecating) joke...

Re: Biography Discussion

Reply #683
@paregistrase

ShowHtmlDialog is a standard Spider Monkey Panel utils function.  I don't think I have much control over it. According to the docs :
    Displays an html dialog, rendered by IE engine.
    Utilizes the latest non-Edge IE that you have on your system.
May be TheQwertiest can help with your wine issue.

Options is avoidable since most common settings are on the menu. Other settings are still accessible through panel properties (panel settings) or biography.cfg (server settings [all panel]). Although biography.cfg isn't designed to be user edited, it can be opened in a text editor & carefully changed.

Música seems to be an odd exotic character handling issue. Essentially the combination of saving with .cfg extension and saving without BOM seems to result in utils.ReadTextFile garbling the character. If BOM is used or the extension is .txt (or .json) then it works fine.

Maybe this needs an adjustment within Spider Monkey Panel. However, it can be worked around.

If you're inclined you can change the following.

Code: [Select]
$.save(this.bio, JSON.stringify($.sortKeys(this.cfg), null, 3), false);
to
$.save(this.bio, JSON.stringify($.sortKeys(this.cfg), null, 3), true);

There are two instances in the settings file:
lines 144 & 414.
This will set BOM to true.
You may need to re-enter Música in biography.cfg to remove the garbled version.

I'll add a fix to the next version if it isn't changed within Spider Monkey Panel.

Test code that demonstrates the issue:
Code: [Select]
"use strict";

    const fso = new ActiveXObject('Scripting.FileSystemObject');

function save(fn, text, bom) {
try {
utils.WriteTextFile(fn, text, bom)
} catch (e) {
console.log('error saving: ' + fn);
}
}

    function file(f) {
return fso.FileExists(f);
}

function open(f) {
return file(f) ? utils.ReadTextFile(f) : '';
}

    const bio = 'Música';
 
    console.log('TEXT: ', bio);
    console.log('Save file using utils.WriteTextFile. Save with or without BOM and with different extensions. Then use utils.ReadTextFile to read the file.');
    console.log('RESULT: the combination of extension being cfg & and saving without BOM causes bad handling');

    save('z:\\testBio.cfg', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.cfg; READ TEXT: ', open('z:\\testBio.cfg'));
  
    save('z:\\testBio.cfg', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.cfg; READ TEXT: ', open('z:\\testBio.cfg'));
  
    save('z:\\testBio.txt', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.txt; READ TEXT: ', open('z:\\testBio.txt'));
  
    save('z:\\testBio.txt', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.txt; READ TEXT: ', open('z:\\testBio.txt'));
  
    save('z:\\testBio.json', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.json; READ TEXT: ', open('z:\\testBio.json'));

    save('z:\\testBio.json', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.json; READ TEXT: ', open('z:\\testBio.json'));

Re: Biography Discussion

Reply #684
ShowHtmlDialog is a standard Spider Monkey Panel utils function.  I don't think I have much control over it. According to the docs :
    Displays an html dialog, rendered by IE engine.
    Utilizes the latest non-Edge IE that you have on your system.
May be TheQwertiest can help with your wine issue.

Thats explain why its crash. I tried with a 32 prefix and ie8 winetricks verbs and i managed to open the new option window, but unfortunately with this configuration the pannels doesn't download any data.

I will ask TheQuertiest but I'm afraid that this is a wine limitation

Options is avoidable since most common settings are on the menu. Other settings are still accessible through panel properties (panel settings) or biography.cfg (server settings [all panel]). Although biography.cfg isn't designed to be user edited, it can be opened in a text editor & carefully changed.

I will stick with this option or used a 32 prefix to configure and then used my normal setup.

Música seems to be an odd exotic character handling issue. Essentially the combination of saving with .cfg extension and saving without BOM seems to result in utils.ReadTextFile garbling the character. If BOM is used or the extension is .txt (or .json) then it works fine.

Maybe this needs an adjustment within Spider Monkey Panel. However, it can be worked around.

If you're inclined you can change the following.

Code: [Select]
$.save(this.bio, JSON.stringify($.sortKeys(this.cfg), null, 3), false);
to
$.save(this.bio, JSON.stringify($.sortKeys(this.cfg), null, 3), true);

There are two instances in the settings file:
lines 144 & 414.
This will set BOM to true.
You may need to re-enter Música in biography.cfg to remove the garbled version.

I'll add a fix to the next version if it isn't changed within Spider Monkey Panel.

Test code that demonstrates the issue:
Code: [Select]
"use strict";

    const fso = new ActiveXObject('Scripting.FileSystemObject');

function save(fn, text, bom) {
try {
utils.WriteTextFile(fn, text, bom)
} catch (e) {
console.log('error saving: ' + fn);
}
}

    function file(f) {
return fso.FileExists(f);
}

function open(f) {
return file(f) ? utils.ReadTextFile(f) : '';
}

    const bio = 'Música';
 
    console.log('TEXT: ', bio);
    console.log('Save file using utils.WriteTextFile. Save with or without BOM and with different extensions. Then use utils.ReadTextFile to read the file.');
    console.log('RESULT: the combination of extension being cfg & and saving without BOM causes bad handling');

    save('z:\\testBio.cfg', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.cfg; READ TEXT: ', open('z:\\testBio.cfg'));
  
    save('z:\\testBio.cfg', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.cfg; READ TEXT: ', open('z:\\testBio.cfg'));
  
    save('z:\\testBio.txt', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.txt; READ TEXT: ', open('z:\\testBio.txt'));
  
    save('z:\\testBio.txt', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.txt; READ TEXT: ', open('z:\\testBio.txt'));
  
    save('z:\\testBio.json', bio, false);
    console.log('SAVE: BOM false; EXT: cfg; FILENAME: z:\\testBio.json; READ TEXT: ', open('z:\\testBio.json'));

    save('z:\\testBio.json', bio, true);
    console.log('SAVE: BOM true; EXT: cfg; FILENAME: z:\\testBio.json; READ TEXT: ', open('z:\\testBio.json'));

I tried this and in the biography.cfg "Música" doesn't change now but the pannel continues creating a "Música" folder.

I tried with the fix version when you released it.

Thanks

Re: Biography Discussion

Reply #685
Hi @WilB . I'm using your scripts, thanks for your work.
Is it possible to add Lastfmtoptags to your Biography script ? I'm talking about this script  https://hydrogenaud.io/index.php?topic=109848.msg904750#msg904750 that can add this tag to the files (it's a wsh panel script ) . Using your script it's possible to add tags from LastFm and allmusic, so I thought this will be a nice addition to this script.

Re: Biography Discussion

Reply #686
Quote
New Version: Biography
v1.2.0-Beta.1
The settings menu is just great. cool.
It's a pity that I'm not a programmer and I don't know how to do this.
UR5EQF. Ukraine

Re: Biography Discussion

Reply #687
Hi @WilB, great work, 1.2.0-Beta is super! Thank you!

Re: Biography Discussion

Reply #688
I have a problem v1.2.0-Beta.1
I can't delete the folder of selected album that seeing the biography or cover.

Re: Biography Discussion

Reply #689
@MaFred & @kgena_ua
Thanks! :)

@Koshingg
Biography provides Lastfmtoptags, referred to as genres. They're available for artist & album.

@michaengfrv
This seems to be down to how the SMP image functions work that load by path. They don't seem to release the folder after the image is loaded. I've tried LoadImageAsync, LoadImageAsyncV2 & gdi.Image and have seen the issue with all three. I'm not sure if this is fixabe in SMP. In the meantime, changing to a track that's not using the image should release the folder quickly and you'll be able to delete it; reload the panel if there's still an issue.

Main album covers are loaded by GetAlbumArtAsync from patterns in file\preferences\display\albumart. That function should allow deleting the folder after the image is loaded; it works here. Ensure the filmstrip isn't using the image, as that loads using LoadImageAsync, and that foobar2000 isn't playing music from the folder to be deleted. You can set filmstrip to show only if > 1 thumbnail (options > image).

Re: Biography Discussion

Reply #690
Where should I register the paths from INI file

[SAVE]
Album Review [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))
Album Review [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))
Biography [Allmusic] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Allmusic,%profile%\yttm\biography\allmusic\$lower($cut(%BIO_ARTIST%,1)))
Biography [Lastfm] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\biography\lastfm\$lower($cut(%BIO_ARTIST%,1)))
Image [Artist] Folder=$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images,%profile%\yttm\art_img\$lower($cut(%BIO_ARTIST%,1))\%BIO_ARTIST%)
Image [Review] Folder=$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Images,%profile%\yttm\rev_img\$lower($cut(%BIO_ALBUMARTIST%,1))\%BIO_ALBUMARTIST%)

Re: Biography Discussion

Reply #691
They should be read in automatically on updating to the new version.

If not, or it's a new install, go to the right click menu > options > Server Settings (All Panels) Tab > Download Tab
Paste them in the respective positions therein.
Note that you have to paste only the part of the string after the equal sign, starting at $puts.
e.g. for last.fm biography paste:

Code: [Select]
$puts(s,'\'$lower(%BIO_ARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Lastfm,%profile%\yttm\biography\lastfm\$lower($cut(%BIO_ARTIST%,1)))

Re: Biography Discussion

Reply #692
Hi, I am following the installation istructions but I am receiving this error message.

create_directories: Access is denied.: "C:\Program Files (x86)\foobar2000\foo_spider_monkey_panel\tmp\unpacked_package"

Re: Biography Discussion

Reply #693
Please see the troubleshooting guide in the spoiler for standard foobar2000 installs.

Re: Biography Discussion

Reply #694
@zoumbro
"C:\Program Files (x86)\foobar2000\foobar2000.exe" Right-click Run as administrator.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HIFIMAN ANANDA, HIFIMAN Arya, AKG K712 PRO, SONY MDR-1AM2, Bowers & Wilkins P7, FiiO FT5, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself) Shall I write more?

Re: Biography Discussion

Reply #695
@WilB

Tell me how to correct the code so that the reviews are saved not in the artist folder, but in the album folder, while taking into account the fact that sometimes albums have 2 disks, while you need to save them not in the CD1 folder but in the folder above, in the album folder

$puts(s,'\'$lower(%BIO_ALBUMARTIST%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Info Album\Album Review\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))

Re: Biography Discussion

Reply #696
It works as administrator, thanks

 

Re: Biography Discussion

Reply #697
@Mrakobes
You can try:
Code: [Select]
$puts(s,'\'$lower(%BIO_ALBUM%)'\')$puts(l,$len($get(s)))$puts(pos,$strstr($lower(%path%),$get(s)))$ifgreater($get(pos),0,$cut(%path%,$sub($add($get(pos),$get(l)),2))\Info Album\Album Review\Allmusic,%profile%\yttm\review\allmusic\$lower($cut(%BIO_ALBUMARTIST%,1)))

Re: Biography Discussion

Reply #698
Why are you instructing people to install the component in the player install directory if it's a standard install? Why are you instructing users to run the player with administrator access?

Re: Biography Discussion

Reply #699
Thanks for the update Wilb - it's a lot to process, esp. the new prefs, but it feels like a good step forward.

FYI, Before testing I exported my 1.13 settings and reimported them into the beta panel however:
my bio.ini settings did not correctly import to any of the "Server Settings (All Panels)" prefs.

-I really appreciate the new Missing Data check; would it be possible to add a filter to include/ignore "Various Artists" (particularly useful for bios)?
Or can someone recommend a way to remove "various artists" from playlist results?

-It would also be nice to have an option to delete images (maybe at ctrl-pref level of the blacklist option)

-What is the purpose of behaviour prefs>Extra Menu Items? I've tried hiding/showing all but can't discern a difference?