Ejemplo n.º 1
0
        /// <summary>
        /// Create a XMP file when it not exist
        /// </summary>
        /// <param name="updateModel">model</param>
        /// <param name="inputSubPaths">list of paths</param>
        /// <returns>void</returns>
        internal async Task CreateXmpFileIsNotExist(FileIndexItem updateModel, List <string> inputSubPaths)
        {
            foreach (var subPath in inputSubPaths)
            {
                // only for raw files
                if (!ExtensionRolesHelper.IsExtensionForceXmp(subPath))
                {
                    return;
                }

                var withXmp = ExtensionRolesHelper.ReplaceExtensionWithXmp(subPath);

                if (_iStorage.IsFolderOrFile(withXmp) !=
                    FolderOrFileModel.FolderOrFileTypeList.Deleted)
                {
                    continue;
                }

                new ExifCopy(_iStorage, _thumbnailStorage, _exifTool, _readMeta).XmpCreate(withXmp);

                var comparedNames = FileIndexCompareHelper.Compare(new FileIndexItem(), updateModel);
                var command       = ExifToolCommandLineArgs(updateModel, comparedNames, true);

                await _exifTool.WriteTagsAsync(withXmp, command);
            }
        }
Ejemplo n.º 2
0
 public async Task <bool> WriteTagsAsync(string subPath, string command)
 {
     return(await _exifTool.WriteTagsAsync(subPath, command));
 }