mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
Merge branch 'cst-next.pre' into cst-next
This commit is contained in:
@@ -1142,7 +1142,7 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *nametag,
|
||||
listPos++;
|
||||
// show status
|
||||
int global = 100*listPos / maxProgress;
|
||||
progress.showGlobalStatus(global);
|
||||
progress.showStatus(global);
|
||||
#ifdef LCD_UPDATE
|
||||
CVFD::getInstance()->showProgressBar(global, "read xmldata...");
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_PROGRESSBAR);
|
||||
@@ -1238,7 +1238,7 @@ bool CAudioPlayerGui::openFilebrowser(void)
|
||||
currentProgress++;
|
||||
// show status
|
||||
int global = 100*currentProgress/maxProgress;
|
||||
progress.showGlobalStatus(global);
|
||||
progress.showStatus(global);
|
||||
progress.showStatusMessageUTF(files->Name);
|
||||
#ifdef LCD_UPDATE
|
||||
CVFD::getInstance()->showProgressBar(global, "read metadata...");
|
||||
@@ -1432,7 +1432,7 @@ bool CAudioPlayerGui::openSCbrowser(void)
|
||||
currentProgress++;
|
||||
// show progress
|
||||
int global = 100*currentProgress/maxProgress;
|
||||
progress.showGlobalStatus(global);
|
||||
progress.showStatus(global);
|
||||
progress.showStatusMessageUTF(files->Name);
|
||||
#ifdef LCD_UPDATE
|
||||
CVFD::getInstance()->showProgressBar(global, "read metadata...");
|
||||
@@ -1826,10 +1826,6 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos)
|
||||
if (dline != NULL)
|
||||
dline->kill();
|
||||
|
||||
// clear infobox
|
||||
if (ibox != NULL)
|
||||
ibox->kill();
|
||||
|
||||
// paint Line if detail info (and not valid list pos) and info box
|
||||
if (!m_playlist.empty() && (pos >= 0))
|
||||
{
|
||||
@@ -1840,39 +1836,41 @@ void CAudioPlayerGui::paintItemID3DetailsLine (int pos)
|
||||
dline->paint(false);
|
||||
|
||||
// paint id3 infobox
|
||||
if (ibox == NULL)
|
||||
if (ibox == NULL){
|
||||
ibox = new CComponentsInfoBox(m_x, ypos2, m_width, m_info_height);
|
||||
ibox->setCorner(RADIUS_LARGE);
|
||||
ibox->setYPos(ypos2);
|
||||
ibox->setColorBody(COL_MENUCONTENTDARK_PLUS_0);
|
||||
ibox->setFrameThickness(2);
|
||||
ibox->paint(false);
|
||||
ibox->setFrameThickness(2);
|
||||
ibox->setCorner(RADIUS_LARGE);
|
||||
ibox->setYPos(ypos2);
|
||||
ibox->setColorBody(COL_MENUCONTENTDARK_PLUS_0);
|
||||
ibox->forceTextPaint(false);
|
||||
}
|
||||
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + 10, ypos2 + 2 + 1*m_fheight, m_width- 80,
|
||||
m_playlist[m_selected].MetaData.title, COL_MENUCONTENTDARK_TEXT);
|
||||
std::string tmp;
|
||||
//title
|
||||
std::string text_info = m_playlist[m_selected].MetaData.title;
|
||||
|
||||
//date, genre
|
||||
if (m_playlist[m_selected].MetaData.genre.empty())
|
||||
tmp = m_playlist[m_selected].MetaData.date;
|
||||
text_info = m_playlist[m_selected].MetaData.date;
|
||||
else if (m_playlist[m_selected].MetaData.date.empty())
|
||||
tmp = m_playlist[m_selected].MetaData.genre;
|
||||
text_info = m_playlist[m_selected].MetaData.genre;
|
||||
else
|
||||
{
|
||||
tmp = m_playlist[m_selected].MetaData.genre;
|
||||
tmp += " / ";
|
||||
tmp += m_playlist[m_selected].MetaData.date;
|
||||
text_info = m_playlist[m_selected].MetaData.genre;
|
||||
text_info += " / ";
|
||||
text_info += m_playlist[m_selected].MetaData.date;
|
||||
}
|
||||
int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(tmp) + 10;
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + m_width - w - 5, ypos2 + 2 + 1*m_fheight,
|
||||
w, tmp, COL_MENUCONTENTDARK_TEXT);
|
||||
tmp = m_playlist[m_selected].MetaData.artist;
|
||||
|
||||
//artist, album
|
||||
text_info = m_playlist[m_selected].MetaData.artist;
|
||||
if (!(m_playlist[m_selected].MetaData.album.empty()))
|
||||
{
|
||||
tmp += " (";
|
||||
tmp += m_playlist[m_selected].MetaData.album;
|
||||
tmp += ')';
|
||||
text_info += " (";
|
||||
text_info += m_playlist[m_selected].MetaData.album;
|
||||
text_info += ')';
|
||||
}
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(m_x + 10, ypos2 + 2*m_fheight - 2, m_width - 20,
|
||||
tmp, COL_MENUCONTENTDARK_TEXT);
|
||||
|
||||
ibox->setText(text_info, CTextBox::AUTO_WIDTH, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO], COL_MENUCONTENT_TEXT);
|
||||
ibox->paint(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2169,7 +2167,7 @@ void CAudioPlayerGui::updateTimes(const bool force)
|
||||
}
|
||||
if ((updatePlayed || updateTotal) && m_curr_audiofile.FileType != CFile::STREAM_AUDIO && m_time_total != 0)
|
||||
{
|
||||
CVFD::getInstance()->showAudioProgress(100 * m_time_played / m_time_total);
|
||||
CVFD::getInstance()->showAudioProgress(uint8_t(100 * m_time_played / m_time_total));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2187,7 +2185,7 @@ void CAudioPlayerGui::paintLCD()
|
||||
CVFD::getInstance()->showAudioTrack(m_curr_audiofile.MetaData.artist, m_curr_audiofile.MetaData.title,
|
||||
m_curr_audiofile.MetaData.album);
|
||||
if (m_curr_audiofile.FileType != CFile::STREAM_AUDIO && m_time_total != 0)
|
||||
CVFD::getInstance()->showAudioProgress(100 * m_time_played / m_time_total);
|
||||
CVFD::getInstance()->showAudioProgress(uint8_t(100 * m_time_played / m_time_total));
|
||||
break;
|
||||
case CAudioPlayerGui::PAUSE:
|
||||
CVFD::getInstance()->showAudioPlayMode(CVFD::AUDIO_MODE_PAUSE);
|
||||
@@ -2330,7 +2328,7 @@ void CAudioPlayerGui::getFileInfoToDisplay(std::string &fileInfo, CAudiofileExt
|
||||
{
|
||||
fileInfo += "Unknown";
|
||||
}
|
||||
file.firstChar = tolower(fileInfo[0]);
|
||||
file.firstChar = (char)tolower(fileInfo[0]);
|
||||
//info += fileInfo;
|
||||
}
|
||||
|
||||
@@ -2503,7 +2501,7 @@ void CAudioPlayerGui::buildSearchTree()
|
||||
it!=m_playlist.end(); ++it)
|
||||
{
|
||||
listPos++;
|
||||
progress.showGlobalStatus(100*listPos / maxProgress);
|
||||
progress.showStatus(100*listPos / maxProgress);
|
||||
progress.showStatusMessageUTF(it->Filename);
|
||||
unsigned char firstChar = getFirstChar(*it);
|
||||
const std::pair<CTitle2Pos::iterator,bool> item =
|
||||
|
Reference in New Issue
Block a user