Exemplo n.º 1
0
        /// <summary>
        /// The save movie.
        /// </summary>
        /// <param name="type">The MovieIOType type.</param>
        /// <returns>
        /// Process succeeded status.
        /// </returns>
        public static bool SaveMovie(MovieIOType type = MovieIOType.All)
        {
            try
            {
                MovieSaveSettings movieSaveSettings = Get.InOutCollection.MovieSaveSettings[Get.InOutCollection.IoType];

                movieSaveSettings.IoType = type;

                for (int index = 0; index < MovieDBFactory.MultiSelectedMovies.Count; index++)
                {
                    MovieModel movie = MovieDBFactory.MultiSelectedMovies[index];
                    if (Get.InOutCollection.IoType == NFOType.YAMJ)
                    {
                        yamj.SaveMovie(movie);
                    }
                    else if (Get.InOutCollection.IoType == NFOType.XBMC)
                    {
                        xbmc.SaveMovie(movie);
                    }
                }

                return(true);
            }
            catch (Exception exception)
            {
                Log.WriteToLog(LogSeverity.Error, 0, "SaveMovie", exception.Message);
                return(false);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// The save movie.
        /// </summary>
        /// <param name="type">The MovieIOType type.</param>
        /// <returns>
        /// Process succeeded status.
        /// </returns>
        public static bool SaveMovie(MovieIOType type = MovieIOType.All)
        {
            try
            {
                MovieSaveSettings movieSaveSettings = Get.InOutCollection.MovieSaveSettings[Get.InOutCollection.IoType];

                movieSaveSettings.IoType = type;

                foreach (MovieModel movie in MovieDBFactory.MultiSelectedMovies)
                {
                    if (Get.InOutCollection.IoType == NFOType.YAMJ)
                    {
                        yamj.SaveMovie(movie);
                    }
                }

                return(true);
            }
            catch (Exception exception)
            {
                Log.WriteToLog(LogSeverity.Error, 0, "SaveMovie", exception.Message);
                return(false);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// The save movie.
        /// </summary>
        /// <param name="type">The MovieIOType type.</param>
        /// <returns>
        /// Process succeeded status.
        /// </returns>
        public static bool SaveMovie(MovieIOType type = MovieIOType.All)
        {
            try
            {
                MovieSaveSettings movieSaveSettings = Get.InOutCollection.MovieSaveSettings[Get.InOutCollection.IoType];

                movieSaveSettings.IoType = type;

                for (int index = 0; index < MovieDBFactory.MultiSelectedMovies.Count; index++)
                {
                    MovieModel movie = MovieDBFactory.MultiSelectedMovies[index];
                    if (Get.InOutCollection.IoType == NFOType.YAMJ)
                    {
                        yamj.SaveMovie(movie);
                    }
                    else if (Get.InOutCollection.IoType == NFOType.XBMC)
                    {
                        xbmc.SaveMovie(movie);
                    }
                }

                return true;
            }
            catch (Exception exception)
            {
                Log.WriteToLog(LogSeverity.Error, 0, "SaveMovie", exception.Message);
                return false;
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Starts the save movie process.
 /// </summary>
 /// <param name="type">The type.</param>
 private void StartSaveMovie(MovieIOType type = MovieIOType.All)
 {
     this.UpdatedSelectedMoviesInFactory(this.grdViewByTitle.GetSelectedRows());
     Factories.InOut.OutFactory.SaveMovie(type);
     grdViewByTitle.RefreshData();
 }
Exemplo n.º 5
0
 /// <summary>
 /// Starts the save movie process.
 /// </summary>
 /// <param name="type">The type.</param>
 private void StartSaveMovie(MovieIOType type = MovieIOType.All)
 {
     this.UpdatedSelectedMoviesInFactory(this.grdViewByTitle.GetSelectedRows());
     Factories.InOut.OutFactory.SaveMovie(type);
     grdViewByTitle.RefreshData();
 }
Exemplo n.º 6
0
        /// <summary>
        /// The save movie.
        /// </summary>
        /// <param name="type">The MovieIOType type.</param>
        /// <returns>
        /// Process succeeded status.
        /// </returns>
        public static bool SaveMovie(MovieIOType type = MovieIOType.All)
        {
            try
            {
                MovieSaveSettings movieSaveSettings = Get.InOutCollection.MovieSaveSettings[Get.InOutCollection.IoType];

                movieSaveSettings.IoType = type;

                foreach (MovieModel movie in MovieDBFactory.MultiSelectedMovies)
                {
                    if (Get.InOutCollection.IoType == NFOType.YAMJ)
                    {
                        yamj.SaveMovie(movie);
                    }
                }

                return true;
            }
            catch (Exception exception)
            {
                Log.WriteToLog(LogSeverity.Error, 0, "SaveMovie", exception.Message);
                return false;
            }
        }