INTERACT FORUM

Please login or register.

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

Author Topic: IsEmpty(,0) String Check Function Doesn't Work in RMCF  (Read 1471 times)

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
IsEmpty(,0) String Check Function Doesn't Work in RMCF
« on: February 20, 2018, 09:43:40 am »

I've been having trouble with a simple expression I want to use in RMCF to include the [Season] field in the filename, for files which contain a season, and omit it for files which don't. These particular files use string-type seasons, not numeric ones, so I have to do a string-type test.

I think this is because the RMCF pre-parser is replacing empty [Season] fields with zeroes before it goes to the expression engine, but I want to make sure this is on purpose and not something just broken.

Here's a very simple demonstration. I made an expression column with the following very simple expression:
If(IsEmpty([Season],0),Empty,Not Empty)

Then, I used that same expression in RMCF in the directory rule. You can see the results here:


As you can see, the two results don't match. I think I can "fix" it by testing for a zero value, but the behavior is very strange, so I thought I'd bring it up.
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: IsEmpty(,0) String Check Function Doesn't Work in RMCF
« Reply #1 on: February 20, 2018, 09:50:27 am »

I think I can "fix" it by testing for a zero value, but the behavior is very strange, so I thought I'd bring it up.

Ack. That doesn't work either. Then string-type [Season]s are all evaluated as zero when evaluated numerically. Here, I used this expression for the Numeric Test column:
If(IsEqual([Season],0,2),Empty,Not)

That works when the contents of [Season] are numeric, but when they're strings, they all evaluate as empty. I also tried Greater than and the Compare() function, and I can't get it to evaluate properly, while also working in RMCF.



Hmmm....
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: IsEmpty(,0) String Check Function Doesn't Work in RMCF
« Reply #2 on: February 20, 2018, 09:58:18 am »

Anyone have any suggestions on how to solve this?
Logged
"Some cultures are defined by their relationship to cheese."

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

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41953
  • Shoes gone again!
Re: IsEmpty(,0) String Check Function Doesn't Work in RMCF
« Reply #3 on: February 20, 2018, 10:06:45 am »

This gives "Unknown Season" for an empty season:
If(IsEmpty([Season],0),Empty,Not Empty)

So I think you would need to use [Season, 0].
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: IsEmpty(,0) String Check Function Doesn't Work in RMCF
« Reply #4 on: February 20, 2018, 10:09:17 am »

Ahh, maybe that will work. I'll give it a whirl. Thanks, Matt!
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: IsEmpty(,0) String Check Function Doesn't Work in RMCF
« Reply #5 on: February 20, 2018, 10:11:52 am »

Yep. That fixed it.


Thanks again!

Logged
"Some cultures are defined by their relationship to cheese."

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

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71427
  • Where did I put my teeth?
Re: IsEmpty(,0) String Check Function Doesn't Work in RMCF
« Reply #6 on: February 20, 2018, 10:14:01 am »

You've been AWOL for a long time.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: IsEmpty(,0) String Check Function Doesn't Work in RMCF
« Reply #7 on: February 20, 2018, 10:26:35 am »

You've been AWOL for a long time.

I know. I am still checking in periodically, just generally not commenting much. I've just been absurdly busy, with both work and being a dad, and... It is hard to get motivated to spend time.

Also, to be completely honest, though, I'm using my mobile devices far more frequently for media playback than previously, and JRemote is pretty annoying to use for video. It works brilliantly for music, and I still use it heavily for that. But I've basically abandoned using it for any kind of video playback because I can't 30-second seek ahead/back or seek half-way through a file to find my spot. And it doesn't remember playback position.

I've been using Plex, which is annoying and I hate it in so many ways, but... I hardly ever get to finish movies in one viewing anymore, and even hour-long shows I sometimes have to break up into hunks, and I just can't use JRemote without those features. I've tried Panel a handful of times, but... I'm just not really into the whole idea of using a Web App, and there are way too many other workflow issues with using it for my purposes (everyday video playback).

I still use MC for all my HTPC playback, and all of my media organization, but my uses for actual media playback have gotten more and more rare (save for basically 3-4 times per week, one hour a night, on the couch, before going to bed).
Logged
"Some cultures are defined by their relationship to cheese."

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

~OHM~

  • Citizen of the Universe
  • *****
  • Posts: 1825
  • "I Don't Play The Music The Music Plays Me"
Re: IsEmpty(,0) String Check Function Doesn't Work in RMCF
« Reply #8 on: February 20, 2018, 03:38:46 pm »

Well just know that your contributions here on Interact are missed! Along with yourself of course.... 8)
Logged
“I've Reached A Turning Point In My Life. I Now Realize I Have More Yesterdays Then Tomorrows”
Pages: [1]   Go Up