![]() |
|
#1
|
|||
|
|||
|
Tweaked sample
Mitch,
Great little tool, spent a while looking for something like this, most of the other stuff that's out there is pretty flakey when it comes to mp3s ripped in itunes Had to tweak the example to get both VS2005 and 2010 to work with it, tweaked code is below, keep up the good work cheers mike Private Sub getTagDetails(ByVal path As String) Dim TestUltraID3 As New UltraID3 TestUltraID3.Read(path) Try 'Read the track file TestUltraID3.Read(path) 'Display a single string representation of the common ID3 fields MsgBox(TestUltraID3.ToString) 'Display the Title, letting UltraID3 determine the appropriate tag source MsgBox(TestUltraID3.Title) 'Check to see if the ID3v1 tag was found If TestUltraID3.ID3v1Tag.ExistsInFile Then 'Display the Title property of the ID3v1Tag directly MsgBox(TestUltraID3.ID3v1Tag.Title) End If 'Check to see if the ID3v23 tag was found If TestUltraID3.ID3v2Tag.ExistsInFile Then If TestUltraID3.ID3v2Tag.Version = ID3v2TagVersions.ID3v23 Then 'Display the Title property of the ID3v23Tag directly MsgBox(TestUltraID3.ID3v2Tag.Title) 'Retrieve the ID3TitleFrame, if any Dim MyID3TitleFrame As ID3v23TitleFrame = CType(TestUltraID3.ID3v2Tag.Frames.GetFrame(Single InstanceID3v2FrameTypes.ID3v23Title), ID3v23TitleFrame) 'Check to see if the ID3TitleFrame exists If Not MyID3TitleFrame Is Nothing Then 'Display the Title property of the ID3TitleFrame MsgBox(MyID3TitleFrame) End If End If End If 'Retrieve any non-fatal exceptions which might have occurred Dim UltraID3TagExceptions() As ID3MetaDataException = TestUltraID3.GetExceptions() If UltraID3TagExceptions.Length > 0 Then 'Dim IndexUltraID3TagException As ID3TagException 'Iterate through each found non-fatal exception For Each UltraID3ContextMetaDataException As ID3MetaDataException In UltraID3TagExceptions 'Display the Message of the non-fatal exception MsgBox(UltraID3ContextMetaDataException.Message) Next End If 'Catch any fatal exceptions Catch exc As Exception MsgBox(exc.Message) End Try End Sub |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|