Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
riderkick committed Jul 24, 2015
1 parent 4b2c035 commit 296c5d3
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions baseunits/uData.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2630,7 +2630,6 @@ function TMangaInformation.GetInfoFromURL(const website, URL: String;
s: String;
j, k: Integer;
del: Boolean;
rex: TRegExpr;
Source: TStringList;
Parser: THTMLParser;
WebsiteID: Cardinal;
Expand Down Expand Up @@ -3115,21 +3114,12 @@ function TMangaInformation.GetInfoFromURL(const website, URL: String;
//mangaInfo.summary := Trim(StringReplace(mangaInfo.summary, '\r\n\r\n', '\r\n', [rfReplaceAll]));

// fix info
rex := TRegExpr.Create;
try
rex.Expression := '^[\-\:]$';
if rex.Exec(mangaInfo.authors) then
mangaInfo.authors := '';
if rex.Exec(mangaInfo.artists) then
mangaInfo.artists := '';
if rex.Exec(mangaInfo.summary) then
mangaInfo.summary := '';
rex.Expression := '\<\/?\w\>';
if rex.Exec(LowerCase(mangaInfo.summary)) then
mangaInfo.summary := '';
finally
rex.Free;
end;
if (mangaInfo.authors = '-') or (mangaInfo.authors = ':') then
mangaInfo.authors := '';
if (mangaInfo.artists = '-') or (mangaInfo.artists = ':') then
mangaInfo.artists := '';
if (mangaInfo.summary = '-') or (mangaInfo.summary = ':') then
mangaInfo.summary := '';

// remove duplicate chapter
if mangaInfo.chapterLinks.Count > 0 then
Expand Down

0 comments on commit 296c5d3

Please sign in to comment.