INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 5   Go Down

Author Topic: ZELDA v1.0 released (Expression Language editor)  (Read 33440 times)

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #50 on: September 12, 2020, 03:58:49 am »

I have always found Latin a little suspicious  ;D I need to "install" it manually
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #51 on: September 12, 2020, 04:09:20 am »

Can confirm virustotal results for zelda.exe inside zip. Also there wasn't anything suspicious in the latest changes

Version 1.1 handles the exception but I don't get any images when using "tooltip:" notation
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #52 on: September 12, 2020, 05:48:02 am »

Thanks Lepa.

I published v1.1.2 with the following changes [VirusTotal scan, source code changes]:
- Add settings option to set Tooltip: folder
- Add logging of MC folder detection errors
- Add initial support for "valign" tag in Images [Thanks Lepa, I didn't know MC had this tag!]

So now you can go to settings and set your Tooltip folder (it also shows the detected folder, if any).
There's also extra logging - can you please check Zelda's logfile (in "%temp%\zelda" folder) and let me know which Tooltip folder it detects (if any), and any Exceptions that show up? Thanks!
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #53 on: September 12, 2020, 05:59:58 am »

Regarding the img valign support: the look in the Rendered tab doesn't currently align images in the same way as MC. I'm using the default behavior of HTML valign, whereas MC is doing something strange - the text is always aligned to the middle, which is not standard. I don't know if it's a bug in MC or just the behavior they've chosen.

For instance:
text [image with valign=bottom] more text
=> In HTML the image bottom is aligned with the bottom of the text (text+image on the floor). In MC, the text is centered vertically to the image.

text [image with valign=top] more text
=> in HTML the text and image are now aligned on top. In MC, there's no difference - text is again in the middle.

It seems MC only considers these alignments when there are multiple images on one line - then the top/bottom alingments work as expected *for the images*. However, text is always middle-aligned in respect to the images. If feels like a bug.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72436
  • Where did I put my teeth?
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #54 on: September 12, 2020, 07:04:27 am »

<rant>Heuristics sucks. This is an app that doesn't write anything to the Registry, doesn't drop any other files anywhere on the system except for itself and a JSON file in the %appdata% folder. Doesn't hook any system handlers. But sure, it's suspicious... then you have some malware out there that starts encrypting each and every file on your system (ransomware), and it gets to do so without the AV stopping it after a few files. sigh.</rant>

+1
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #55 on: September 12, 2020, 10:16:04 am »

Thanks for the update. No MS Defender intervention this time and also images now loaded when using manual folder configuration
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #56 on: September 12, 2020, 10:22:53 am »

Great! I'd still like to know why it's not detecting the MC folder on your PC :/ If you can check the log file I'd appreciate it.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #57 on: September 12, 2020, 01:43:00 pm »

Great! I'd still like to know why it's not detecting the MC folder on your PC :/ If you can check the log file I'd appreciate it.
Where do I find the log file?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #58 on: September 12, 2020, 02:37:05 pm »

It's in your temp folder, you can there get by pressing WIN+R and then type "%TEMP%\Zelda". You can also type it in the Explorer address bar directly (not internet explorer).
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #59 on: September 12, 2020, 03:18:51 pm »

Lepa, nevermind, Xpto has managed to reproduce it. The fix is simple - looks like I've been shipping 32bit builds instead of x64 builds, and that's causing some problems accessing 64-bit MC. i didn't see it because my debug builds are all x64.

This comes down to a stupid default in Visual Studio, which compiles to 32bit even when we say we want a 64bit binary  ::)
One line fix in next release:
    <Prefer32Bit>false</Prefer32Bit>

Published v1.1.4, should autodetect tooltip folder correctly now (fingers crossed)
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #60 on: September 12, 2020, 03:28:43 pm »

Yes, I saw that those exceptions in log. Let's try the new one then  :)
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #61 on: September 12, 2020, 05:38:56 pm »

A note for other users.

