Gracenote CDDB
-
Hi Leute!
Ich hoffe, dass hier schon irgendjemand mit der Gracenote CDDB gearbeitet hat und mir mehr helfen könnt, als der Gracenote-Support. (die schreiben gar nicht zurück --> SUPER SUPPORT)
Ich versuche die die Titelinformationen einer schon vorhandenen Datei zu bekommen. Dafür will ich die Funktion [--> LookupMediaByFile()]:
int tracknum; string sFile = "D:\\Eigene Musik\\50 Cent\\The Massacre\\12 Ryder Music.mp3"; m_tagManager = new CddbID3TagManagerClass(); CddbDiscClass disc = (CddbDiscClass)m_tagManager.LookupMediaByFile(sFile, 0, out tracknum);
Jedoch tritt der Fehler in der letzten Zeile auf des oberen Codeblocks.
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="CollectionClearance"
StackTrace:
at CollectionClearance.CDDB.LookupFile(String sFile) in D:\Visual Studio 2005\Projects\Music Organizer\CollectionClearance\cddb.cs:line 42
at CollectionClearance.Overview.toolStripButton_cddb_Click(Object sender, EventArgs e) in D:\Visual Studio 2005\Projects\Music Organizer\CollectionClearance\Overview.cs:line 108
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at CollectionClearance.Form1.wizard1_AfterSwitchPages(Object sender, AfterSwitchPagesEventArgs e) in D:\Visual Studio 2005\Projects\Music Organizer\CollectionClearance\Form1.cs:line 167
at CristiPotlog.Controls.Wizard.OnAfterSwitchPages(AfterSwitchPagesEventArgs e)
at CristiPotlog.Controls.Wizard.OnBeforeSwitchPages(BeforeSwitchPagesEventArgs e)
at CristiPotlog.Controls.Wizard.Next()
at CristiPotlog.Controls.Wizard.buttonNext_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CollectionClearance.Program.Main() in D:\Visual Studio 2005\Projects\Music Organizer\CollectionClearance\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()Abgesehen davon, dass ich wahrscheinlich so einiges falsch gemacht hab. Wie kann ich mithilfe des CDDB Control die Titeldaten bekommen?
-
Ich habe mit der Lib leider keine Erfahrungen. Aber wenn es nur um die ID3v1 tags hilft Dir vielleicht auch dieses hier.
-
Danke für die Antwort, aber ich meine nicht, wie ich die ID3 Tags aus der Datei lesen kann, sondern ich will die passenden Daten aus der CDDB abrufen.