Exemplo n.º 1
0
        /// <summary>
        /// Opens and reads the data for the specified file.
        /// </summary>
        /// <param name="fileName">The full path and file name of the MP4 file to open.</param>
        /// <returns>An <see cref="MP4File"/> object you can use to manipulate file.</returns>
        /// <exception cref="ArgumentException">
        /// Thrown if the specified file name is <see langword="null"/> or the empty string.
        /// </exception>
        public static MP4File Open(string fileName)
        {
            MP4File file = new MP4File(fileName);

            file.Load();
            return(file);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Opens and reads the data for the specified file.
 /// </summary>
 /// <param name="fileName">The full path and file name of the MP4 file to open.</param>
 /// <returns>An <see cref="MP4File"/> object you can use to manipulate file.</returns>
 /// <exception cref="ArgumentException">
 /// Thrown if the specified file name is <see langword="null"/> or the empty string.
 /// </exception>
 public static MP4File Open(string fileName)
 {
     MP4File file = new MP4File(fileName);
     file.Load();
     return file;
 }
Exemplo n.º 3
0
        //private static string noClue;
        public static void ReadFile(MP4File file)
        {
            try
            {
                title = file.Tags.Title;
            }
            catch
            {
                title = "";
            }

            try
            {
                artist = file.Tags.Artist;
            }
            catch
            {
                artist = "";
            }

            try
            {
                releaseDate = file.Tags.ReleaseDate;
            }
            catch
            {
                releaseDate = "";
            }

            try
            {
                rating = (string)file.Tags.RatingInfo.Rating;
            }
            catch
            {
                rating = "";
            }

            try
            {
                genre = file.Tags.Genre;
            }
            catch
            {
                genre = "";
            }

            try
            {
                artwork = file.Tags.Artwork;
            }
            catch
            {
                artwork = null;
            }

            try
            {
                album = file.Tags.Album;
            }
            catch
            {
                album = "";
            }

            try
            {
                albumArtist = file.Tags.AlbumArtist;
            }
            catch
            {
                albumArtist = "";
            }

            try
            {
                purchaseDate = file.Tags.PurchasedDate;
            }
            catch
            {
                purchaseDate = "";
            }

            try
            {
                shortDescription = file.Tags.Description;
            }
            catch
            {
                shortDescription = "";
            }

            try
            {
                longDescription = file.Tags.LongDescription;
            }
            catch
            {
                longDescription = "";
            }

            try
            {
                videoKind = file.Tags.MediaType;
            }
            catch
            {
                videoKind = 0;
            }

            try
            {
                if (file.Tags.MovieInfo.HasCast)
                {
                    actors = String.Join(",", file.Tags.MovieInfo.Cast);
                }
                else
                {
                    actors = "";
                }
            }
            catch
            {
                actors = "";
            }

            try
            {
                if (file.Tags.MovieInfo.HasDirectors)
                {
                    director = String.Join(",", file.Tags.MovieInfo.Directors);
                }
                else
                {
                    director = "";
                }
            }
            catch
            {
                director = "";
            }

            try
            {
                if (file.Tags.MovieInfo.HasScreenwriters)
                {
                    screenwriter = String.Join(",", file.Tags.MovieInfo.Screenwriters);
                }
                else
                {
                    screenwriter = "";
                }
            }
            catch
            {
                screenwriter = "";
            }

            try
            {
                show = file.Tags.TVShow;
            }
            catch
            {
                show = "";
            }

            try
            {
                episodeId = file.Tags.EpisodeId;
            }
            catch
            {
                episodeId = "";
            }

            try
            {
                season = (int)file.Tags.SeasonNumber;
            }
            catch
            {
                season = 0;
            }

            try
            {
                episode = (int)file.Tags.EpisodeNumber;
            }
            catch
            {
                episode = 0;
            }

            try
            {
                tvNetwork = file.Tags.TVNetwork;
            }
            catch
            {
                tvNetwork = "";
            }

            try
            {
                isPodcast = (Boolean)file.Tags.IsPodcast;
            }
            catch
            {
                isPodcast = false;
            }

            feedUrl = "";
            episodeUrl = "";

            try
            {
                category = file.Tags.Category;
            }
            catch
            {
                category = "";
            }

            try
            {
                keyword = file.Tags.Keywords;
            }
            catch
            {
                keyword = "";
            }

            try
            {
                advisory = file.Tags.ContentRating;
            }
            catch
            {
                advisory = 0;
            }
        }