Windows Defender is never off. I run Norton Antivirus and Firewall. When I downloaded Zelda.exe version 1.1.14 Chrome tried to stop it. I selected "Keep", then ran it. Windows Defender, which is supposed to be off when Norton is running, intervened. See the first image.

Microsoft Defender Smartscreen (note name change  ::) ) even hides how to continue under the "More Info" link, because we can't be trusted to know what we are doing. Okay, that is probably correct for many people.  ;)
See the second image.

The Norton Firewall kicked in when I ran Zelda anyway, but at least it was going to allow it. I do note however that Zelda seems to call back to GitHub on startup. Is that intended?
See the third image.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #62 on: September 12, 2020, 05:56:06 pm »

It's checking github for a new version at startup
https://github.com/zybexXL/Zelda/blob/master/Zelda/Upgrade/AutoUpgrade.cs
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #63 on: September 12, 2020, 05:58:31 pm »

 8)
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #64 on: September 13, 2020, 04:09:47 am »

Thanks Roderick, Lepa.
Yes, Zelda connects to Github to check latest version.

(sorry for the long slightly-offtopic post, but I think this needs clearing up as there are misconceptions floating around)

Note that Defender SmartScreen is not an antivirus, it's just another security module in the Defender family. It can also be disabled in Defender settings, under "App & Browser control" (in fact, ALL defender modules can be permanently disabled one way or another, but only do so if you know what you're doing). Norton also has a module that does the exact same thing as SmartScreen so there's no need to have both active (Norton Lifelock? WTF... perfect name for the pandemic!). Note that Norton also has multiple modules than can be independently disabled - it's not called Norton AV, it's Norton Security.

Here's a rundown of the differences between modules:

Smartscreen: when a new/downloaded app is starting for the first time, Smartscreen sends the app name, hash and digital signatures to Microsoft to check if this is a known file. So any new executable file can trigger it unless it's from a well known publisher. Smartscreen also does the same for every webpage you visit (with IE/Edge), making your browsing a bit slower - Chrome does the same for URLs and downloads. As an added bonus they get to keep an entire history of everything you execute and every site you visit. I wonder why I turn it off...

Antivirus: This is purely local. It searches the file to check if it contains any signature (byte-sequence) of known malware, using a signature database which contains millions of signatures and is updated frequently. While Smartscreen only checks the initial EXE (and only by filename/hash), this one checks the entire contents of the EXE, and also checks all files that the EXE opens while it's running (hence the general system slowdown). This is where it can easily trigger problems for MC and other apps, because Video and Audio data are so large and random that they can easily contain one of the byte sequences recognized as known malware (some are very short), and then the file access is blocked. If the app is not expecting the access to be blocked, it can crash when this happens.
Antivirus goes yet a bit further to try to detect new/unknown threats: it tries to detect unusual activity from new EXEs (like network/web access, system folder/file accesses, registry writes, keyboard capture, etc), and if it considers the activity suspicious it will upload the EXE to their servers so that it can be analyzed. This behavioral, non-signature-based analysis is what is called "Heuristics". While this is a good method to find new threats, I find it extremely lacking and finicky - it often fails to flag known malware like ransomware, while at the same time uploading innocuous files over and over just because they lack a digital signature or contain the sequence "BTC" inside. YMMV with different antivirus. All of them can be disabled, including Defender, but it's good to have one. Some allow disabling heuristics, at least in the old days.

Firewall: This is just a control of all network connections made to/from an app, blocking unexpected connection requests or asking for authorization when needed (and configured to do so). Never disable it for internet access, of course. It's also useful to find out what a given app is up to, as you've highlighted above. A badly configured firewall also analyzes connections within the PC itself (applications/modules talking to each other via "localhost"); this should not be blocked and can easily cause applications to stop working, so usually the firewalls are automatically configured to ignore localhost<>localhost traffic.


