---
 mythmusic/mythmusic/main.cpp |   25 	25 +	0 -	0 !
 1 file changed, 25 insertions(+)

Index: mythplugins/mythmusic/mythmusic/main.cpp
===================================================================
--- mythplugins.orig/mythmusic/mythmusic/main.cpp	2011-12-05 18:42:32.000000000 -0500
+++ mythplugins/mythmusic/mythmusic/main.cpp	2011-12-05 19:22:58.000000000 -0500
@@ -641,6 +641,31 @@ void mythplugin_resume(void)
     wasPlaying = false;
 }
 
+static bool wasPlaying = false;
+
+void mythplugin_pause(void)
+{
+    wasPlaying = gPlayer->isPlaying();
+    if (wasPlaying)
+    {
+        gPlayer->savePosition();
+        gPlayer->stop(true);
+    }
+}
+
+void mythplugin_resume(void)
+{
+    if (wasPlaying)
+    {
+        gPlayer->play();
+        gPlayer->seek(gCoreContext->GetNumSetting("MusicBookmarkPosition", 0));
+        gCoreContext->SaveSetting("MusicBookmark", "");
+        gCoreContext->SaveSetting("MusicBookmarkPosition", 0);
+    }
+
+    wasPlaying = false;
+}
+
 int mythplugin_config(void)
 {
     gMusicData->paths = gCoreContext->GetSetting("TreeLevels");
