Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Determining filetype with explorer interface: (4 Items)
   
Determining filetype with explorer interface  
When I'm using the explorer API is it possible to determine the type of file being explored?  I know I can use 
mme_explore_info_get to determine if it's a folder, playlist, file, etc. but, if it's a file, can I somehow determine if
 it's a video, audio or photo?
Thanks
Re: Determining filetype with explorer interface  
> When I'm using the explorer API is it possible to determine the type of file 
> being explored?  I know I can use mme_explore_info_get to determine if it's a 
> folder, playlist, file, etc. but, if it's a file, can I somehow determine if 
> it's a video, audio or photo?

Not using the explorer API.

To know the contents of a file, you really have to open it and parse it. You can make assumptions based on the file 
extension of course, but the explorer API doesn't do that.

On the topic of metadata (because that's how you determine what's really inside in many cases), with the explorer API, 
you can ask for metadata by using the mme_explore_position_set() function once a session is open. However, the metadata 
types available at this interface are not all that useful for what you want to know.
Re: Determining filetype with explorer interface  
Ok thanks.  We'll look into either extension filtering or doing a directed sync.  

I noticed one odd thing in the nowplaying table.  If I have an mp3 with blank information in the id3 tag, both sync and 
explorer put the "Unknown Artist"/"Unknown Album" strings in the artist/album field but sync puts a [NULL] in the title 
field while explorer puts a blank string "".  Since sqlite treats [NULL] differently than an empty string this is 
causing some issues. 

Is this expected behaviour for the explorer API?
Re: Determining filetype with explorer interface  
...
> I noticed one odd thing in the nowplaying table.  If I have an mp3 with blank 
> information in the id3 tag, both sync and explorer put the "Unknown Artist"/"
> Unknown Album" strings in the artist/album field but sync puts a [NULL] in the
>  title field while explorer puts a blank string "".  Since sqlite treats [NULL
> ] differently than an empty string this is causing some issues. 
> 
> Is this expected behaviour for the explorer API?

In the mme's configuration file, there is an option called "UnknownTitlesNull". The default value for this is enabled, 
or true, meaning synchronization processes will use a NULL value when there is no title available. Explorer does not use
 this.

So, to make them behave the same, you can change the value of this option to "false" so that sync puts the same thing in
 the database when it doesn't know the title.