fix bug with podcastify attachment
it was making a file, same name as destination. This is why we oop!
This commit is contained in:
parent
3d84beb640
commit
7e6b0fbc40
@ -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<int, string>(),
|
||||
data = new Dictionary<string, string>(),
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user