diff options
author | DaveTBlake <oak99sky@yahoo.co.uk> | 2017-01-22 13:41:36 +0000 |
---|---|---|
committer | DaveTBlake <oak99sky@yahoo.co.uk> | 2017-01-22 13:41:36 +0000 |
commit | ff46b8c96a09d72ea33b3b5c5287a78566a25f9c (patch) | |
tree | cb8eea70a77da5bbdb9fae537ce076264ae595d2 | |
parent | 11ef60ec5fd3f22a4e1219b8c7cbdac13115609e (diff) |
Fix multiple changes of song rating from player OSD
-rw-r--r-- | xbmc/Application.cpp | 5 | ||||
-rw-r--r-- | xbmc/Application.h | 1 | ||||
-rw-r--r-- | xbmc/music/dialogs/GUIDialogMusicOSD.cpp | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 620366e4bc..1fe4a77d99 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -4649,6 +4649,11 @@ const std::string& CApplication::CurrentFile() return m_itemCurrentFile->GetPath(); } +std::shared_ptr<CFileItem> CApplication::CurrentFileItemPtr() +{ + return m_itemCurrentFile; +} + CFileItem& CApplication::CurrentFileItem() { return *m_itemCurrentFile; diff --git a/xbmc/Application.h b/xbmc/Application.h index 580fdce547..8d5876e03d 100644 --- a/xbmc/Application.h +++ b/xbmc/Application.h @@ -164,6 +164,7 @@ public: void ReloadSkin(bool confirm = false); const std::string& CurrentFile(); CFileItem& CurrentFileItem(); + std::shared_ptr<CFileItem> CurrentFileItemPtr(); void SetCurrentFileItem(const CFileItem &item); CFileItem& CurrentUnstackedItem(); virtual bool OnMessage(CGUIMessage& message) override; diff --git a/xbmc/music/dialogs/GUIDialogMusicOSD.cpp b/xbmc/music/dialogs/GUIDialogMusicOSD.cpp index 865d29b86f..c8c2b95ca0 100644 --- a/xbmc/music/dialogs/GUIDialogMusicOSD.cpp +++ b/xbmc/music/dialogs/GUIDialogMusicOSD.cpp @@ -91,7 +91,7 @@ bool CGUIDialogMusicOSD::OnAction(const CAction &action) for (int i = 1; i <= 10; i++) dialog->Add(StringUtils::Format("%s: %i", g_localizeStrings.Get(563).c_str(), i)); - auto track = std::make_shared<CFileItem>(g_application.CurrentFileItem()); + auto track = g_application.CurrentFileItemPtr(); dialog->SetSelected(track->GetMusicInfoTag()->GetUserrating()); dialog->Open(); |