</valuemap>
<value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
<valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
- <value key="192.168.1.3" type="QDateTime">2010-06-25T04:22:04</value>
+ <value key="192.168.1.3" type="QDateTime">2010-06-25T05:45:13</value>
</valuemap>
<value key="Qt4ProjectManager.MaemoRunConfiguration.Simulator" type="QString"></value>
</valuemap>
manager = new QNetworkAccessManager();
this->currentdownloaditem = -1;
pList = new QList<songElement *>;
- this->currentplayingitem =-1;
+ this->currentplayingitem = -1;
+ this->currentSkeyItem = -1;
}
void playlist::markPlayed(int position)
{
this->beginDownload(this->currentSkeyItem);
else
if(this->currentplaying() == this->currentSkeyItem)
- this->beginDownload(this->currentplayingitem);
+ this->beginDownload(this->currentSkeyItem);
}
int playlist::addSong(QStandardItem *item)
pList->append(newelement);
gs->getSong(item->text());
emit this->freeze();
+ this->currentSkeyItem = pList->size()-1;
return pList->size()-1;
}
{
emit this->downloadProgress(this->currentdownloaditem,b,t);
pList->at(this->currentdownloaditem)->buffer->buffer().append(reply->readAll());
- if ( b >= t*0.05 && !pList->at(currentdownloaditem)->bufferready && b/(startStreamT.msecsTo(QTime::currentTime()) + 1)*100/1024 >= 10)
+ //qDebug() << !pList->at(this->currentdownloaditem)->bufferready << this->currentdownloaditem;
+ if ( b >= t*0.05 && !pList->at(this->currentdownloaditem)->bufferready)
+ //if(!pList->at(currentdownloaditem)->bufferready && b/(startStreamT.msecsTo(QTime::currentTime()) + 1)*100/1024 >= 10)
{
this->setBufferRdy(this->currentdownloaditem);
emit this->bufferReady(this->currentdownloaditem);
}
void sPlayer::play(int p)
{
+ if(pl->currentplaying() != -1)
+ pl->freeMemory(pl->currentplaying());
pl->setCurrentPlaying(p);
//pl->beginDownload(p);
}
void sPlayer::stop()
{
- pl->setCurrentPlaying(-1);
+
media->stop();
+ if(pl->currentplaying() != -1)
+ pl->markPlayed(pl->currentplaying());
+ pl->setCurrentPlaying(-1);
playing = false;
}