Null Metadata instead of Empty String

Hello,

I want to check if the metadata of all the music on the device. But I can’t control whether a part of the metadata of a file is missing. (example: if the file’s “Artist” metadata is empty.)

In short,

  • Metadata returns null instead of " ", when the file’s some of metadata’s is empty. I want to get empty string instead of null.
  • I tried if (length MetaData.Artist == 0) and if (is empty MetaData.Artist) etc…

Maybe you know that null is not equal to empty and does not mean the same.
image

Wrong. It returns if there is a error a empty string or the fail reason.
It does not return 0 or null.

Just check if the output is “not” “empty”.
Now it is your turn.

Some of my songs don’t have Metadata and I want to know which ones have not metadata. So when a file doesn’t have a metadata (not all, specific), I want it to give me an empty string value so I can use it in the IF condition.

But instead, it gives me an error. I don’t think there’s a mistake/error in my blocks because I just created this project.

So if a file does not have a specific metadata, you cannot use it in any condition expression. (including “is string?” “is empty” “length”…)

I hope I can explain my problem. I guess the blocks see this as an unconnected block so it saying *nothing*.

Have you looked at this block:

Yes, but this block is for no metadata. I need solution for just a specific metadata.

1 Like

Have you looked correct at the screenshot?!
It returns a type… So it is specific…

image
So what is that?

Do you have a solution?
I have the same problem the Metadata component does not return metadata or empty string,

2 Likes