diff options
-rw-r--r-- | language/English/strings.po | 6 | ||||
-rw-r--r-- | xbmc/dialogs/GUIDialogContextMenu.h | 1 | ||||
-rw-r--r-- | xbmc/music/windows/GUIWindowMusicSongs.cpp | 12 |
3 files changed, 17 insertions, 2 deletions
diff --git a/language/English/strings.po b/language/English/strings.po index 963f2e4839..516548d310 100644 --- a/language/English/strings.po +++ b/language/English/strings.po @@ -5315,7 +5315,11 @@ msgctxt "#14099" msgid "Eject disc when CD ripping is complete" msgstr "" -#empty strings from id 14100 to 15014 +msgctxt "#14100" +msgid "Stop ripping CD" +msgstr "" + +#empty strings from id 14101 to 15014 msgctxt "#15015" msgid "Remove" diff --git a/xbmc/dialogs/GUIDialogContextMenu.h b/xbmc/dialogs/GUIDialogContextMenu.h index 514f9554c1..a901bd0160 100644 --- a/xbmc/dialogs/GUIDialogContextMenu.h +++ b/xbmc/dialogs/GUIDialogContextMenu.h @@ -36,6 +36,7 @@ enum CONTEXT_BUTTON { CONTEXT_BUTTON_CANCELLED = 0, CONTEXT_BUTTON_PLAY_DISC, CONTEXT_BUTTON_RESUME_DISC, CONTEXT_BUTTON_RIP_CD, + CONTEXT_BUTTON_CANCEL_RIP_CD, CONTEXT_BUTTON_RIP_TRACK, CONTEXT_BUTTON_EJECT_DISC, CONTEXT_BUTTON_EJECT_DRIVE, diff --git a/xbmc/music/windows/GUIWindowMusicSongs.cpp b/xbmc/music/windows/GUIWindowMusicSongs.cpp index 3880038a87..5c70a23cbb 100644 --- a/xbmc/music/windows/GUIWindowMusicSongs.cpp +++ b/xbmc/music/windows/GUIWindowMusicSongs.cpp @@ -36,6 +36,7 @@ #include "utils/log.h" #include "utils/URIUtils.h" #include "Autorun.h" +#include "cdrip/CDDARipper.h" #define CONTROL_BTNVIEWASICONS 2 #define CONTROL_BTNSORTBY 3 @@ -302,7 +303,12 @@ void CGUIWindowMusicSongs::GetContextButtons(int itemNumber, CContextButtons &bu // those cds can also include Audio Tracks: CDExtra and MixedMode! CCdInfo *pCdInfo = g_mediaManager.GetCdInfo(); if (pCdInfo->IsAudio(1) || pCdInfo->IsCDExtra(1) || pCdInfo->IsMixedMode(1)) - buttons.Add(CONTEXT_BUTTON_RIP_CD, 600); + { + if (CJobManager::GetInstance().IsProcessing("cdrip")) + buttons.Add(CONTEXT_BUTTON_CANCEL_RIP_CD, 14100); + else + buttons.Add(CONTEXT_BUTTON_RIP_CD, 600); + } } #endif CGUIMediaWindow::GetContextButtons(itemNumber, buttons); @@ -405,6 +411,10 @@ bool CGUIWindowMusicSongs::OnContextButton(int itemNumber, CONTEXT_BUTTON button OnRipCD(); return true; + case CONTEXT_BUTTON_CANCEL_RIP_CD: + CCDDARipper::GetInstance().CancelJobs(); + return true; + case CONTEXT_BUTTON_CDDB: if (m_musicdatabase.LookupCDDBInfo(true)) Update(m_vecItems->GetPath()); |