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 111237 times) previous topic - next topic
0 Members and 1 Guest 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?

 
SimplePortal 1.0.0 RC1 © 2008-2021