Adding Columns

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

imd1b4u
Posts: 30
Joined: Tue Oct 02, 2007 10:25 pm

Adding Columns

Post by imd1b4u »

As far as I know, some properties of the SongData object can not be displayed in the main Media Monkey grid. I am thinking of things such as composer, lyricist, etc. Basically, if right-clicking on the column heading doesn't list the field, it can't be added easily through scripting.

I could be wrong, however. If so, please let me know!

I realize that information can be stuffed into the custom columns and displayed that way, but at first glance, that doesn't seem suitable for the kind of things I want.

One specific situation is to save me from making the mistake of forgetting to use the insert function to add songs to the database. If you look at an audio CD through the My Computer node (for example), but never actually insert the tracts, you can still see them and edit the information for them. Everything looks OK, but if you eject the CD, everything gets lost because the tracts were never added to the database. I don't see any visual clue to warn me about that.

Is there any way to add this sort of a visual clue? I was thinking adding an "InDB" column to the main grid. Perhaps there is another way? Can the font in the main grid be changed (as is done if the files aren't available)? Is there a way to show an icon in the "My Computer" tree - perhaps a checkmark for files already in the database, an "X" if not?

By the way, if you use a script to update the information on songs on an audio CD by calling SongData.UpdateDB(), but don't insert them into the database first, the song data is added to the database, but the media is added to the Medias table with incorrect information in the IsAudioCD, CDDBld, and TOCData fields. Once this happens, it's not possible to correct this, as far as I know (short of deleting and doing it over). On the other hand, I don't know what, if anything, this hurts. The information in those fields don't seem to be used for anything. (If anyone knows what they are for and how they are used by Media Monkey I would be curious to know.) EDIT: One of the fields is CDDBId, not CDDBld, and I figured it out - It is the ID used for freedb lookups, but in decimal form.

In summary, there are two questions here:
1) Is there any way to add columns to the main grid, other than ones available by default?

2) Is there any way to add a visual clue that the songs being displayed by Media Monkey aren't in its database?
Last edited by imd1b4u on Sun Oct 14, 2007 10:54 am, edited 1 time in total.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Unfortunately as far as I'm aware neither of these is possible, although I think in MM3 the first issue isn't really an issue because I believe all the data fields can be added as columns any.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
imd1b4u
Posts: 30
Joined: Tue Oct 02, 2007 10:25 pm

Post by imd1b4u »

Thanks. That's pretty much what I was expecting, but it's good to know for sure. I'm glad to hear that MM3 is more flexible.

I really don't think the second issue is a big deal anyway. I noticed that Steegy's AssignCDMedia doesn't fix the three fields, which tends to confirm that they are not important.

Actually, I don't know why I didn't realize what the CDDBId field is, except that I was reading the "I" as an "l". But once someone has fixed up the song data in MediaMonkey, they aren't likely to want to call freedb, so having no ID for it shouldn't be a huge problem. By the way, I don't know that the freedb lookup wouldn't work in this case; I have not tested it.
imd1b4u
Posts: 30
Joined: Tue Oct 02, 2007 10:25 pm

Post by imd1b4u »

I noticed that trixmoto does the following in his SplitArtistTitle script:

Code: Select all

   For Each itm In items 
      If itm.ID>-1 Then 
         itm.UpdateDB 
      End If 
      itm.WriteTags 
   Next 'itm    
I changed my script to do the same thing - don't call UpdateDB if I'm updating a record that is not in the database. That seems like a good way to side-step the issue.

It finally clicked: A SongList object corresponds to a Visual Studio DataSet object! It's not like a DAO/ADO Recordset object, but it may (or may not) be the source of the data in the grid of the main window. SongData objects correspond to rows of the SongList object. If the SongData objects are displayed in the main MM window, any changes to them are reflected in the grid, even if the changes are not saved anywhere. If I am wrong about any of this, please let me know.

I hope they do things differently in MM3, even though that would probably break a bunch of scripts. I doubt they would, though. It's probably easier (and faster execution-wise) to do it Microsoft's way.

@trixmoto, since you are a mod, I will ask you if you think the Import database form Collectorz MP3 Collector thread should be moved. I resurrected it, but it's not in this forum.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I believe you are correct in your understanding, or at least this is how I understand it. I think it's done this way because of the speed and efficiency which makes this application so fast, even with large libraries, so I doubt it would be changed.

I have moved the thread you mention, as requested. I agree it should be in the scripting section.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply