+
+
+
+
+
{{entry.processingStatus}}| {{entry.createDate | amTimeAgo}}
-
+
|
-
-
-
-
-
-
-
- {{percentageProcessed}}%
-
-
- {{entry.processingStatus}}: {{currentSpeed}}
-
-
-
-
-
-
-
+ |
+
+
+
+
+
+
+
+ {{percentageProcessed}}%
+
+
+ {{entry.processingStatus}}: {{currentSpeed}}
+
+
+
+
+
+
+
+
+ |
+
+
|
-
-
- |
-
-
+
diff --git a/client/src/app/components/podcast/podcast.component.html b/client/src/app/components/podcast/podcast.component.html
index 6f52b3f..33d8561 100644
--- a/client/src/app/components/podcast/podcast.component.html
+++ b/client/src/app/components/podcast/podcast.component.html
@@ -42,15 +42,35 @@
[podcast]="podcast"
(onUrlAddComplete)="onUrlAddComplete($event)">
-
+
+
+
+
(
- service => service.GetInformation (entry.Id));
- var extract = BackgroundJob.ContinueWith
(
- infoJobId, service => service.DownloadAudio (entry.Id));
- var upload = BackgroundJob.ContinueWith (
- extract, service => service.UploadAudio (entry.Id, entry.AudioUrl));
- } catch (InvalidOperationException ex) {
- _logger.LogError ($"Failed submitting job to processor\n{ex.Message}");
- entry.ProcessingStatus = ProcessingStatus.Failed;
- }
+ try {
+ var infoJobId = BackgroundJob.Enqueue (
+ service => service.GetInformation (entry.Id));
+ var extract = BackgroundJob.ContinueWith (
+ infoJobId, service => service.DownloadAudio (entry.Id));
+ var upload = BackgroundJob.ContinueWith (
+ extract, service => service.UploadAudio (entry.Id, entry.AudioUrl));
+ } catch (InvalidOperationException ex) {
+ _logger.LogError ($"Failed submitting job to processor\n{ex.Message}");
+ entry.ProcessingStatus = ProcessingStatus.Failed;
}
- [HttpGet ("all/{podcastSlug}")]
+ }
+
+ [HttpGet ("all/{podcastSlug}")]
public async Task GetAllForSlug (string podcastSlug) {
var entries = await _repository.GetAllAsync (podcastSlug);
var results = _mapper.Map, List> (entries.ToList ());
@@ -71,6 +72,7 @@ namespace PodNoms.Api.Controllers {
entry.Podcast = podcast;
entry.Processed = false;
+ entry.Title = "Waiting for information";
}
await _repository.AddOrUpdateAsync (entry);
await _uow.CompleteAsync ();
diff --git a/server/Program.cs b/server/Program.cs
index bda4f9f..15b1a62 100644
--- a/server/Program.cs
+++ b/server/Program.cs
@@ -17,6 +17,7 @@ namespace PodNoms.Api {
public static IWebHost BuildWebHost (string[] args) =>
WebHost.CreateDefaultBuilder (args)
.UseStartup ()
+ .UseUrls ("http://*:5000")
.UseKestrel (options => {
options.Limits.MaxRequestBodySize = 1073741824;
})