Skip to content

Commit

Permalink
Depth wallpaper template data is taken from project file instead
Browse files Browse the repository at this point in the history
  • Loading branch information
rocksdanister committed Jun 27, 2023
1 parent 5303ce7 commit a0faa08
Showing 1 changed file with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,12 @@ await Task.Run(async() =>
});
inputImage.Extent(480, 270, Gravity.Center);
await inputImage.WriteAsync(Path.Combine(destDir, "thumbnail.jpg"));
JsonStorage<ILivelyInfoModel>.StoreData(Path.Combine(destDir, "LivelyInfo.json"), new LivelyInfoModel()
{
Title = Path.GetFileNameWithoutExtension(inputImagePath),
Desc = i18n.GetString("DescriptionDepthWallpaperTemplate/Content"),
Type = WallpaperType.web,
IsAbsolutePath = false,
FileName = "index.html",
Contact = "https://github.com/rocksdanister/depthmap-wallpaper",
License = "See License.txt",
Author = "rocksdanister",
AppVersion = desktopCore.AssemblyVersion.ToString(),
Preview = "preview.gif",
Thumbnail = "thumbnail.jpg",
Tags = new() { "depth", "depthmap" },
Arguments = string.Empty,
});
//LivelyInfo.json update
var infoModel = JsonStorage<LivelyInfoModel>.LoadData(Path.Combine(destDir, "LivelyInfo.json"));
infoModel.Title = Path.GetFileNameWithoutExtension(inputImagePath);
infoModel.Desc = i18n.GetString("DescriptionDepthWallpaperTemplate/Content");
infoModel.AppVersion = desktopCore.AssemblyVersion.ToString();
JsonStorage<LivelyInfoModel>.StoreData(Path.Combine(destDir, "LivelyInfo.json"), infoModel);
});

//Preview output to user
Expand Down

0 comments on commit a0faa08

Please sign in to comment.