Ticket #1595: Jmp-scanmusic.patch

File Jmp-scanmusic.patch, 1.0 KB (added by Karl Hiramoto <karl@…>, 14 years ago)

Patch to add jumpoint for Scan Music

  • mythmusic/mythmusic/main.cpp

     
    469469void runMusicPlayback(void);
    470470void runMusicSelection(void);
    471471void runRipCD(void);
     472void runScan(void);
    472473
    473474
    474475void handleMedia(MythMediaDevice *)
     
    484485    REG_JUMP("Play music",             "", "", runMusicPlayback);
    485486    REG_JUMP("Select music playlists", "", "", runMusicSelection);
    486487    REG_JUMP("Rip CD",                 "", "", runRipCD);
     488    REG_JUMP("Scan music", "", "", runScan);
    487489
    488490    REG_KEY("Music", "DELETE",     "Delete track from playlist", "D");
    489491    REG_KEY("Music", "NEXTTRACK",  "Move to the next track",     ">,.,Z,End");
     
    677679    postMusic(&mdata);
    678680    gContext->removeCurrentLocation();
    679681}
     682
     683void runScan(void)
     684{
     685    MusicData mdata;
     686
     687    preMusic(&mdata);
     688
     689    if ("" != mdata.startdir)
     690    {
     691        SearchDir(mdata.startdir);
     692        RebuildMusicTree(mdata);
     693    }
     694   
     695    postMusic(&mdata);
     696}