Exemple #1
0
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                result.Value = Path.GetExtension(fileName).Substring(1).ToLower();
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                result.Value = ExifUtilities.GetProperty(fileName, ExifProperties.CameraModel);
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                result.Value = File.GetCreationTime(fileName).ToString(options.DateFormatString);
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }
Exemple #4
0
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                var tags = Id3Utilities.GetTags(fileName);
                result.Value = tags.JoinedAlbumArtists;
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }
        public HandlerResult Do(string fileName, HandlerOptions options)
        {
            var result = new HandlerResult();

            try
            {
                string date      = ExifUtilities.GetProperty(fileName, ExifProperties.DateTaken);
                var    dateTaken = DateTime.ParseExact(date, "yyyy:MM:dd HH:mm:ss", null);
                result.Value = dateTaken.ToString(options.DateFormatString);
            }
            catch (Exception ex)
            {
                result.Exception = ex;
            }

            return(result);
        }