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: Album List View script regressions (Read 241 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Album List View script regressions

Hello,

I'm currently trying to upgrade to 2.24.3 from my ancient 1.6.5 installation and am running into a whole host of issues around Album List views.

I have a somewhat complicated script to configure the album list view to my liking, and to keep things maintainable it includes comments and multiple lines.

The first problem is that multi-line scripts get mangled together on safe, with newline characters being replaced with underscores.
Original:
Code: [Select]
$puts(X,%<genre>%)
$get(X)
Mangled version
Code: [Select]
$puts(X, %<genre>%)__$get(X)
Example result: __Electronic

I can sort of work around this problem by wrapping everything in a $replace(<script>,_,) call, but it's a bit icky.

The second related problem is that any comment in the script now becomes part of the output.
Code: [Select]
$puts(X, %<genre>%)
// foo
$get(X)
Example result: __// foo__Electronic

Haven't found a workaround for that yet except removing the comments.

These two alone would be manageable (just have a fancy canonical source in some text file and preprocess is before adding it in foobar), but there's also a third issue where after a certain complexity the whole script just stops working.
I can test individual parts of the script, but combining everything together just ends up returning nothing.

I'm wondering if there is come complexity limit that was implemented by just counting the total number of | in a script, instead of limiting the depth of any individual path.
My script only creates at most 5 levels of depth for any particular song, but different categories of music have their own branches so a bunch of | are actually conditional.

I could probably rewrite it to have less complex branching, but it'd be easier without the first 2 problems at the very least.

Cheers,
Shiren

 

Re: Album List View script regressions

Reply #1
Problem noted, thanks for reporting.
The newlines are indeed being replaced on save, regression since version 2.0.
Microsoft Windows: We can't script here, this is bat country.