Logo Search packages:      
Sourcecode: qlix version File versions  Download package

bool MtpDevice::AddTrackToAlbum ( MTP::Track in_track,
MTP::Album in_album 
)

This function adds the passed track to the album on the device by first adding it to the raw track, syncing to the device and then adds the track to the wrapper track.

Parameters:
in_track the track that is to be added to the parent album
in_album the parent album for this track
Returns:
true if successfull false otherwise

Definition at line 949 of file MtpDevice.cpp.

References MTP::Album::AddTrackToRawAlbum(), processErrorStack(), MTP::Album::RawAlbum(), and MTP::Album::SetInitialized().

{
  in_album->SetInitialized();
  in_album->AddTrackToRawAlbum(in_track);
#ifndef SIMULATE_TRANSFERS
  int ret = LIBMTP_Update_Album(_device, in_album->RawAlbum());
  if (ret != 0)
  {
    processErrorStack();
    return false;
  }
#endif
  return true;
}


Generated by  Doxygen 1.6.0   Back to index