Ticket #3737: mythmusic-editmeta_v1.diff

File mythmusic-editmeta_v1.diff, 1.7 KB (added by Roo <roo.watt@…>, 17 years ago)

v1: doesn't update tree after edit, but does work

  • mythplugins/mythmusic/mythmusic/playbackbox.cpp

     
    986986
    987987    // store the current track metadata in case the track changes
    988988    // while we show the edit dialog
    989     Metadata *editMeta = curMeta;
    990989    GenericTree *node = music_tree_list->getCurrentNode();
     990    Metadata *editMeta = all_music->getMetadata( node->getInt() );
    991991
    992992    EditMetadataDialog editDialog(editMeta, gContext->GetMainWindow(),
    993993                      "edit_metadata", "music-", "edit metadata");
     
    10071007               if (curMeta->ID() == editMeta->ID())
    10081008               {
    10091009                    *curMeta = editMeta;
    1010                     if (title_text)
    1011                         title_text->SetText(curMeta->FormatTitle());
    1012                     if (artist_text)
    1013                         artist_text->SetText(curMeta->FormatArtist());
    1014                     if (album_text)
    1015                         album_text->SetText(curMeta->Album());
    1016 
    1017                     setTrackOnLCD(curMeta);
     1010                    updateTrackInfo(curMeta);
    10181011               }
    10191012           }
    10201013        }
     
    20762069        //  It's a track
    20772070
    20782071        curMeta = all_music->getMetadata(node_int);
    2079         if (title_text)
    2080             title_text->SetText(curMeta->FormatTitle());
    2081         if (artist_text)
    2082             artist_text->SetText(curMeta->FormatArtist());
    2083         if (album_text)
    2084             album_text->SetText(curMeta->Album());
    20852072
    2086         setTrackOnLCD(curMeta);
     2073        updateTrackInfo(curMeta);
    20872074
    20882075        maxTime = curMeta->Length() / 1000;
    20892076