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

Re: Biography Discussion

Reply #725
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)

Of course not.

And not avaible to install direct 12 and i can play direct12 games.

Because wine work is to translate windows api calls to linux world.

That why I show you that there are already implementations of WebView2 in wine to make online game instaler to work and you don't need to install WebView2 windows runtime to make it work.

Nobody espect that you can install some windows component in wine and it will work at that.

The new implementation will work of not, but it will depends of wine implementation not the instalation of a windows component.

This is what i'm surprised for your response. Nothing in wine works in that way and never will be.

Wine is not an emulator ;)



Sorry double post


Re: Biography Discussion

Reply #727
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 #728
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 #729
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 #730
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 #731
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 #732
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 #733
Biography already sanitizes save folders.

Re: Biography Discussion

Reply #734
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 #735
Yes


Re: Biography Discussion

Reply #737
@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 #738
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 #740
@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 #741
@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 #742
Title format
$meta(date,0) - $meta(album,0) - ?

Re: Biography Discussion

Reply #743
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 #744
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 #745
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 #746


Thanks you very much for your work.

Re: Biography Discussion

Reply #747
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 #748
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 #749
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.