#23 using Ganjoor data structures for narration titles
This commit is contained in:
parent
e5e8ac02b0
commit
dd144ecb81
@ -6,6 +6,7 @@ using Microsoft.Extensions.Configuration;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Renci.SshNet;
|
||||
using RMuseum.DbContext;
|
||||
using RMuseum.Models.Ganjoor;
|
||||
using RMuseum.Models.GanjoorAudio;
|
||||
using RMuseum.Models.GanjoorAudio.ViewModels;
|
||||
using RMuseum.Models.UploadSession;
|
||||
@ -430,6 +431,18 @@ namespace RMuseum.Services.Implementation
|
||||
ReviewStatus = AudioReviewStatus.Draft
|
||||
};
|
||||
|
||||
if (narration.AudioTitle.IndexOf("فایل صوتی") == 0) //no modification on title
|
||||
{
|
||||
GanjoorPoem poem = await _context.GanjoorPoems.Where(p => p.Id == audio.PoemId).SingleOrDefaultAsync();
|
||||
if (poem != null)
|
||||
{
|
||||
narration.AudioTitle = poem.Title;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
context.AudioFiles.Add(narration);
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user