I find Defender AV to be one of the most balanced out there in terms of speed, unobtrusiveness and having good detection capabilities. Norton and Karspersky have become a slow bloated mess (as McAfee did). In the old days I used ESET and Trend a lot (more enterprisey products), but as an individual user I find Defender more than adequate - but you do need to exclude many filetypes from scanning if you want a fast PC; I usually exclude all media types (*.mp3, flac, avi, mkv, mp4, etc), compressed archives (7z, zip, rar), and a few more. I've had zero problems with MC, I don't even exclude it from scan. Defender Firewall is also good and enough, so nowadays I don't install any other security product.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #65 on: November 23, 2020, 03:52:45 pm »

Hey zybex: I'd love to use your cool application, but I can't really effectively use it. When you start up, it loads ALL Playlists in MC. Since some of my Smartlists are either (1) extremely large (I have an All Files list, for example, and other big lists for utility purposes), (2) fairly slow (because of multiple nested searches, utility lists that check for missing files, and things like that), and (3) I have a ton of them, it takes seriously 10-15 minutes just to start Zelda up on my system.

Could we get a command line option that limits the scan to a provided Playlist Group and children, instead of always searching the entire Playlist Tree?
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #66 on: November 23, 2020, 04:36:29 pm »

Sure Glynor. I though I had already added a FastStart option, but apparently not...

Can you please try this version and let me know if it starts faster for you?
https://filebin.net/q9gz97hbdg8186no

If not, please do this:
- open folder %localappdata%\Zelda in explorer
- open Zelda.json in Notepad or Notepad++
- add this line anywhere before the closing bracket - change the filter to whatever you want:
  "PlaylistFilter": "Smartlists\\Samples",
Take care not to break the JSON format - previous line must end in a comma, and backslashes need escaping \\

Then run that Zelda version. Let me know what works and I'll include it in next release.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #67 on: November 23, 2020, 05:14:42 pm »

Glynor's comment illustrates how important it is to think outside the box when considering use cases in relation to performance variations regarding MC: something like what he described has never, and probably will never happen to me.  And all because I'm not much of a playlist user. I have just a few, and they're not very big.  Startup is virtually instantaneous for me. Without his comment, I wouldn't have thought playlists would be a big difference.

On the other hand I marvel as to why it will sometimes take MC 30s to close after I hit the X!
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #68 on: November 24, 2020, 07:39:23 am »

Can you please try this version and let me know if it starts faster for you?
https://filebin.net/q9gz97hbdg8186no
Very much so, thanks zybex
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #69 on: November 24, 2020, 09:19:15 am »

Published Zelda v1.2: [source code changes]:
- Add FastStart setting (skips playlist counts)
- Add Playlist enumeration timeout (10 seconds)
- Add Playlist Filter

To upgrade, you can just start Zelda and click on the "new version available" label on the status bar. Alternatively, get it here.

The Fast Start option should be enough to fix the startup delay when having slow/many playlists. Even with that option off, I now added a 10 second timeout - if startup is taking more than that, it will automatically skip counting files (basically auto-enabling fast-start). So when you run this version for the first time it should take no more than 10-15 seconds, then you can go to Settings and enable the FastStart if you wish.

The Playlist Filter allows you to load only a subset of the playlists. If will only load playlists containing the specified text in their path\name. You can enter multiple values separated by semicolon, as the screenshot shows. Thanks to Glynor for the suggestion! :)


Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #70 on: November 26, 2020, 11:10:04 am »

Sorry. I didn't get to try your test build, though it appears that you've incorporated the changes in the new regular build. From the change-log, that'll solve it completely for me.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #71 on: November 27, 2020, 01:17:03 pm »

This does work. However, I discovered an issue. If I set a Playlist Filter, and then later move/rename that playlist group, then Zelda refuses to load and I had to reset the JSON. So, you may want to check for that error condition and auto-reset to "normal" in a future build.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #72 on: November 27, 2020, 04:50:32 pm »

Thanks Glynor, that needs fixing... I can either reset the filter when there are no matching playlists (load all lists), or perhaps I can make it load a well known list like "recently played". This would allow Zelda to load and the user can then go and fix Settings. What do you think?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #73 on: November 27, 2020, 06:42:34 pm »

