mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
if we are created remotely, use their creation date
This commit is contained in:
@@ -88,8 +88,16 @@ DatabaseCommand_CreatePlaylist::createPlaylist( DatabaseImpl* lib, bool dynamic)
|
|||||||
Q_ASSERT( !( m_playlist.isNull() && m_v.isNull() ) );
|
Q_ASSERT( !( m_playlist.isNull() && m_v.isNull() ) );
|
||||||
Q_ASSERT( !source().isNull() );
|
Q_ASSERT( !source().isNull() );
|
||||||
|
|
||||||
uint now = QDateTime::currentDateTime().toTime_t();
|
uint now = 0;
|
||||||
m_playlist->setCreatedOn( now );
|
if( m_playlist.isNull() )
|
||||||
|
{
|
||||||
|
now = m_v.toMap()[ "createdon" ].toUInt();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
now = QDateTime::currentDateTime().toTime_t();
|
||||||
|
m_playlist->setCreatedOn( now );
|
||||||
|
}
|
||||||
|
|
||||||
TomahawkSqlQuery cre = lib->newquery();
|
TomahawkSqlQuery cre = lib->newquery();
|
||||||
cre.prepare( "INSERT INTO playlist( guid, source, shared, title, info, creator, lastmodified, dynplaylist, createdOn) "
|
cre.prepare( "INSERT INTO playlist( guid, source, shared, title, info, creator, lastmodified, dynplaylist, createdOn) "
|
||||||
|
Reference in New Issue
Block a user