static void rb_ipod_db_add_playlist_internal (RbIpodDb *ipod_db, Itdb_Playlist *playlist) { RbIpodDbPrivate *priv = IPOD_DB_GET_PRIVATE (ipod_db); itdb_playlist_add (priv->itdb, playlist, -1); rb_ipod_db_save_async (ipod_db); }
Playlists::PlaylistPtr IpodPlaylistProvider::save( const Meta::TrackList &tracks, const QString &name ) { if( !isWritable() ) return Playlists::PlaylistPtr(); IpodPlaylist *playlist = new IpodPlaylist( tracks, name, m_coll ); itdb_playlist_add( m_coll->m_itdb, playlist->itdbPlaylist(), -1 ); Playlists::PlaylistPtr playlistPtr( playlist ); m_playlists << playlistPtr; subscribeTo( playlistPtr ); emit playlistAdded( playlistPtr ); emit startWriteDatabaseTimer(); return playlistPtr; }