Null Metadata instead of Empty String


(Yusuf Cihan) #1

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


Kodular Draco :dragon:
#2

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.


(Yusuf Cihan) #3

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*.


(Ken) #4

Have you looked at this block:


(Yusuf Cihan) #5

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


#6

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


(Yusuf Cihan) #7

image
So what is that?


(Thiago Kamikaze) #9

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