|
|
@ -165,7 +165,7 @@ namespace Amarok
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
using Amarok::TQStringx;
|
|
|
|
using Amarok::QStringx;
|
|
|
|
using Amarok::escapeHTML;
|
|
|
|
using Amarok::escapeHTML;
|
|
|
|
using Amarok::escapeHTMLAttr;
|
|
|
|
using Amarok::escapeHTMLAttr;
|
|
|
|
using Amarok::unescapeHTMLAttr;
|
|
|
|
using Amarok::unescapeHTMLAttr;
|
|
|
@ -1325,7 +1325,7 @@ void CurrentTrackJob::showHome()
|
|
|
|
TQString playTime = MetaBundle::fuzzyTime( a[0].toInt() );
|
|
|
|
TQString playTime = MetaBundle::fuzzyTime( a[0].toInt() );
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append(
|
|
|
|
m_HTMLSource.append(
|
|
|
|
TQStringx(
|
|
|
|
QStringx(
|
|
|
|
"<div id='introduction_box' class='box'>\n"
|
|
|
|
"<div id='introduction_box' class='box'>\n"
|
|
|
|
"<div id='introduction_box-header-title' class='box-header'>\n"
|
|
|
|
"<div id='introduction_box-header-title' class='box-header'>\n"
|
|
|
|
"<span id='introduction_box-header-title' class='box-header-title'>\n"
|
|
|
|
"<span id='introduction_box-header-title' class='box-header-title'>\n"
|
|
|
@ -1408,7 +1408,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
|
|
|
|
|
|
|
|
|
|
|
|
TQString albumLength = ( i_albumLength==0 ? i18n( "Unknown" ) : MetaBundle::prettyTime( i_albumLength, true ) );
|
|
|
|
TQString albumLength = ( i_albumLength==0 ? i18n( "Unknown" ) : MetaBundle::prettyTime( i_albumLength, true ) );
|
|
|
|
|
|
|
|
|
|
|
|
htmlCode.append( TQStringx (
|
|
|
|
htmlCode.append( QStringx (
|
|
|
|
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
|
|
|
@ -1425,7 +1425,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
|
|
|
|
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
|
|
|
|
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
|
|
|
|
|
|
|
|
|
|
|
|
// Album image
|
|
|
|
// Album image
|
|
|
|
htmlCode.append( TQStringx (
|
|
|
|
htmlCode.append( QStringx (
|
|
|
|
"<td width='1'>\n"
|
|
|
|
"<td width='1'>\n"
|
|
|
|
"<a href='fetchcover:%1 @@@ %2'>\n"
|
|
|
|
"<a href='fetchcover:%1 @@@ %2'>\n"
|
|
|
|
"<img class='album-image' align='left' vspace='2' hspace='2' title='%3' src='%4'/>\n"
|
|
|
|
"<img class='album-image' align='left' vspace='2' hspace='2' title='%3' src='%4'/>\n"
|
|
|
@ -1451,7 +1451,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
|
|
|
|
<< albumName ) );
|
|
|
|
<< albumName ) );
|
|
|
|
|
|
|
|
|
|
|
|
// Tracks number, year and length
|
|
|
|
// Tracks number, year and length
|
|
|
|
htmlCode.append( TQStringx (
|
|
|
|
htmlCode.append( QStringx (
|
|
|
|
"<span class='album-info'>%1</span> "
|
|
|
|
"<span class='album-info'>%1</span> "
|
|
|
|
"<br />\n"
|
|
|
|
"<br />\n"
|
|
|
|
"<span class='album-year'>%2</span>\n"
|
|
|
|
"<span class='album-year'>%2</span>\n"
|
|
|
@ -1463,7 +1463,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
|
|
|
|
<< albumLength) );
|
|
|
|
<< albumLength) );
|
|
|
|
|
|
|
|
|
|
|
|
// Begining of the 'toggleable div' that contains the songs
|
|
|
|
// Begining of the 'toggleable div' that contains the songs
|
|
|
|
htmlCode.append( TQStringx (
|
|
|
|
htmlCode.append( QStringx (
|
|
|
|
"</tr>\n"
|
|
|
|
"</tr>\n"
|
|
|
|
"</table>\n"
|
|
|
|
"</table>\n"
|
|
|
|
"</div>\n"
|
|
|
|
"</div>\n"
|
|
|
@ -1482,7 +1482,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
|
|
|
|
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
|
|
|
|
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
discNumber = newDiscNumber;
|
|
|
|
discNumber = newDiscNumber;
|
|
|
|
htmlCode.append( TQStringx (
|
|
|
|
htmlCode.append( QStringx (
|
|
|
|
"<div class='disc-separator'>\n"
|
|
|
|
"<div class='disc-separator'>\n"
|
|
|
|
"<a href=\"albumdisc: %1 @@@ %2 @@@ %3\">\n"
|
|
|
|
"<a href=\"albumdisc: %1 @@@ %2 @@@ %3\">\n"
|
|
|
|
"%4"
|
|
|
|
"%4"
|
|
|
@ -1578,7 +1578,7 @@ CurrentTrackJob::showHomeByAlbums()
|
|
|
|
TQString image = CollectionDB::instance()->podcastImage( pcb.imageURL().url(), true, 50 );
|
|
|
|
TQString image = CollectionDB::instance()->podcastImage( pcb.imageURL().url(), true, 50 );
|
|
|
|
TQString imageAttr = escapeHTMLAttr( i18n( "Click to go to podcast website: %1." ).tqarg( pcb.link().prettyURL() ) );
|
|
|
|
TQString imageAttr = escapeHTMLAttr( i18n( "Click to go to podcast website: %1." ).tqarg( pcb.link().prettyURL() ) );
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append( TQStringx (
|
|
|
|
m_HTMLSource.append( QStringx (
|
|
|
|
"<tr class='" + TQString( (i % 2) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<tr class='" + TQString( (i % 2) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDP%1')\">\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDP%1')\">\n"
|
|
|
@ -1615,7 +1615,7 @@ CurrentTrackJob::showHomeByAlbums()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append( TQStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
|
|
|
|
m_HTMLSource.append( QStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append(
|
|
|
|
m_HTMLSource.append(
|
|
|
|
"</div>\n"
|
|
|
|
"</div>\n"
|
|
|
@ -1779,7 +1779,7 @@ void CurrentTrackJob::showLastFm( const MetaBundle ¤tTrack )
|
|
|
|
const TQString banIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("remove"), -KIcon::SizeSmallMedium );
|
|
|
|
const TQString banIcon = KGlobal::iconLoader()->iconPath( Amarok::icon("remove"), -KIcon::SizeSmallMedium );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append( TQStringx(
|
|
|
|
m_HTMLSource.append( QStringx(
|
|
|
|
"<div id='current_box' class='box'>\n"
|
|
|
|
"<div id='current_box' class='box'>\n"
|
|
|
|
"<div id='current_box-header' class='box-header'>\n"
|
|
|
|
"<div id='current_box-header' class='box-header'>\n"
|
|
|
|
"<span id='current_box-header-stream' class='box-header-title'>%1</span> "
|
|
|
|
"<span id='current_box-header-stream' class='box-header-title'>%1</span> "
|
|
|
@ -1878,7 +1878,7 @@ void CurrentTrackJob::showLastFm( const MetaBundle ¤tTrack )
|
|
|
|
|
|
|
|
|
|
|
|
void CurrentTrackJob::showStream( const MetaBundle ¤tTrack )
|
|
|
|
void CurrentTrackJob::showStream( const MetaBundle ¤tTrack )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_HTMLSource.append( TQStringx(
|
|
|
|
m_HTMLSource.append( QStringx(
|
|
|
|
"<div id='current_box' class='box'>\n"
|
|
|
|
"<div id='current_box' class='box'>\n"
|
|
|
|
"<div id='current_box-header' class='box-header'>\n"
|
|
|
|
"<div id='current_box-header' class='box-header'>\n"
|
|
|
|
"<span id='current_box-header-stream' class='box-header-title'>%1</span> "
|
|
|
|
"<span id='current_box-header-stream' class='box-header-title'>%1</span> "
|
|
|
@ -1929,7 +1929,7 @@ void CurrentTrackJob::addMetaHistory()
|
|
|
|
for ( uint i = 0; i < m_metadataHistory.count(); ++i )
|
|
|
|
for ( uint i = 0; i < m_metadataHistory.count(); ++i )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const TQString &str = m_metadataHistory[i];
|
|
|
|
const TQString &str = m_metadataHistory[i];
|
|
|
|
m_HTMLSource.append( TQStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
|
|
|
|
m_HTMLSource.append( QStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append(
|
|
|
|
m_HTMLSource.append(
|
|
|
@ -1963,7 +1963,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
|
|
|
|
: i18n( "No podcast website." )
|
|
|
|
: i18n( "No podcast website." )
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append( TQStringx(
|
|
|
|
m_HTMLSource.append( QStringx(
|
|
|
|
"<div id='current_box' class='box'>\n"
|
|
|
|
"<div id='current_box' class='box'>\n"
|
|
|
|
"<div id='current_box-header' class='box-header'>\n"
|
|
|
|
"<div id='current_box-header' class='box-header'>\n"
|
|
|
|
"<span id='current_box-header-artist' class='box-header-title'>%1</span> "
|
|
|
|
"<span id='current_box-header-artist' class='box-header-title'>%1</span> "
|
|
|
@ -2011,7 +2011,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
|
|
|
|
for ( uint i = 0; i < m_metadataHistory.count(); ++i )
|
|
|
|
for ( uint i = 0; i < m_metadataHistory.count(); ++i )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const TQString &str = m_metadataHistory[i];
|
|
|
|
const TQString &str = m_metadataHistory[i];
|
|
|
|
m_HTMLSource.append( TQStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
|
|
|
|
m_HTMLSource.append( QStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append(
|
|
|
|
m_HTMLSource.append(
|
|
|
@ -2042,7 +2042,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
|
|
|
|
date = ep.date() :
|
|
|
|
date = ep.date() :
|
|
|
|
date = ep.dateTime().toString();
|
|
|
|
date = ep.dateTime().toString();
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append( TQStringx (
|
|
|
|
m_HTMLSource.append( QStringx (
|
|
|
|
"<tr class='" + TQString( (i % 2) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<tr class='" + TQString( (i % 2) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDE%1')\">\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDE%1')\">\n"
|
|
|
@ -2072,7 +2072,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle ¤tTrack )
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append( TQStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
|
|
|
|
m_HTMLSource.append( QStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append(
|
|
|
|
m_HTMLSource.append(
|
|
|
|
"</div>\n"
|
|
|
|
"</div>\n"
|
|
|
@ -2235,7 +2235,7 @@ void CurrentTrackJob::showCurrentArtistHeader( const MetaBundle ¤tTrack )
|
|
|
|
"<div id='current_box-header' class='box-header'>\n"
|
|
|
|
"<div id='current_box-header' class='box-header'>\n"
|
|
|
|
// Show "Title - Artist \n Album", or only "PrettyTitle" if there's no title tag
|
|
|
|
// Show "Title - Artist \n Album", or only "PrettyTitle" if there's no title tag
|
|
|
|
+ ( !currentTrack.title().isEmpty()
|
|
|
|
+ ( !currentTrack.title().isEmpty()
|
|
|
|
? TQStringx(
|
|
|
|
? QStringx(
|
|
|
|
"<span id='current_box-header-songname' class='box-header-title'>%1</span> "
|
|
|
|
"<span id='current_box-header-songname' class='box-header-title'>%1</span> "
|
|
|
|
"<span id='current_box-header-separator' class='box-header-title'>-</span> "
|
|
|
|
"<span id='current_box-header-separator' class='box-header-title'>-</span> "
|
|
|
|
"<span id='current_box-header-artist' class='box-header-title'>%2</span>\n"
|
|
|
|
"<span id='current_box-header-artist' class='box-header-title'>%2</span>\n"
|
|
|
@ -2689,7 +2689,7 @@ void CurrentTrackJob::showArtistsAlbums( const TQString &artist, uint artist_id,
|
|
|
|
TQString albumImage = ContextBrowser::getEncodedImage( CollectionDB::instance()->albumImage( artist, values[ i ], true, 50 ) );
|
|
|
|
TQString albumImage = ContextBrowser::getEncodedImage( CollectionDB::instance()->albumImage( artist, values[ i ], true, 50 ) );
|
|
|
|
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
|
|
|
|
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append( TQStringx (
|
|
|
|
m_HTMLSource.append( QStringx (
|
|
|
|
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
|
|
|
@ -2734,7 +2734,7 @@ void CurrentTrackJob::showArtistsAlbums( const TQString &artist, uint artist_id,
|
|
|
|
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
|
|
|
|
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
discNumber = newDiscNumber;
|
|
|
|
discNumber = newDiscNumber;
|
|
|
|
m_HTMLSource.append( TQStringx (
|
|
|
|
m_HTMLSource.append( QStringx (
|
|
|
|
"<div class='disc-separator'>\n"
|
|
|
|
"<div class='disc-separator'>\n"
|
|
|
|
"<a href=\"albumdisc: %1 @@@ %2 @@@ %3\">\n"
|
|
|
|
"<a href=\"albumdisc: %1 @@@ %2 @@@ %3\">\n"
|
|
|
|
"%4"
|
|
|
|
"%4"
|
|
|
@ -2852,7 +2852,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
|
|
|
|
TQString albumImage = ContextBrowser::getEncodedImage( CollectionDB::instance()->albumImage( artist, values[ i ], true, 50 ) );
|
|
|
|
TQString albumImage = ContextBrowser::getEncodedImage( CollectionDB::instance()->albumImage( artist, values[ i ], true, 50 ) );
|
|
|
|
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
|
|
|
|
TQString albumImageTitleAttr = albumImageTooltip( albumImage, 50 );
|
|
|
|
|
|
|
|
|
|
|
|
m_HTMLSource.append( TQStringx (
|
|
|
|
m_HTMLSource.append( QStringx (
|
|
|
|
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<tr class='" + TQString( (i % 4) ? "box-row-alt" : "box-row" ) + "'>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<td>\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
|
|
|
|
"<div class='album-header' onClick=\"toggleBlock('IDA%1')\">\n"
|
|
|
@ -2895,7 +2895,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
|
|
|
|
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
|
|
|
|
if( discNumber != newDiscNumber && newDiscNumber.toInt() > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
discNumber = newDiscNumber;
|
|
|
|
discNumber = newDiscNumber;
|
|
|
|
m_HTMLSource.append( TQStringx (
|
|
|
|
m_HTMLSource.append( QStringx (
|
|
|
|
"<div class='disc-separator'>\n"
|
|
|
|
"<div class='disc-separator'>\n"
|
|
|
|
"<a href=\"compilationdisc: __discard__ @@@ %1 @@@ %2\">\n"
|
|
|
|
"<a href=\"compilationdisc: __discard__ @@@ %1 @@@ %2\">\n"
|
|
|
|
"%3"
|
|
|
|
"%3"
|
|
|
|