Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: xbmc/xbmc
...
head fork: ndbroadbent/xbmc
compare: master
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 13, 2011
Alex Wilkinson AWilco allowed PlayMedia from APIs and Plugin Resolves
Added Plugin resolution to PlayMedia to allow plugins to resolve to
Smart Playlists, Internet playlist streams, Last FM etc.
Modified application messenger to check attempts to play single items,
and routed them through PlayMedia instead. This allows JSON API and others
to play the item types only available through PlayMedia
ea4c9bc
Commits on Mar 16, 2011
Nathan Broadbent ndbroadbent Merge branch 'playmedia' of https://github.com/AWilco/xbmc into playm…
…edia
8705cab
Nathan Broadbent ndbroadbent Merge branch 'master' of github.com:ndbroadbent/xbmc a8a610a
Showing with 20 additions and 4 deletions.
  1. +8 −0 xbmc/Application.cpp
  2. +12 −4 xbmc/ApplicationMessenger.cpp
8 xbmc/Application.cpp
View
@@ -3369,6 +3369,14 @@ void CApplication::Stop()
bool CApplication::PlayMedia(const CFileItem& item, int iPlaylist)
{
+ //If item is a plugin, expand out now and run ourselves again
+ if (item.IsPlugin())
+ { // we modify the item so that it becomes a real URL
+ CFileItem item_new(item);
+ if (XFILE::CPluginDirectory::GetPluginResult(item.m_strPath, item_new))
+ return PlayMedia(item_new, iPlaylist);
+ return false;
+ }
if (item.IsLastFM())
{
g_partyModeManager.Disable();
16 xbmc/ApplicationMessenger.cpp
View
@@ -315,6 +315,7 @@ case TMSG_POWERDOWN:
if (list->Size() > 0)
{
+
int playlist = PLAYLIST_MUSIC;
for (int i = 0; i < list->Size(); i++)
{
@@ -325,10 +326,17 @@ case TMSG_POWERDOWN:
}
}
- g_playlistPlayer.ClearPlaylist(playlist);
- g_playlistPlayer.Add(playlist, (*list));
- g_playlistPlayer.SetCurrentPlaylist(playlist);
- g_playlistPlayer.Play(pMsg->dwParam1);
+ //For single item lists try PlayMedia. This covers some more cases where a playlist is not appropriate
+ //It will fall through to PlayFile
+ if (list->Size() == 1 && !(*list)[0]->IsPlayList())
+ g_application.PlayMedia(*((*list)[0]), playlist);
+ else
+ {
+ g_playlistPlayer.ClearPlaylist(playlist);
+ g_playlistPlayer.Add(playlist, (*list));
+ g_playlistPlayer.SetCurrentPlaylist(playlist);
+ g_playlistPlayer.Play(pMsg->dwParam1);
+ }
}
delete list;

No commit comments for this range

Something went wrong with that request. Please try again.