public override bool DeleteTrackHook (DatabaseTrackInfo track)
{
// Do not allow removing purchased tracks if not in the
// Amazon Purchased Music source; this should prevent
// accidental deletion of purchased music that may not
// have been copied from the device yet.
//
// TODO: Provide some feedback when a purchased track is
// skipped from deletion
//
// FIXME: unfortunately this does not work due to
// the cache models being potentially different
// even though they will always reference the same tracks
// amazon_source.TrackModel.IndexOf (track) >= 0
if (!amazon_source.Active && amazon_source.Count > 0 && track.Uri.LocalPath.StartsWith (amazon_base_dir)) {
return false;
}
return true;
}