I'd go back to the default first-run behavior, which with my giant and slow lists worked just fine (with the 10-second timeout and switch to Fast Mode).

All I did when I inadvertently "tested" this was to delete the JSON files for it entirely, and then I was able to recover fine.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #74 on: November 27, 2020, 06:47:24 pm »

I should note: Or, change the overall behavior to load/cache the lists individually on demand, and then you could strip the whole thing out. But, of course, that is a much bigger thing.

I think you've got it now, just kill that option if it is invalid instead of dying.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #75 on: November 28, 2020, 07:12:37 am »

That's not really possible. Zelda does 2 things:
A. get the NAMES of all playlists available - this is fast
B. get the FILE COUNT (not the file list) in each playlist to display on the dropdown - this can get very slow, especially with many/complex Smartlists, and even worse if they have calls to IsMissing(). The delay is purely on MC side, since it recalculates each playlist content.

The "Quick Start" option skips B, but I can't really skip A unless you want to type the name of the playlist each time you want to load it.
The "Filter" option still needs to do A in order to get the names and ignore the ones that don't match the filter. So it doesn't really speed up anything. The 10 second timeout also only applies to B, since Zelda still needs to get all Playlist names. The actual playlist content (file list) is only loaded when you select one of the lists from the dropdown (at startup it auto-loads the same as last time).

I think A is very fast, but I'm not sure because I don't have many playlists. Can you tell me how long it takes for Zelda to start on your PC with the Fast Start enabled and a small playlist selected?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #76 on: November 28, 2020, 10:51:35 am »

Ahh. Yes, A is fast enough. B is what is slow (getting the count of a playlist is the same as getting the contents). I'd assumed you were getting the file listing and caching it at startup, mostly based on the slowness. And I meant just pull the listing of files when the list is selected in the combobox. That's how all of my list-based applications work.

But you're actually already doing that, you're just also pulling Playlist.Count() at application launch. It is worth noting that for many of my lists then, the count displayed is often wrong anyway, because when I then select the list it'll be recalculated which may result in a different count (depending on the list in question).

Hopefully you don't use that initial count for anything other than display (or it might get horribly confused when the count doesn't match what it found initially).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #77 on: November 28, 2020, 11:43:45 am »

Yep, the count is just for display on the playlist dropdown, and to hide playlists with zero files.
When a list is selected it gets the actual list of files from MC.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #78 on: November 28, 2020, 11:51:05 am »

Published Zelda v1.2.1: [source code changes]:
- Don't exit when PlaylistFilter excludes all playlists (show warning)
- Reload playlists after changing Filter
- Show full playlist paths

To upgrade, you can just start Zelda and click on the "new version available" label on the status bar. Alternatively, get it here.
Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #79 on: December 02, 2020, 03:41:25 pm »

Hey Zybex,

Love Zelda and was using version 1.2.1 last night in trying to learn how to do pretty tooltips and a better Theater View, but after a Windows update last night (including .Net Framework), I'm getting a "Microsoft .Net Framework" error when trying to open the program. And if I hit "Continue," no playlist will load when I'm in the program. Not sure what's going on, but I attached the "Details" on a txt doc.

I should also note I tried uninstalling and reinstalling MC, but that didn't help (and because I stupidly forgot to do a library backup, lost all my tooltip/Theater View work--not my day today).

Edit: Sorry, should have included a pic of error.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #80 on: December 03, 2020, 03:08:14 am »

Hi timwtheov, thanks for reporting this issue.
It was not Windows Update, the crash is caused by having the "Show All Expressions" option enabled at startup - see screenshot.

The issue is now fixed in v1.2.2. To upgrade, please do one of these:
Method 1:
- just replace Zelda.exe with the one from latest release: https://github.com/zybexXL/Zelda/releases/tag/v1.2.2

Method 2:
- open folder %localappdata%\Zelda
- open ZeldaState.json in notepad
- change the line " "TableShowAll": true,"  to " "TableShowAll": false,"
- restart Zelda, use the auto-upgrade to upgrade to v1.2.2
- now you can reenable that option on Zelda


Tip of the day: Press SHIFT+WIN+S to do a screen capture with Windows Snip&Sketch. You can draw a rectangle around the area to capture, and then add highlight, crop, etc.
Logged

timwtheov

  • Galactic Citizen
  • ****
  • Posts: 354
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #81 on: December 03, 2020, 07:39:08 am »

Just updated: thanks!
Logged

mvandyke

  • World Citizen
  • ***
  • Posts: 159
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #82 on: December 14, 2020, 03:59:00 pm »

Just a quick heads up that I believe that there is small error in Zelda v1.2.2

if I insert a image as follows :  <img src="F:\JRiver Data\Images\AV\1024x3.png">

It will not show in Zelda but it will show in JRiver

If I remove the .png in the file name <img src="F:\JRiver Data\Images\AV\1024x3">

It will show in Zelda but will not show in JRiver. 

So, I need to have in defined as a .png to show in JRiver but only shows in Zelda without the .png

Thanks for all your work on the program, it's helped me out quite a bit.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #83 on: December 14, 2020, 04:29:42 pm »

Thanks mvandyke,

Yes, that's a bug caused by a recent-ish change in MC. When I wrote that code MC was only accepting PNGs, and it only accepted paths without the .png extension. Now they added support for JPG, BMP and possibly others, so the extension must be there... EXCEPT on the "Tooltip:" folder, where for some reason the .png must still be removed.

I'll do some extra testing and publish a fix next week.
Logged

mvandyke

  • World Citizen
  • ***
  • Posts: 159
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #84 on: December 14, 2020, 07:50:31 pm »

Thanks mvandyke,

Yes, that's a bug caused by a recent-ish change in MC. When I wrote that code MC was only accepting PNGs, and it only accepted paths without the .png extension. Now they added support for JPG, BMP and possibly others, so the extension must be there... EXCEPT on the "Tooltip:" folder, where for some reason the .png must still be removed.

I'll do some extra testing and publish a fix next week.

Thanks so much.  Appreciate all the hard work and updates that you've provided.  I know that I could not have done my project without your help and the tools that you've provided.

Matt
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #85 on: December 21, 2020, 04:42:58 pm »

Published Zelda v1.2.5: [source code changes]:
- Fix PNG in "tooltip:" folder (remove extension)
- Add support for JPG/BMP/GIF/TIF images
- Add ListMix2()

To upgrade, you can just start Zelda and click on the "new version available" label on the status bar. Alternatively, get it here.
Logged

mvandyke

  • World Citizen
  • ***
  • Posts: 159
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #86 on: December 22, 2020, 06:44:55 am »

Thanks for the update.  Will install and report back.
Logged

mvandyke

  • World Citizen
  • ***
  • Posts: 159
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #87 on: December 22, 2020, 10:20:44 am »

Some good headway but still a couple of challenges:

If the image files is in Tooltip directory, I can't get Zelda to display the image through Rendered Output with or without the .png

If the image file is in another directory "F:\JRiver Data" then it does display with the .png extension, but does not without the extension.

Here is the test that I did:

<img src="tooltip:1024x3.png">

<img src="F:\jriver data\images\av\1024x3.png">

<img src="tooltip:1024x3">

<img src="F:\jriver data\images\av\1024x3">

the image us just a grey line but you can see in the attached file that it only displays on 2nd one.

Thanks for all of your help.  Let me know if you need more information.

Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #88 on: December 22, 2020, 10:59:32 am »

This works fine for me, using the same filename for the png:
<img src="tooltip:1024x3">

Do you have the file in some subfolder of the .\Data\Tooltip folder? If you, you need to add that to the path like so:
<img src="tooltip:sub1\sub2\1024x3">

If it still doesn't work, perhaps Zelda is misdetecting your Tooltip folder location. Try using the "browse" icon on the "Insert Image" dialog to see what path it's resolving to. You can also override the Tooltip path in Settings. Perhaps you entered something there already? Just leave the option unchecked to use the default Tooltip path (and see what it is).
Logged

