Exemple #1
0
        /// <summary>
        /// Duplciate the next playlist in the list
        /// </summary>
        private void DuplicateNextPlaylist()
        {
            if (++playlistIndex < playlistsBeingDuplicated.Count)
            {
                Playlist nextPlaylist = playlistsBeingDuplicated[playlistIndex];

                // If the playlist already exists in other libraries then prompt for deletion
                if (PlaylistsController.CheckForOtherPlaylists(nextPlaylist.Name, ConnectionDetailsModel.LibraryId) == true)
                {
                    ConfirmationDialogFragment.ShowFragment(CommandRouter.Manager, DuplicationConfirmed,
                                                            $"Playlist [{nextPlaylist.Name}] already exists in other libraries. Are you sure you want to duplicate it?");
                }
                else
                {
                    // Duplicate the playlist in the other libraries
                    PlaylistsController.DuplicatePlaylist(nextPlaylist);

                    DuplicateNextPlaylist();
                }
            }
            else
            {
                playlistsBeingDuplicated = null;
                playlistIndex            = -1;

                commandCallback.PerformAction();
            }
        }
Exemple #2
0
        /// <summary>
        /// Called
        /// </summary>
        /// <param name="confirm"></param>
        private void DuplicationConfirmed(bool confirm)
        {
            if (confirm == true)
            {
                PlaylistsController.DuplicatePlaylist(playlistsBeingDuplicated[playlistIndex]);
            }

            DuplicateNextPlaylist();
        }