parent
cd608b79e2
commit
d751a53225
@ -17415,7 +17415,7 @@
|
||||
<summary>
|
||||
from IIIF manifest
|
||||
</summary>
|
||||
<param name="url">example: https://viewer.cbl.ie/viewer/api/v1/records/Per_268/manifest/</param>
|
||||
<param name="url">example: https://viewer.cbl.ie/viewer/api/v1/records/Per_268/manifest/ or https://iiif.bodleian.ox.ac.uk/iiif/manifest/bcbfd832-086b-4874-80f8-87500e0de704.json</param>
|
||||
<param name="friendlyUrl"></param>
|
||||
<param name="skipUpload"></param>
|
||||
<returns></returns>
|
||||
|
||||
@ -230,9 +230,14 @@ namespace RMuseum.Services.Implementation
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
var parsed = JObject.Parse(json);
|
||||
book.Name = book.NameInEnglish = book.Description = book.DescriptionInEnglish =
|
||||
string bookName =
|
||||
parsed.SelectToken("label").Value<string>();
|
||||
|
||||
if(parsed.SelectToken("description") != null)
|
||||
{
|
||||
bookName += " - " + parsed.SelectToken("description").Value<string>();
|
||||
}
|
||||
book.Name = book.NameInEnglish = book.Description = book.DescriptionInEnglish = bookName;
|
||||
|
||||
RTagValue tag;
|
||||
|
||||
@ -242,6 +247,14 @@ namespace RMuseum.Services.Implementation
|
||||
tag = await TagHandler.PrepareAttribute(context, "Contributor Names", "تعیین نشده", 1);
|
||||
meta.Add(tag);
|
||||
|
||||
if (parsed.SelectToken("attribution") != null)
|
||||
{
|
||||
tag = await TagHandler.PrepareAttribute(context, "Attribution", parsed.SelectToken("attribution").Value<string>(), 1);
|
||||
meta.Add(tag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<string> labels = new List<string>();
|
||||
foreach (JToken structure in parsed.SelectTokens("$.structures[*].label"))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user