---
mythmusic/mythmusic/main.cpp | 25 25 + 0 - 0 !
1 file changed, 25 insertions(+)
|
old
|
new
|
void mythplugin_resume(void)
|
| 641 | 641 | wasPlaying = false; |
| 642 | 642 | } |
| 643 | 643 | |
| | 644 | static bool wasPlaying = false; |
| | 645 | |
| | 646 | void mythplugin_pause(void) |
| | 647 | { |
| | 648 | wasPlaying = gPlayer->isPlaying(); |
| | 649 | if (wasPlaying) |
| | 650 | { |
| | 651 | gPlayer->savePosition(); |
| | 652 | gPlayer->stop(true); |
| | 653 | } |
| | 654 | } |
| | 655 | |
| | 656 | void mythplugin_resume(void) |
| | 657 | { |
| | 658 | if (wasPlaying) |
| | 659 | { |
| | 660 | gPlayer->play(); |
| | 661 | gPlayer->seek(gCoreContext->GetNumSetting("MusicBookmarkPosition", 0)); |
| | 662 | gCoreContext->SaveSetting("MusicBookmark", ""); |
| | 663 | gCoreContext->SaveSetting("MusicBookmarkPosition", 0); |
| | 664 | } |
| | 665 | |
| | 666 | wasPlaying = false; |
| | 667 | } |
| | 668 | |
| 644 | 669 | int mythplugin_config(void) |
| 645 | 670 | { |
| 646 | 671 | gMusicData->paths = gCoreContext->GetSetting("TreeLevels"); |