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

Re: Biography Discussion

Reply #675
Whoopee.

Back to your previous point about not needing it... why do windows users have to install it but WINE users get a free pass?

Why don't components that require IE work? According to you everything should "just work" because of that WINE magic. Nevemind all those winetricks hacks just to get scripts working. That was all imaginary right? It should all work right out of the box. LOL indeed. :/

Re: Biography Discussion

Reply #676
It seems you only need the WebView2 runtimes then?? My mistake. I assume this installs fine for you in WINE?

https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section

It's nearly 100MB which is a hefty requirement for fancy dialog boxes. Note @TheQwertiest hasn't even started work on it yet (edit: judging by github activity - no idea what he's doing offline :P)
Offtopic, but if popup windows were allowed, it would be feasible to draw them as independent SMP panels which could emulate a config window or whatever, the same we are doing with html. It would take a bit of work to create a js framework to draw arbitrary blank config panels, but can be done. Although the same can be done on the main panel with tabs right now.

Personally I prefer that approach instead of relying on ie, and the framework could be shared to be used by other scripts too, the same I shared the menu framework. Having in mind all the years most scripts have been in foobar, we are clearly reinventing the wheel with every new script and update instead of sharing stable js frameworks to work with.

Re: Biography Discussion

Reply #677
Whoopee.

Back to your previous point about not needing it... why do windows users have to install it but WINE users get a free pass?

Why don't components that require IE work? According to you everything should "just work" because of that WINE magic. Nevemind all those winetricks hacks just to get scripts working. That was all imaginary right? It should all work right out of the box. LOL indeed. :/

maybe I have not expressed myself correctly but i don't said anything like that.

On the contrary. Things in wine are not the same that if you use windows.

To something works it needs to be implemented in wine, not just install the windows equivalent.

Nothing about magic or free passes, please.

Is only how things work with an abstraction layer. Is not an emulator or a virtual machine, is a abstractin layer.



So not more easy, instead way more difficult.

above all if wue are talking about internal windows components and apis.

That how always was working and I'm using it more than 15 years.

LOL

To play a dirxt12 game i don't install direct12 in wine.

Wine translate the direct12 calls to linux to make it work.

Or use DXVK that translate to vulkan.

If I install direct12 things doesn't work

Is that way.

Nothing about magic.
   


Re: Biography Discussion

Reply #678
Back on topic.

@WilB Is it possible to change the filename of .txt files that save the component?

I will try to explain why.

the bio panel doesn't download any kind of data from allmusic (in my setup with wine) but another script (allmusic_review.js) from the sample folder does.

This script save the result in a filename named "allmusic.%album%" in the folder "profile/js_data/artists/%artist%"

(Not completely sure about if this is exact (no idea of reading script code) but seem to be)

So I thought, in my naivety, that maybe if I point bio to that txt file if will be shown in the panel.

I look at the .cfg and I just saw options to change the folder but not the filename.

So in reality the first question must be if bio will display this data and if it will do it how i could do to make them be in harmony


Re: Biography Discussion

Reply #679
I made a dirty thing but it seem to work.

I can't find the filename in bio but i found the allmusic_review one.

In text.js in samples in line 37.

Code: [Select]
this.filename = _artistFolder(this.artist) + 'allmusic.' + _fbSanitise(this.album) + '.txt';

I change that to

Code: [Select]
this.filename = _artistFolder(this.artist) + this.artist+' - ' + _fbSanitise(this.album) + '.txt'

and now the saved filename is similar to bio's one.

So i change the folder in bio.cfg

Code: [Select]
   "foAmRev": "%profile%\\js_data\\artists\\%artist%",

And the bio panel display the text saved by allmusic_review.  :o

Obviously this must be an aberration for anyone who know how to code and i suppose that I'm going to have problem with fbSanitise part and other things

So I will appreciate a more bulletproof and elegant solution.


Re: Biography Discussion

Reply #680
First  problems  ;D  (things that happen where you don't know what are you doing)

So _fbSanitise is not my enemy, it is my friend, i need it to save things like "Aidan Baker / Leah Buckareff"

and this.artist is %album artist%

So I need to "sanitise" the bio folder too.


And is this function in helpers.js

Code: [Select]
function _fbSanitise(value) {
return value.replace(/[\/\\|:]/g, '-').replace(/\*/g, 'x').replace(/"/g, "''").replace(/[<>]/g, '_').replace(/\?/g, '').replace(/(?! )\s/g, '');

So need to replace

"/\|:" to "-"
"*"  to "x"
" to '
"[<>] to "_"
"(?!)" to nothing

Is this that way?

Re: Biography Discussion

Reply #681
Biography already sanitizes save folders.

Re: Biography Discussion

Reply #682
Biography already sanitizes save folders.

Ah ok, but in this case i'm not using the saves from biography, I use the panel to load the text file saved by allmusic_review.

so my worries are about my custom defined folder in biography.cfg

Code: [Select]
"foAmRev": "%profile%\\js_data\\artists\\%album artist%",

Is this sanitized too?

Re: Biography Discussion

Reply #683
Yes


Re: Biography Discussion

Reply #685
@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)))

don't work(((  unfortunately, it does not save the review to the album folder

Re: Biography Discussion

Reply #686
My two cents:
Sort by last modified (newer first)
Code: [Select]
$nodisplay{$sub(9999,$year(%last_modified%))-$sub(12,$month(%last_modified%))-$sub(31,$day_of_month(%last_modified%)) $sub(24,$cut($time(%last_modified%),2)) $sub(60,$substr($time(%last_modified%),4,5))}[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%


Re: Biography Discussion

Reply #688
@Mrakobes
If I remember correctly you asked for it to be saved to:
album folder\Info Album\Album Review\Allmusic
I retried the snippet & it's saving to that path here.

Note that if the album name (%BIO_ALBUM%) doesn't match a folder in the path, it will save to the default path.

There is nothing special about the snippet. It's using standard foobar2000 title formatting (except for %profile%, %BIO_ALBUM% & %BIO_ALBUMARTIST%). So alter if required.

It can be easiest to check in Title Formatting Sandbox. For the purpose of that test you'll need to temporarily change %BIO_ALBUM% to %ALBUM%, as former won't be recognized.

Re: Biography Discussion

Reply #689
@WilB thank you for your support

probably there are problems with the naming of folders containing music files, according to this mask, I do not save them to the album folder

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\Lastfm,%profile%\yttm\review\lastfm\$lower($cut(%BIO_ALBUMARTIST%,1)))

my structure looks like this

Powerwolf
               |2021 - Call of the Wild
                                                  |CD1 - Album

I would like it to be stored in "2021 - Call of the Wild" it's possible??

Re: Biography Discussion

Reply #690
Title format
$meta(date,0) - $meta(album,0) - ?

Re: Biography Discussion

Reply #691
Another question - I could not configure the display of album cover with lastfm in the panel, only the local file is displayed, I would like to check the cover from my file structure with cover from lastfm

I also want to download the cover of the last fm in the "image" folder

Code: [Select]
$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\Album Front Cover,%profile%\yttm\lastfm_rev_img\$lower($cut(%BIO_ALBUMARTIST%,1)))

