| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member | Hi, I am not really sure which classes are meant to read from music files, but I am trying to write a simple plugin that will display the file's tag information. It is more for me to learn how to use everything than for its functionality. However, I have tried many different combinations and am unable to get it to read any tags or say that it supports the file I give it. I know the mp3's have filled tag information. Thanks.
__________________ James Andrew Smith |
| | |
| | #2 (permalink) |
| Portal Member Join Date: Aug 2004 Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts
| Here you go: Code: tag = TagReader.TagReader.ReadTag(strPathSong); Sam |
| | |
| | #3 (permalink) |
| Portal Member | This is what I have and it is not working: "protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == buttonOne) { MusicTag tag = TagReader.ReadTag("M\\:\\Document and Settings\\Andrew\\My Documents\\final music final\\Adore\\03 Perfect.mp3"); string str = "didn't work, sorry..."; str = tag.Album; GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWi ndow.Window.WINDOW_DIALOG_OK); dlg.SetHeading("Button has been pressed"); dlg.SetLine(1, str); dlg.SetLine(2, String.Empty); dlg.SetLine(3, String.Empty); dlg.DoModal(GUIWindowManager.ActiveWindow); } lblOne.Label = "You changed the text!"; lblOne.UpdateLayout(); base.OnClicked(controlId, control, actionType); }" The dialog box does not come up with this; however, if I take this line out (" MusicTag tag = TagReader.ReadTag("M\\:\\Document and Settings\\Andrew\\My Documents\\final music final\\Adore\\03 Perfect.mp3");") it does show the dialog box. Why is this? What am I doing wrong? Thank you so much.
__________________ James Andrew Smith |
| | |
| | #4 (permalink) |
| Portal Member | I am sorry, there was a mistake in my previous post. If I leave that line in there (the one I said wouldnt work; the creation of the music tag) it still works. It is only when I assign the variable str to tag.Artist or any member of tag that it doesnt work. It is like it is not reading the file. The string location I pass it is correct and I know for a fact the mp3 has tags with information in them.
__________________ James Andrew Smith |
| | |
| | #5 (permalink) |
| Portal Member | Hi, I figured out my problem. I was using "M\\:\\..." instead of "M:\\". I originally had it write, but when that didnt work, I tried the first thinking that might be the problem. When you gave me the solution, I didnt change it back to the original and so it still didnt work. Now that I have used your solution and changed the location string back the original, it works. Thanks so much for your help!
__________________ James Andrew Smith |
| | |
![]() |
| Bookmarks |
| Tags |
| mp3, read, tags |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Errors reading WMA tags | samundsen | Support | 22 | 2007-03-09 16:09 |
| Getting Data from the Web | James | General Development (no feature request here!) | 11 | 2007-01-07 16:38 |
| WavPack and FLAC tags | andreassb | General Support | 0 | 2006-11-25 13:08 |
| Pictures and Tags | pavelr | Improvement Suggestions | 2 | 2006-03-25 13:04 |
| TagReader: Track number from ID3v2 not read | hwahrmann | The old Bugreport Forum | 6 | 2006-02-21 11:58 |