Menu

#6 Empty "genre" field

open
nobody
None
5
2002-09-29
2002-09-29
No

Please make it possible to enter an "empty" genre field.
If you just uncheck the "genre" option, the genre field is
left as is. I want to be able to _remove_ the genre
information from the mp3 file.

Discussion

  • Michael Drueing

    Michael Drueing - 2002-09-29

    Logged In: YES
    user_id=25917

    I created a small "patch" for your program to implement
    empty "genre" fields (ID3 Tag "genre" byte = 0xff).
    Only 2 functions in ID3lib.cpp need changes:

    this one.........

    /* Adds all Genres to a combobox */
    BOOL id3Lib::addGenre(CComboBox &cboGenre) const
    {
    for(int i=0; genres[i]; i++) // as long as genres
    isn't '\0'
    {
    if(CB_ERR == cboGenre.SetItemData
    (cboGenre.AddString(genres[i]), i)) return FALSE;
    }
    if(CB_ERR == cboGenre.SetCurSel(93)) return
    FALSE;
    cboGenre.SetItemData(cboGenre.AddString
    (" "),255);

    return TRUE;
    }

    ....and this one...

    int id3Lib::getGenreId(CString txt)
    {
    int i;

    if (txt == " ") return 255;

    for(i=0; genres[i] != txt && genres[i]; i++)
    {
    if(genres[i] == '\0') return FALSE;
    }
    return i;
    }

     
  • Michael Drueing

    Michael Drueing - 2002-09-29
    • summary: Empty "genre" field --> Empty "genre" field
     

Log in to post a comment.