mvandyke

  • World Citizen
  • ***
  • Posts: 159
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #89 on: December 22, 2020, 12:51:47 pm »

This works fine for me, using the same filename for the png:
<img src="tooltip:1024x3">

Do you have the file in some subfolder of the .\Data\Tooltip folder? If you, you need to add that to the path like so:
<img src="tooltip:sub1\sub2\1024x3">

If it still doesn't work, perhaps Zelda is misdetecting your Tooltip folder location. Try using the "browse" icon on the "Insert Image" dialog to see what path it's resolving to. You can also override the Tooltip path in Settings. Perhaps you entered something there already? Just leave the option unchecked to use the default Tooltip path (and see what it is).

It was the configuration in Zelda.  I specified another directory as some point and when I removed the checkbox - all worked OK for the tooltip- file without the extension (.png).  It will only display files that have the .png extension if they are outside of the tooltip directory path.  I can easily work with that as I understand the rules now.

Thanks so much for all of the hard work!
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #90 on: December 22, 2020, 12:57:12 pm »

Good :)
You can still have non-PNG files in the tooltip folder, but then you need to specify the full path (doesn't work with "tooltip:" in MC).
Like so:
<img src="C:\Program Files\J River\Media Center 27\data\tooltip\logo.jpg">
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #91 on: January 01, 2021, 01:22:11 am »

Zelda gives different results from MC for this:
Code: [Select]
regex([Name],/#(?=:)(.*)#/,-2)
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #92 on: January 01, 2021, 05:55:15 am »

That's very unlikely (but not impossible), as Zelda is only passing the expression to MC for evaluation and then displaying the returned value unmodified. The only way I can think of where they could differ is if the evaluation codepath in MC is different for UI evaluation versus API evaluation. It's possible, but then it would be an MC bug.

I can't reproduce it on MC 27.0.47. Can you provide a sample [Name] where you see this happening, and what are the results shown in MC and in Zelda for that string?

Starting a regex with a positive lookahead is unusual, perhaps MC's regex engine is producing non-deterministic output because of that. The expression you wrote is basically the same as "(:.*)", or ": (.*)" if you don't need the colon (had to add an extra space there because the forum was showing it as a sad smiley). Also, mode -2 here doesn't make much sense - the expression will only ever return 1 capture due to the (.*), unless the [Name] has multiple lines of text.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #93 on: January 01, 2021, 01:08:09 pm »

Squirrels often achieve things that others think are very unlikely (or impossible).   ;D

I didn't say it was a good regex. It's just some intermediate junk I accidentally had in there while testing something.  It's the fact that there was a difference that caught my attention.

Here's a [Name]
Code: [Select]
Cello Suite 4 in E-flat major, BWV 1010: I. Prelude
Note the leading : (followed by a space) in the MC output, which is absent from the Zelda output.
Interestingly, and also impossible, both MC and Zelda consider the length of their output to be 12.  12 is the wrong answer for the output displayed by Zelda.

You can test that with this:
Code: [Select]
regex([Name],/#(?=:)(.*)#/,-2) Length(regex([Name],/#(?=:)(.*)#/,-2))
Here's the comparison:
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #94 on: January 01, 2021, 01:52:36 pm »

Interesting. It shows correctly for me, with the leading colon. The length check also confirms that the colon is there... only not visible to you for some reason. Does the colon show up if you just type ": something" in Zelda? This issue would not be caused by any given expression or function, so just trying to print the text directly should also have the same result.

2 or 3 possibilities occur to me:
- did you change the Font in Zelda settings? If so, try another one with "regular" style, size 10 or 12. Default is "Consolas 10, regular"
- Are you sure that's a regular ":" symbol and not a visually-identical unicode colon? If it's a non-standard colon symbol, then the selected font in Zelda must have it, or it won't be rendered. Changing the font could also fix it in this case.
- do you have any Zoom/Scaling factor enabled in windows? If so, can you tell me exactly which settings you use so I can try replicating it - there are several ways to enable Scaling in Windows 10, and some of then interfere quite heavily in how text is rendered by applications.

Also try a string with multiple colons like "::: test ::: test :::" to check if it's all colons being suppressed (font issue) or just the leading one.

Is the colon supressed both in the Playlist (datagrid) and "Text Output" tabs, or just in the Playlist tab?
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #95 on: January 01, 2021, 02:49:24 pm »

I didn't think to do the tests you suggested on the other tabs. Interesting results.

Although I never changed any font settings for Zelda, when I went into that dialog, the default was set to Consolas 11 regular, if that is noteworthy.  I tried changing the font settings, and that had no effect.

It happens in all the tabs, not just the playlist tab.

The leading colon is suppressed if it is followed by a space. If it is followed by almost any other character (including another colon), it is not suppressed and everything is fine. Colon followed by / and a space (an escaped space in MC parlance) is also suppressed. So
Code: [Select]
:/ T displays
Code: [Select]
T
An arbitrary number can be suppressed, as long as they are at the start of line 1:
Code: [Select]
: : : test ::: test ::: Tdisplays as
Code: [Select]
test ::: test ::: T
A colon space that starts an additional line after a carriage return (line 2) is not suppressed. It only happens at the start of "line 1" in the input field.

It's interesting to watch, if you type colon space T
You see the colon appear, then the space is invisible of course, then you hit T and you see the colon disappear and the T shifts over to the left to the start of line where the colon was. Same effect for colon space / T

I'm running Zelda 1.2.5 from the zip, not the installer, on Window 7x64. No zooming, no scaling, normal EN/US, and of course it's a regular colon.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #96 on: January 01, 2021, 03:06:33 pm »

Thanks, now I managed to reproduce it too.
The key is that it needs to be at the start of the string (line 1). When I do my tests I usually reuse the same Zelda panel so it's common to have other expressions above... I was testing your case on line 10 of my test tab #15 :)
Also, you're right, the default is Consolas 11, not 10.

This is a bug in MC - it's the "unlikely" case I outlined above.

@Matt,
Can you please check why this happens on the COM API but not on MC's UI:
file.GetFilledTemplate("test")      = "test"  (correct)
file.GetFilledTemplate(":test")     = ":test" (correct)
file.GetFilledTemplate(": test")    = "test"  (wrong)

Thanks, and happy new year!
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #97 on: January 01, 2021, 03:30:18 pm »

This reminded me of another recent oddity I found and mentioned here - The string "()" will get suppressed from any expression or field output:
Code: [Select]
file.GetFilledTemplate("test()")    = "test"  (wrong)
Here I can understand the reasoning - the EL Engine thinks that we are referencing a Test() function which doesn't exist, so it just returns "test". However on the UI this does not happen so I think the API should also return "test()" for consistency.
Worst, this happens when simply outputting any field value which contains "()":
Code: [Select]
save(/#test(), (), test2()#/, v_test)
[v_test]

This outputs "test, , test2" when using the API, and "test(), (), test2()" when using an Expression column on MC.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #98 on: January 01, 2021, 03:49:31 pm »

See, this is perhaps why you should not want me to use your app...   ;D

This thing I just reported, was literally my first time using Zelda. First time I ran the app.

Everything you just mentioned as "another recent oddity" I have never tried using the API. Presumably I'll stumble over those on my 2nd use.

Overall though I like it Zybex. Nice job. I'd like it better if you could drag to re-order tabs, and to re-order columns in the playlist view.  I especially like what you did with insert function, and with the live wiki below the editing pane. That's nice. It would be good if the Insert Function dialog had grouping like the wiki to make it easier to find things (String Functions, List Functions, etc).

Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2612
Re: ZELDA v1.0 released (Expression Language editor)
« Reply #99 on: January 01, 2021, 03:51:00 pm »

Matt,
Looks like the GetFilledTemplate() is adding an extra Clean() to the expression. Doing this on MC UI exactly reproduces the behavior we're seeing on the API/Zelda.
Logged
Pages: 1 [2] 3 4 5   Go Up