Skip to content

Commit

Permalink
idea to avoid escaping chars
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Mar 16, 2022
1 parent 43e4d71 commit fa451cc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 244 deletions.
12 changes: 12 additions & 0 deletions starsky/starsky.foundation.writemeta/Helpers/ExifToolCmdHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using starsky.foundation.database.Helpers;
using starsky.foundation.database.Models;
Expand Down Expand Up @@ -270,6 +271,17 @@ private string UpdateGpsLongitudeCommand(string command, List<string> comparedNa
return command;
}

internal static string ReplaceBadChars(string inputText)
{
var cleanText = new StringBuilder();
const string badChars = "';`$\"\r\n\t*><?[]|&\\#()}{"; // removed space and dash
foreach ( var inputChar in inputText.Where(inputChar => !badChars.Contains(inputChar)) )
{
cleanText.Append(inputChar);
}
return cleanText.ToString();
}

private static string UpdateKeywordsCommand(string command, List<string> comparedNames, FileIndexItem updateModel)
{
if (comparedNames.Contains( nameof(FileIndexItem.Tags).ToLowerInvariant() ))
Expand Down
124 changes: 0 additions & 124 deletions starsky/starsky.foundation.writemeta/Models/ExifToolModel.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public ExifToolService(ISelectorStorage selectorStorage, AppSettings appSettings
var iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath);
var thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail);
_exifTool = new ExifTool(iStorage, thumbnailStorage, appSettings,logger);

}

public async Task<bool> WriteTagsAsync(string subPath, string command)
{
return await _exifTool.WriteTagsAsync(subPath,command);
Expand Down
119 changes: 0 additions & 119 deletions starsky/starskytest/Models/ExifToolModelTest.cs

This file was deleted.

0 comments on commit fa451cc

Please sign in to comment.