If(isequal([media type],image,1),
ifelse(
isequal([type],Clipart,1),\Pictures\[type]\removeleft([keywords],9)\,
isequal([type],Girls,1),\Pictures\[type]\[population]\,
!isequal([type],unknown type,1),Pictures\[type]\if(isequal([genre],unknown genre,1),,[genre]),
!isempty([Occasion,0]),Pictures\!Occasions\[Occasion]\[filenamedate],
isequal([keywords,0],day tripping,8),Pictures\!Day Tripping\[Location]\[filenamedate],
!isequal([Album,0],//,8),Pictures\!Picture Albums\[Album],
isequal([source],Scanner,8),Pictures\!Photographer\[artist]\![source]\[filenamedate],
isequal([source],Flickr,8),Pictures\if(isempty([artist,0]),!Source\[source],!Photographer\[artist]\![source])\[filenamedate],
isequal([source],Facebook,8),Pictures\if(isempty([artist,0]),!Source\[source],!Photographer\[artist]\![source])\[filenamedate],
isequal([source],Internet Downloads,1),if(isempty([artist,0]),Pictures\!Source\[source]\[filenamedate],Pictures\!Source\[source]\![artist]\[filenamedate]),
isequal([source],Mark Wilkinson,8),Pictures\!Photographer\[artist]\[camera]\[filenamedate],
!isequal([source],Mark Wilkinson,8),Pictures\!Photographer\[artist]\[filenamedate]),)
I'm using the COM API, which has apparently been declared a dead end.
Could Zelda have a button that would make a long and complex, multi-line expression a single line in one click, maybe, putting that into a new tab so as to preserve the multi-line work?
If(IsEqual([Media Type],Audio,1),
If(!IsEmpty([AMG Track Pick]),<img src="tooltip:web-amg-track-pick-top" width="50" valign="bottom">,)
,)
Throws unhandled exception for me. Seems that colon causes the havoc...
Any thoughts on how to get to a light background? All the other font colors are correct.
Throws unhandled exception for me. Seems that colon causes the havoc...
Lepa, the exception is because Zelda is failing to get MC's install folder due to missing registry keys (so it can't translate the "tooltip:" to a path).27.0.12 64bit and I have the key "Install Directory" under the
I've also had some problems after upgrading to 27 - reinstalling the latest 27 fixed those issues.
Before you do that, can you please let me know:
- which MC version you have, and is it 32 or 64bit
- is there a key called "Install Directory" under this Registry key: (I assume this is missing for you)
HKEY_CURRENT_USER\Software\JRiver\Media Center 27\Installer
Thanks!
@MC team: after upgrading to 27 and uninstalling 26 the "HKCR\MediaJukebox Application" key was missing for me, even though I selected the option to preserve registry settings during uninstall. It looks like the App is unregistered anyway.
Computer\HKEY_CURRENT_USER\SOFTWARE\JRiver\Media Center 27\Installer
I still have MC26 installed (not running). Zelda is connected to MC27
The background color is fixed (to match my current Theme, sorry). There are options in Settings to change the colors, but they're disabled for now.
I'll enable changing background color this weekend.
Computer\HKEY_CURRENT_USER\SOFTWARE\JRiver\Media Center 27\Installer
<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>
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?
<Prefer32Bit>false</Prefer32Bit>
"PlaylistFilter": "Smartlists\\Samples",Take care not to break the JSON format - previous line must end in a comma, and backslashes need escaping \\
Can you please try this version and let me know if it starts faster for you?Very much so, thanks zybex
https://filebin.net/q9gz97hbdg8186no
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.
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).
regex([Name],/#(?=:)(.*)#/,-2)
Cello Suite 4 in E-flat major, BWV 1010: I. Prelude
regex([Name],/#(?=:)(.*)#/,-2) Length(regex([Name],/#(?=:)(.*)#/,-2))
:/ T
displays T
: : : test ::: test ::: T
displays as test ::: test ::: T
file.GetFilledTemplate("test") = "test" (correct)
file.GetFilledTemplate(":test") = ":test" (correct)
file.GetFilledTemplate(": test") = "test" (wrong)
file.GetFilledTemplate("test()") = "test" (wrong)
save(/#test(), (), test2()#/, v_test)
[v_test]
See, this is perhaps why you should not want me to use your app... ;DNonsense, where would developers be without users that could find the bugs we intentionally put in there? ;D
This thing I just reported, was literally my first time using Zelda. First time I ran the app.Cool, feel free to report any issue you encounter.
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).The Insert Function dialog does have a "Category" column which matches the Wiki, you can sort by that. Better yet, just type "list" or "string" on the search panel to quickly filter the list.
The Insert Function dialog does have a "Category" column which matches the Wiki, you can sort by that. Better yet, just type "list" or "string" on the search panel to quickly filter the list.I was thinking more of some links above the list that would automatically jump or even better filter to the desired section. With the column, you have to click to sort, and then scroll through the list to find what you want. The type-filter is good, but it's keystrokes. It's just easier/nicer to be able to pick from a "menu".
I'll test and add Font valign, thanks for letting me know.there are definitely bugs in MC renderer. font align helps a little there. There is a bug in MC also when Theaterview is rendering text which is not default size. The first and the last row have much more vertical space between the lines
Regarding image valign... even in MC it doesn't work very well, specially when mixing text and images on the same line.
<img src="tooltip:CriticRating//imdb-square_top" width="40" valign="bottom">/
/ <font face="Hack" size="90" valign="bottom" alpha="80"><b>FormatNumber([IMDB Rating],1)<//b><//font>/
<font face="Hack" size="70" alpha="50" valign="bottom">//10<//font>/
<font face="Hack" size="70" alpha="0">[v_IMDbVotes]Repeat(/ ,Math(6-Length([v_IMDbVotes])))<//font>/
<font size="200" alpha="100">sample text<//font>
<font size="200" alpha="60">sample text<//font>
<font size="200" alpha="30">sample text<//font>
<font size="200" alpha="0">sample text<//font>
<font size="200" alpha="40">sample text<//font>
<font size="200" alpha="70">sample text<//font>
<font size="200" alpha="100">sample text<//font>
<span style=" font-size: 200%; opacity: 1.0;">sample text</span><br>
<span style=" font-size: 200%; opacity: 0.6;">sample text</span><br>
<span style=" font-size: 200%; opacity: 0.3;">sample text</span><br>
<span style=" font-size: 200%; opacity: 0.0;">sample text</span><br>
However, all you have to do is click on some other function (of the expression you're writing) and then again on the function you want, and it will reload the page at the correct location again, so I felt it would be OK to leave it like that
The performance analyzer goes into the TODO. I checked it today, and MC's API doesn't provide any info about a field type - so I have no way to select only the user-created fields. This means the analyzer would need to list all fields, or provide a way for you to select which fields you want to analyze.
<Item>
<Field Name="ID">649401942</Field>
<Field Name="Name">fix</Field>
<Field Name="Path">Categories\fix</Field>
<Field Name="Type">Playlist</Field>
</Item>
http://<yourHostname>:52199/MCWS/v1/Playlist/Files?playlist=743619254&action=JSON&fields=key,date,date%20imported,date%20%28release%29,date%20%28year%29,name,filename,file%20size,media%20sub%20type,media%20type
I really love Zelda, it's made my life so much easier when creating complex expressions.Agreed nice to have, but even more important for me is to add copy/paste from the right hand output window.
That said, there is one feature I would like...
Agreed nice to have, but even more important for me is to add copy/paste from the right hand output window.
(...) It is only not available in the Rendered Output window, even though Zelda highlights mouse selections there, as if for copy. So a little misleading.
Another documentation-related, ease-of-use issue: closed parenthesis within a comment line cause Zelda to omit the word from its right-side output window.
Example:
!* broken swap() *! ==> !* broken *!
## this is a comment, and is highlighted by Zelda
As always, thanks for a really great utility.You're welcome.
Sadly I can't try Zelda because it only runs on Windows. I have no Windows machines in my inventory at home or at work.
That said, this is an exciting project. Years ago I talked about the idea of developing a "toolbox" of expressions. Things you would use for various purposes inside of MC and be able to share with others.
Does Zelda allow you to save your expressions locally? Is there a concept of developing libraries of MC expressions, or at least "modules" which you could share with others?
do you want Ctrl+Shift+Z to do the same as Ctrl+Z ?Ctrl+Shift+Z is redo like ctrl-y in many apps so i have it on my muscle memory.
Warning: HTML tags mangled for forum display, please re-type <b>/<u>/<i> tags
Warning: ## comment lines included, remove before use## normal text, numbers, escaped blocks and chars
escaped: // /, /a /b /c /( /)
numbers: 12345, hex number: #80FF00
## functions + symbols, math functions, variables
Isrange(Find(replace(regex([Lyrics],/(\w+/),-2),;,), replace(regex([Name],/(\w+/),-2),;,)),0-10)
math(int([duration])/3600)
## saved variable
save(convertdate(25//01//2010),_date1)
replace([_Date1],2010,2024)
## HTML
<font size="200" color="#00F0FF"><b>[Name]<//b>
## escaped block
/*char(34)/*
replace(listmix(/#CompareDates([d1],[d2],[L1])#/,0,a;c;d;y;yd),;,char(13))
## normal text, numbers, escaped blocks and chars
escaped: // /, /a /b /c /( /)
numbers: 12345, hex number: #80FF00
## functions + symbols, math functions, variables
Isrange(Find(replace(regex([Lyrics],/(\w+/),-2),;,), replace(regex([Name],/(\w+/),-2),;,)),0-10)
math(int([duration])/3600)
## saved variable
save(convertdate(25//01//2010),_date1)
replace([_Date1],2010,2024)
## HTML
<font size="200" color="#00F0FF"><b>[Name]<//b>
## escaped block
/*char(34)/*
replace(listmix(/#CompareDates([d1],[d2],[L1])#/,0,a;c;d;y;yd),;,char(13))
I also was thinking that now that you're able to link directly to a field and edit it in place like this, is there a possibility of allowing the user to edit the Description field of the library field too?
I wanted to add the field Descriptions as tooltips but unfortunately the MCWS API doesn't provide them, so that's a no go.
Understood. Can you make font colours moddable? I don't much care if borders and such are light. I just would like to use darker canvas background as my eyes doesn't seem to tolerate brights as they used to and if i set background darker then font palette conflicts hard with that.
{
"ExpressionText": "#F0F0F0",
"ExpressionFunction": "DeepSkyBlue",
"ExpressionMath": "Cyan",
"ExpressionField": "LimeGreen",
"ExpressionVariable": "GreenYellow",
"ExpressionNumber": "#D27B53",
"ExpressionHTML": "HotPink",
"ExpressionSymbol": "#FF4040",
"ExpressionEscaped": "#FFFF00",
"ExpressionLiteral": "#FFA500",
"ExpressionComment": "Gray",
"ExpressionWhitespace": "#6D6D6D",
"Selection": "DimGray",
"HighlightFunction": "DarkCyan,40%",
"HighlightSeparator": "Yellow,20%",
"HighlightSelection": "Green,80%",
"EditorText": "Silver",
"EditorBack": "#1E1E1E",
"OutputText": "Chartreuse",
"OutputBack": "#1E1E1E",
"RenderText": "#F5F5F5",
"RenderBack": "#242424"
}