Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

added MusicPlayer.FilenameAndPath infolabel. #997

Closed
wants to merge 2 commits into from

4 participants

@nuka1195

added MusicPlayer.FilenameAndPath infolabel. i did it so it supports offset. (the reason for the shifting of id's)

@nuka1195

so i didn't have to change a line further in that limited the labels that worked with .offset() MUSICPLAYER_ALBUM_ARTIST

ok will make the change

@nuka1195

i was considering making player.* work offset and just factor out the need for musicplayer.* and videoplayer.*. what do you think?

@HitcherUK

@nuka1195 The removal of musicplayer and videoplayer is actually planned at some point.

@nuka1195

Good, I think it makes more sense.

@amet

@ronie is this needed in skins?

@nuka1195 it really would help if we knew what you intend to do with these additions, adding it just for a sake of extra code is not what we would like to do. if there is a valid reason for them let us know please

@ronie
Collaborator

we already have Player.Filenameandpath
no need to duplicate it to MusicPlayer.*

@ronie ronie closed this
@nuka1195

these are need by me, can you open and reconsider.

Player.Filenameandpath doesn't support offset() does it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 23, 2012
  1. @nuka1195

    added MusicPlayer.FilenameAndPath infolabel. i did it so it supports …

    nuka1195 authored
    …offset. (the reason for the shifting of id's)
  2. @nuka1195
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 3 deletions.
  1. +9 −3 xbmc/GUIInfoManager.cpp
  2. +1 −0  xbmc/GUIInfoManager.h
View
12 xbmc/GUIInfoManager.cpp
@@ -333,7 +333,8 @@ const infomap musicplayer[] = {{ "title", MUSICPLAYER_TITLE },
{ "hasprevious", MUSICPLAYER_HASPREVIOUS },
{ "hasnext", MUSICPLAYER_HASNEXT },
{ "playcount", MUSICPLAYER_PLAYCOUNT },
- { "lastplayed", MUSICPLAYER_LASTPLAYED }};
+ { "lastplayed", MUSICPLAYER_LASTPLAYED },
+ { "filenameandpath", MUSICPLAYER_FILEPATH }};
const infomap videoplayer[] = {{ "title", VIDEOPLAYER_TITLE },
{ "genre", VIDEOPLAYER_GENRE },
@@ -1221,6 +1222,7 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, CStdString *fa
case MUSICPLAYER_LYRICS:
case MUSICPLAYER_PLAYCOUNT:
case MUSICPLAYER_LASTPLAYED:
+ case MUSICPLAYER_FILEPATH:
strLabel = GetMusicLabel(info);
break;
case VIDEOPLAYER_TITLE:
@@ -2783,7 +2785,7 @@ CStdString CGUIInfoManager::GetMultiInfoLabel(const GUIInfo &info, int contextWi
strCpu.Format("%4.2f", g_cpuInfo.GetCoreInfo(atoi(m_stringParameters[info.GetData1()].c_str())).m_fPct);
return strCpu;
}
- else if (info.m_info >= MUSICPLAYER_TITLE && info.m_info <= MUSICPLAYER_ALBUM_ARTIST)
+ else if (info.m_info >= MUSICPLAYER_TITLE && info.m_info <= MUSICPLAYER_FILEPATH)
return GetMusicPlaylistInfo(info);
else if (info.m_info == CONTAINER_PROPERTY)
{
@@ -3277,7 +3279,11 @@ CStdString CGUIInfoManager::GetMusicTagLabel(int info, const CFileItem *item)
break;
case MUSICPLAYER_LYRICS:
if (tag.GetLyrics().size()) { return tag.GetLyrics(); }
- break;
+ break;
+ case MUSICPLAYER_FILEPATH:
+ if (!tag.GetURL().IsEmpty())
+ return tag.GetURL();
+ break;
case MUSICPLAYER_TRACK_NUMBER:
{
CStdString strTrack;
View
1  xbmc/GUIInfoManager.h
@@ -214,6 +214,7 @@ namespace INFO
#define MUSICPLAYER_ALBUM_ARTIST 226
#define MUSICPLAYER_PLAYCOUNT 227
#define MUSICPLAYER_LASTPLAYED 228
+#define MUSICPLAYER_FILEPATH 229
#define VIDEOPLAYER_TITLE 250
#define VIDEOPLAYER_GENRE 251
Something went wrong with that request. Please try again.