Feature/local metadata more tags (#832)
* Stashing code * removed some debug code on series detail page. Now detail is collapsed by default. * Added AgeRating * Fixed a crash when NetVips tries to write a cover file and cover directory is not existing. * When a card is selected for bulk actions, show an outline in addition to select box * Added AgeRating into the metadata parsing. Added a hack where ComicInfo uses Number in ComicInfo rather than Volume. This is to test out the effects on users libraries. * Added AgeRating and ReleaseDate to the metadata implelentation.
This commit is contained in:
parent
46f37069db
commit
af24c928d7
31 changed files with 2825 additions and 101 deletions
|
|
@ -335,6 +335,33 @@ namespace API.Services
|
|||
return null;
|
||||
}
|
||||
|
||||
public static void CleanComicInfo(ComicInfo info)
|
||||
{
|
||||
if (info != null)
|
||||
{
|
||||
info.Writer = Parser.Parser.CleanAuthor(info.Writer);
|
||||
info.Colorist = Parser.Parser.CleanAuthor(info.Colorist);
|
||||
info.Editor = Parser.Parser.CleanAuthor(info.Editor);
|
||||
info.Inker = Parser.Parser.CleanAuthor(info.Inker);
|
||||
info.Letterer = Parser.Parser.CleanAuthor(info.Letterer);
|
||||
info.Penciller = Parser.Parser.CleanAuthor(info.Penciller);
|
||||
info.Publisher = Parser.Parser.CleanAuthor(info.Publisher);
|
||||
|
||||
if (!string.IsNullOrEmpty(info.Web))
|
||||
{
|
||||
// TODO: Validate this works through testing
|
||||
// ComicVine stores the Issue number in Number field and does not use Volume.
|
||||
if (info.Web.Contains("https://comicvine.gamespot.com/"))
|
||||
{
|
||||
if (info.Volume.Equals("1"))
|
||||
{
|
||||
info.Volume = Parser.Parser.DefaultVolume;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This can be null if nothing is found or any errors occur during access
|
||||
/// </summary>
|
||||
|
|
@ -365,16 +392,7 @@ namespace API.Services
|
|||
using var stream = entry.Open();
|
||||
var serializer = new XmlSerializer(typeof(ComicInfo));
|
||||
var info = (ComicInfo) serializer.Deserialize(stream);
|
||||
if (info != null)
|
||||
{
|
||||
info.Writer = Parser.Parser.CleanAuthor(info.Writer);
|
||||
info.Colorist = Parser.Parser.CleanAuthor(info.Colorist);
|
||||
info.Editor = Parser.Parser.CleanAuthor(info.Editor);
|
||||
info.Inker = Parser.Parser.CleanAuthor(info.Inker);
|
||||
info.Letterer = Parser.Parser.CleanAuthor(info.Letterer);
|
||||
info.Penciller = Parser.Parser.CleanAuthor(info.Penciller);
|
||||
info.Publisher = Parser.Parser.CleanAuthor(info.Publisher);
|
||||
}
|
||||
CleanComicInfo(info);
|
||||
return info;
|
||||
}
|
||||
|
||||
|
|
@ -394,16 +412,7 @@ namespace API.Services
|
|||
.Parser
|
||||
.MacOsMetadataFileStartsWith)
|
||||
&& Parser.Parser.IsXml(entry.Key)));
|
||||
if (info != null)
|
||||
{
|
||||
info.Writer = Parser.Parser.CleanAuthor(info.Writer);
|
||||
info.Colorist = Parser.Parser.CleanAuthor(info.Colorist);
|
||||
info.Editor = Parser.Parser.CleanAuthor(info.Editor);
|
||||
info.Inker = Parser.Parser.CleanAuthor(info.Inker);
|
||||
info.Letterer = Parser.Parser.CleanAuthor(info.Letterer);
|
||||
info.Penciller = Parser.Parser.CleanAuthor(info.Penciller);
|
||||
info.Publisher = Parser.Parser.CleanAuthor(info.Publisher);
|
||||
}
|
||||
CleanComicInfo(info);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue