• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

1stplugins

FileMaker plug-ins and Reverse Engineering

  • Plugins
    • MediaManager
  • Services
    • Reverse Engineering
    • FileMaker Plug-Ins
  • About
    • About Us
    • Contact Us
    • Terms of Use of the Website and Privacy Policy
  • Store
    • Terms and Conditions
    • Warranty Claim Guidelines
    • Contract Withdrawal Form
    • Warranty Claim Report

Media_SetMetaData

Media_SetMetadata ( containerOrFile ; informationListOrTag1 { ; value1 { ; tag2; value2 { ; tag3; value3... } } } )

Media_SetMetadata allows you to modify the ID3 metadata stored in an MP3 sound file.

Parameter Description
containerOrFile The container name or external location of the sound file.
informationListOrTag1
  • when this is the only other parameter, this value completely overwrites all metadata;
  • otherwise, this is the tag name for the value that follows
value1 Optional parameter. The value to be set for tag1 (defined in the previous parameter).
tag2; value2; … …

To give you the greatest possible flexibility, Media_SetMetadata can work in several possible ways:

Clear All Metadata

Set Field [ MyTable::Result ;
Media_SetMetadata (
filePath ;
""
) ]

In this case MediaManager will remove all metadata from the sound file.

Clear a Single Tag

Set Field [ MyTable::Result ;
Media_SetMetadata (
filePath ;
tag
) ]

In this format, you list a valid tag name (such as “Name,” “Artist,” “Year,” etc.) but do not follow with a new value, MediaManager will removes the specified tag from the sound file’s metadata.

Set a Metadata Information List

Set Field [ MyTable::Result ;
Media_SetMetadata (
filePath ;
information list
) ]

When the second parameter is not recognized as a valid tag that already exists in the file’s metadata, then MediaManager will overwrite the old metadata with this value. The assumption is that this parameter contains a completely new set of metadata with both tag names and values.

Modify a Single Tag

Set Field [ MyTable::Result ;
Media_SetMetadata (
filePath ;
tag1 ;
value1
) ]

Set Field [ MyTable::Result ;
Media_SetMetadata (
".D/riu.mp3" ;
"Year" ;
"1993"
) ]

If you want to modify only a specific tag in the metadata, you can easily do this by giving the tag name as the second parameter (such as “Year”) and the value it should hold immediately following it (such as “1993”).

Modify a Single Tag using ID3 Tags

Set Field [ MyTable::Result ;
Media_SetMetadata (
filePath ;
tag1 ;
value1
) ]

Set Field [ MyTable::Result ;
Media_SetMetadata (
".D/riu.mp3" ;
"@TYER" ;
"1993"
) ]

The parameter structure is the same as above, but the second parameter uses the “@” prefix followed by one of the standard ID3 tags. (See documentation on the Media_GetMetadata function for more information on ID3 tags. Visit http://id3lib.sourceforge.net/id3/id3v2.3.0.html#sec4 for a list of supported tags.)

Modify a Series of Tags

Set Field [ MyTable::Result ; Media_SetMetadata( filePath ; tag1; value1 ; tag2; value2 ; tag3; value3; etc. )
Set Field [ MyTable::Result ;
Media_SetMetadata (
filePath ;
tag1 ;
value1 ;
tag2 ;
value2 ;
... ;
... ;
) ]

This works the same as with modifying a single tag, but you can also define an entire series of tags to be individual modified.

File Metadata vs. Container Metadata

MediaManager distinguishes between the metadata of the external source sound file and the metadata of sound within the FileMaker Pro container field. If the first parameter (“containerOrFile”) is a container field name, only the container’s metadata will be affected. If the first parameter is a file name (or file path and file name) then only the external file’s metadata will be modified. To affect both, you must call the function twice, once for the file and once for the container.

Examples

To add a “Comment” tag to the metadata in a container field:
Set Field [ MyTable::Response ;
Media_SetMetadata (
MyTable::SoundContainer ;
"Comment" ;
"Great audio take!"
) ]

To add the same “Comment” tag to the metadata the external source file:
Set Field [ MyTable::Response ;
Media_SetMetadata (
".A/audio/take13.mp3" ;
"Comment" ;
"Great audio take!"
) ]

To change the “Artist” tag of an external file to read “The Flying Mozart Quartet”:

Set Field [ MyTable::Response ;
Media_SetMetadata (
"Aria.mp3" ;
"Artist" ;
"The Flying Mozart Quartet"
) ]

To completely replace the metadata in a container with your own list:

Set Field [ MyTable::Response ;
Media_SetMetadata (
MyTable::SoundContainer ;
"Name: Sevilla/Seville
Artist: Albeniz
Album: Spanish Nights
Track: 2/13"
) ]

To modify a series of tags and also check for errors:
Set Field [ MyTable::Response ;
Media_SetMetadata (
".D/scatological.mp3" ;
"Artist" ; "Trashcan Jeff"
"Date" ; "Late last night"
"Description" ; "You don’t want to know."
) ]

If [ not IsEmpty ( Media_GetLastError ) ]
Beep
Show Custom Dialog [ "Metadata Error" ;
"The metadata could not be set." ]
End If

To clear all metadata in a container:
Set Field [ MyTable::Response ;
Media_SetMetadata (
MyTable::SoundContainer ;
""
) ]

Primary Sidebar

Document Functions

Media_CopyItem
Media_CreateAlias
Media_CreateFolder
Media_DeleteItem
Media_ExportField
Media_ExtractInfo
Media_GetDefaultFolder
Media_GetItemInfo
Media_GetName
Media_GetPath
Media_InsertFile
Media_ListDisks
Media_ListFolder
Media_MoveItem
Media_OpenItem
Media_RenameItem
Media_SetDefaultFolder

General and Registration Functions

Media_Get
Media_GetLastError
Media_GetMouseUp
Media_JSONPath
Media_Register
Media_RegisterLicensedEncoder
Media_Set
Media_Version

Image Functions

Media_TApply
Media_TClear
Media_TCrop
Media_TQuad
Media_TResize
Media_TRotate
Media_TScale
Media_TSkew
Media_EffectApply
Media_EffectDialog
Media_ConvertImage
Media_GetImageInfo
Media_GetMetadata
Media_InsertImage
Media_ListImageOutputTypes
Media_SetImageDefaults

Script Steps

Copy Item
Create Alias
Create Folder
Delete Item
Export Field
Get Default Folder
Get Item Property
Move Item
Open Item
Rename Item
Set Default Folder

Sound Functions

Media_Amplify
Media_AppendSound
Media_ConvertSound
Media_CreateSound
Media_DrawWaveform
Media_ExtractSound
Media_FadeSound
Media_GetMetadata
Media_GetSoundInfo
Media_InsertQuickTime
Media_ListSoundOutputFormats
Media_MixSounds
Media_Normalize
Media_PlayPause
Media_PlaySound
Media_RecordSoundFormatDialog
Media_RecordSoundStart
Media_RecordSoundPause
Media_RecordSoundStop
Media_SetMetadata
Media_SoundFormatDialog
Media_StopSound

Video Functions

Media_GetVideoInfo

Footer

Let’s get started on your project.

Get in touch

  • Plugins
  • Services
  • About
  • Store

Copyright ©2006-2020 by 1stplugins, s.r.o. All rights reserved.