From 7e6b0fbc40b1ca6603ae28aa0d34cc1e57103a01 Mon Sep 17 00:00:00 2001 From: Adam R Grey Date: Mon, 10 Apr 2023 23:20:07 -0400 Subject: [PATCH] fix bug with podcastify attachment it was making a file, same name as destination. This is why we oop! --- tasks/PodcastifyAttachment.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tasks/PodcastifyAttachment.cs b/tasks/PodcastifyAttachment.cs index 0a07d11..bc8bfc1 100644 --- a/tasks/PodcastifyAttachment.cs +++ b/tasks/PodcastifyAttachment.cs @@ -55,24 +55,21 @@ namespace ttrss_co_client.tasks var toReturn = new WorkOrder() { - articleId = headline.id,//<-- that way later tasks can update the note + articleId = headline.id, Phase2TaskList = new Dictionary(), data = new Dictionary(), guid = Guid.Parse(myGuid) }; toReturn.data["path"] = downloadPath; toReturn.Phase2TaskList[1] = "filemovePublish"; - toReturn.data["publish-target"] = $"{Conf.OnDoneCopy}/Podcasts/{podcastTitle}/{Path.GetFileName(downloadPath)}"; + toReturn.data["publish-target"] = $"{Conf.OnDoneCopy}/Podcasts/{podcastTitle}/"; if(extensionUpstream != ".mp3") { Console.WriteLine($"{headline.title} needs conversion task."); toReturn.Phase2TaskList[0] = "convert"; - toReturn.data["conversion-target"] = downloadPath.Substring(0, downloadPath.LastIndexOf('.')) + ".mp3"; - toReturn.data["publish-target"] = $"{Conf.OnDoneCopy}/Podcasts/{podcastTitle}/{Path.GetFileName(toReturn.data["conversion-target"])}"; + toReturn.data["conversion-target"] = ".mp3"; } - - return toReturn; } }