for some reason, this code does not download to the specified folder

Re: Biography Discussion

Reply #692
Review. 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)))

Cover image is working here as expected from your snippet. Note that it checks for a local or saved cover first & will only download if that's not found.

 

Re: Biography Discussion

Reply #693
New Version: Biography v1.2.0

Changelog

Added
- ability of third party scripts to set biography display mode
  use window.NotifyOthers('bio_followSelectedTrack', boolean), where boolean is either true [Follow selected track (playlist)] or false [Prefer nowplaying]
- option to disable console messages (options > server settings (all panels) > miscellaneous tab)
- logos if panel is inactive

Changed
- notify tags: now also supports radio streams so artist data can be displayed or used by third party scripts

Fixed
- asynchronous loading issue with multi-biography-panel layouts
- allmusic reviews and biographies should now work in WINE (thanks to @paregistrase for help with debugging)
- occasional items not appearing in menu > open containing folder

Removed
- panel properties & configure from internal menu
    - use right click of biography while pressing the windows key + shift instead
    - works better as also gives access to all package features

Re: Biography Discussion

Reply #694


Thanks you very much for your work.

Re: Biography Discussion

Reply #695
Great! That solves the stream missing tags report I got I suppose. Will update the map to use the new method to sync display, thanks :)

Re: Biography Discussion

Reply #696
I do not know if I am writing here, but if there is a folder with a Russian name on the way, then the panel crashes.

Re: Biography Discussion

Reply #697
I do not know if I am writing here, but if there is a folder with a Russian name on the way, then the panel crashes.
Nothing to do with bio, report at smp thread.

Re: Biography Discussion

Reply #698

Cover image is working here as expected from your snippet. Note that it checks for a local or saved cover first & will only download if that's not found.

Of course, I realized that the script pulls the cover from the local folder, I really want the local file to be displayed in my playlist like everyone else, and in your panel the cover with the lastfm was displayed in parallel, for comparison, and also downloaded to the designated folder

Re: Biography Discussion

Reply #699
And I also don't understand how to update, I copy with a replacement, but the paths and other settings are not saved, as if a new installation

>>> c:\Portable App\Foobar2000\foo_spider_monkey_panel\packages\{BA9557CE-7B4B-4E0E-9373-99F511E81252}\

 
SimplePortal 1.0.0 RC1 © 2008-2021