diff options
-rw-r--r-- | frontend.c | 4 | ||||
-rw-r--r-- | media_player.c | 36 | ||||
-rw-r--r-- | tools/playlist.c | 36 | ||||
-rw-r--r-- | tools/playlist.h | 6 |
4 files changed, 41 insertions, 41 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.c,v 1.40 2008-01-09 08:44:15 phintuka Exp $ + * $Id: frontend.c,v 1.41 2008-01-10 23:30:37 phelin Exp $ * */ @@ -153,7 +153,7 @@ void cXinelibThread::InfoHandler(const char *info) *end = 0; if(!strcmp(map, "title")) - cXinelibDevice::Instance().SetMetaInfo(miTrack, next); + cXinelibDevice::Instance().SetMetaInfo(miTitle, next); if(!strcmp(map, "album")) cXinelibDevice::Instance().SetMetaInfo(miAlbum, next); if(!strcmp(map, "artist")) diff --git a/media_player.c b/media_player.c index ce139ef2..4f10ce4d 100644 --- a/media_player.c +++ b/media_player.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: media_player.c,v 1.39 2008-01-03 19:05:07 phintuka Exp $ + * $Id: media_player.c,v 1.40 2008-01-10 23:30:37 phelin Exp $ * */ @@ -224,11 +224,11 @@ void cXinelibPlayer::Activate(bool On) if(m_Replaying) { // update playlist metainfo - const char *tr = cXinelibDevice::Instance().GetMetaInfo(miTrack); + const char *ti = cXinelibDevice::Instance().GetMetaInfo(miTitle); const char *al = cXinelibDevice::Instance().GetMetaInfo(miAlbum); const char *ar = cXinelibDevice::Instance().GetMetaInfo(miArtist); - if(tr && tr[0] && (!*m_Playlist.Current()->Track || !strstr(m_Playlist.Current()->Track, tr))) - m_Playlist.Current()->Track = tr; + if(ti && ti[0] && (!*m_Playlist.Current()->Title || !strstr(m_Playlist.Current()->Title, ti))) + m_Playlist.Current()->Title = ti; if(al && al[0]) m_Playlist.Current()->Album = al; if(ar && ar[0]) @@ -403,14 +403,14 @@ void cPlaylistMenu::Set(bool setCurrentPlaying) if(*i->Artist || *i->Album) Title = cString::sprintf("%c\t%s\t(%s%s%s)", j==currentPlaying ? '*':' ', - *i->Track, + *i->Title, *i->Artist ?: "", *i->Artist ? ": " : "", *i->Album ?: ""); else Title = cString::sprintf("%c\t%s", j==currentPlaying ? '*':' ', - *i->Track); + *i->Title); Add(new cOsdItem( ic.Translate(Title), (eOSState)(os_User + j))); } @@ -445,7 +445,7 @@ cXinelibPlayerControl::cXinelibPlayerControl(eMainMenuMode Mode, const char *Fil m_Player->m_UseResume = (Mode==ShowFiles); - MsgReplaying(*m_Player->Playlist().Current()->Track, *m_Player->File()); + MsgReplaying(*m_Player->Playlist().Current()->Title, *m_Player->File()); } cXinelibPlayerControl::~cXinelibPlayerControl() @@ -537,7 +537,7 @@ void cXinelibPlayerControl::Show() Total = (m_CurrentLen + 500) / 1000; // ms --> s Current = (m_CurrentPos + 500) / 1000; - cString Title = m_Player->Playlist().Current()->Track; + cString Title = m_Player->Playlist().Current()->Title; if(*m_Player->Playlist().Current()->Artist || *m_Player->Playlist().Current()->Album) Title = cString::sprintf("%s (%s%s%s)", *Title, @@ -610,26 +610,26 @@ eOSState cXinelibPlayerControl::ProcessKey(eKeys Key) if(!m_DisplayReplay) m_AutoShowStart = time(NULL); - MsgReplaying(*m_Player->Playlist().Current()->Track, *m_Player->File()); + MsgReplaying(*m_Player->Playlist().Current()->Title, *m_Player->File()); } else { // metainfo may change during playback (DVD titles, CDDA tracks) - const char *tr = cXinelibDevice::Instance().GetMetaInfo(miTrack); - if(tr && tr[0] && (!*m_Player->Playlist().Current()->Track || - !strstr(m_Player->Playlist().Current()->Track, tr))) { + const char *ti = cXinelibDevice::Instance().GetMetaInfo(miTitle); + if(ti && ti[0] && (!*m_Player->Playlist().Current()->Title || + !strstr(m_Player->Playlist().Current()->Title, ti))) { const char *al = cXinelibDevice::Instance().GetMetaInfo(miAlbum); const char *ar = cXinelibDevice::Instance().GetMetaInfo(miArtist); LOGDBG("metainfo changed: %s->%s %s->%s %s->%s", *m_Player->Playlist().Current()->Artist?:"-", ar?:"-", *m_Player->Playlist().Current()->Album ?:"-", al?:"-", - *m_Player->Playlist().Current()->Track ?:"-", tr?:"-"); - m_Player->Playlist().Current()->Track = tr; + *m_Player->Playlist().Current()->Title ?:"-", ti?:"-"); + m_Player->Playlist().Current()->Title = ti; if(al && al[0]) m_Player->Playlist().Current()->Album = al; if(ar && ar[0]) m_Player->Playlist().Current()->Artist = ar; - MsgReplaying(*m_Player->Playlist().Current()->Track, *m_Player->File()); + MsgReplaying(*m_Player->Playlist().Current()->Title, *m_Player->File()); } } @@ -644,7 +644,7 @@ eOSState cXinelibPlayerControl::ProcessKey(eKeys Key) default: if(state >= os_User) { m_Player->NextFile( (int)state - (int)os_User - m_Player->CurrentFile()); m_PlaylistMenu->SetCurrentExt(m_Player->CurrentFile()); - MsgReplaying(*m_Player->Playlist().Current()->Track, *m_Player->File()); + MsgReplaying(*m_Player->Playlist().Current()->Title, *m_Player->File()); } break; } @@ -701,14 +701,14 @@ eOSState cXinelibPlayerControl::ProcessKey(eKeys Key) } if(!m_DisplayReplay) m_AutoShowStart = time(NULL); - MsgReplaying(*m_Player->Playlist().Current()->Track, *m_Player->File()); + MsgReplaying(*m_Player->Playlist().Current()->Title, *m_Player->File()); break; case kPrev: case kLeft: if(cXinelibDevice::Instance().PlayFileCtrl("GETPOS") < 3000) { m_Player->NextFile(-1); if(!m_DisplayReplay) m_AutoShowStart = time(NULL); - MsgReplaying(*m_Player->Playlist().Current()->Track, *m_Player->File()); + MsgReplaying(*m_Player->Playlist().Current()->Title, *m_Player->File()); } else { m_Player->NextFile(0); diff --git a/tools/playlist.c b/tools/playlist.c index edca4a08..3f05e88a 100644 --- a/tools/playlist.c +++ b/tools/playlist.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: playlist.c,v 1.7 2007-06-18 10:48:03 phintuka Exp $ + * $Id: playlist.c,v 1.8 2008-01-10 23:30:37 phelin Exp $ * */ @@ -40,11 +40,11 @@ cPlaylistItem::cPlaylistItem(const char *filename) Position = -1; if(NULL != (pt = strrchr(filename, '/'))) - Track = pt + 1; + Title = pt + 1; else - Track = filename; + Title = filename; - if(NULL != (pt = strrchr(Track, '.'))) + if(NULL != (pt = strrchr(Title, '.'))) *pt = 0; } @@ -60,9 +60,9 @@ cPlaylistItem::cPlaylistItem(const char *filename, else Filename = cString::sprintf("%s%s", path, filename); Position = position; - Track = title ?: filename; + Title = title ?: filename; - if(!title && (pt = strrchr(Track, '.'))) + if(!title && (pt = strrchr(Title, '.'))) *pt = 0; } @@ -80,7 +80,7 @@ int cPlaylistItem::Compare(const cListObject &ListObject) const // same position (or no positions definend) -> alphabetical order #if 0 - return strcmp(Track, o->Track); + return strcmp(Title, o->Title); #else // use filename, because: // - implicit playlist has no track names available when sorting @@ -160,7 +160,7 @@ class cID3Scanner : public cThread else if(!strncasecmp(pt, "ALBUM=", 6) && strlen(pt) > 7) Item->Album = (pt+6); else if(!strncasecmp(pt, "TITLE=", 6) && strlen(pt) > 7) - Item->Track = (pt+6); + Item->Title = (pt+6); else if(!strncasecmp(pt, "TRACKNUMBER=", 12) && strlen(pt) > 12) Item->Position = atoi(pt+12); } @@ -169,7 +169,7 @@ class cID3Scanner : public cThread cString Cmd = cString::sprintf("mp3info -p \"" "Artist: %%a\\r\\n" "Album: %%l\\r\\n" - "Track: %%t\\r\\n\"" + "Title: %%t\\r\\n" " \"%s\"", shell_escape(Item->Filename, '\"')); cPipe p; @@ -182,8 +182,8 @@ class cID3Scanner : public cThread Item->Artist = (pt+8); if(!strncmp(pt, "Album: ", 7) && strlen(pt) > 8) Item->Album = (pt+7); - if(!strncmp(pt, "Track: ", 7) && strlen(pt) > 8) - Item->Track = (pt+7); + if(!strncmp(pt, "Title: ", 7) && strlen(pt) > 8) + Item->Title = (pt+7); } } } @@ -268,7 +268,7 @@ class cPlsReader : public cPlaylistReader 1 == sscanf(line + 5, "%d=", &n)) { if(*(t+1)) { if(n == m_Current) - Prev()->Track = t; + Prev()->Title = t; else m_Title = t; } @@ -324,7 +324,7 @@ class cAsxReader : public cPlaylistReader pt = strstr(line, "<entry>"); if(pt) { if(*m_Title && Prev()) { - Prev()->Track = m_Title; + Prev()->Title = m_Title; m_Title = NULL; } } @@ -445,7 +445,7 @@ bool cPlaylist::StoreCache(void) for(cPlaylistItem *i = First(); i; i=Next(i)) { // store only items in "current" root folder if(!strncmp(i->Filename, m_Folder, len)) { - if(/**i->Track ||*/ *i->Artist || *i->Album) { + if(/**i->Title ||*/ *i->Artist || *i->Album) { cString Filename = ((*i->Filename) + len); // relative if(entries < 1) { f = fopen(Name, "w"); @@ -458,8 +458,8 @@ bool cPlaylist::StoreCache(void) } entries++; fprintf(f, "File%d=%s\r\n", entries, *Filename); - if(*i->Track && (*i->Track)[0]) - fprintf(f, "Title%d=%s\r\n", entries, *i->Track); + if(*i->Title && (*i->Title)[0]) + fprintf(f, "Title%d=%s\r\n", entries, *i->Title); if(*i->Artist && (*i->Artist)[0]) fprintf(f, "Artist%d=%s\r\n", entries, *i->Artist); if(*i->Album && (*i->Album)[0]) @@ -508,7 +508,7 @@ bool cPlaylist::ReadCache(void) } } } else if(it && !strncmp(pt, "Title", 5)) { - it->Track = strchrnext(pt, '='); + it->Title = strchrnext(pt, '='); } else if(it && !strncmp(pt, "Artist", 6)) { it->Artist = strchrnext(pt, '='); } else if(it && !strncmp(pt, "Album", 5)) { @@ -767,7 +767,7 @@ int cPlaylist::ReadPlaylist(const char *file) // absolute path Add(new cPlaylistItem(pt)); if(parser->Title()) - Last()->Track = parser->Title(); + Last()->Title = parser->Title(); } else { // relative path Add(new cPlaylistItem(pt, Base, parser->Title())); diff --git a/tools/playlist.h b/tools/playlist.h index 1a1d6180..2cfb68ac 100644 --- a/tools/playlist.h +++ b/tools/playlist.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: playlist.h,v 1.4 2007-06-18 08:53:31 phintuka Exp $ + * $Id: playlist.h,v 1.5 2008-01-10 23:30:37 phelin Exp $ * */ @@ -35,8 +35,8 @@ class cPlaylistItem : public cListObject cString Filename; /* file name and full path */ - // Metaingo (ID3 etc.) - cString Track; + // Metainfo (ID3 etc.) + cString Title; cString Artist; cString Album; |