Skip to content

Commit

Permalink
Fix Issue#128
Browse files Browse the repository at this point in the history
  • Loading branch information
Nandaka committed Aug 8, 2017
1 parent 6ca1268 commit 38fc0f6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
18 changes: 14 additions & 4 deletions DanbooruDownloader3/FormMain.cs
Expand Up @@ -563,14 +563,23 @@ private void LoadThumbnailLater(int i)
_clientThumb.CancelAsync();
return;
}

_isLoadingThumb = true;
tsProgressBar.Visible = true;
_loadedThumbnail = i;
timGifAnimation.Enabled = true;
_clientThumb.Referer = _postsDao.Posts[i].Referer;
_clientThumb.DownloadDataAsync(new Uri(_postsDao.Posts[_loadedThumbnail].PreviewUrl), _loadedThumbnail);
txtLog.AppendText("[clientThumbnail] Downloading thumbnail from " + _postsDao.Posts[_loadedThumbnail].PreviewUrl + Environment.NewLine);

if (!String.IsNullOrWhiteSpace(_postsDao.Posts[_loadedThumbnail].PreviewUrl))
{
_clientThumb.DownloadDataAsync(new Uri(_postsDao.Posts[_loadedThumbnail].PreviewUrl), _loadedThumbnail);
txtLog.AppendText("[clientThumbnail] Downloading thumbnail from " + _postsDao.Posts[_loadedThumbnail].PreviewUrl + Environment.NewLine);
}
else
{
txtLog.AppendText("[clientThumbnail] No url for thumbnails for post: " + _postsDao.Posts[_loadedThumbnail].Id + Environment.NewLine);
if (_postsDao.Posts.Count > i)
LoadThumbnailLater(++i);
}
}
}

Expand Down Expand Up @@ -1241,7 +1250,7 @@ private void ResolveFileUrlBatch(ExtendedWebClient _clientPost, DanbooruPost pos
string html = _clientPost.DownloadString(post.Referer);
_clientPost.Timeout = Convert.ToInt32(txtTimeout.Text);

if (post.Provider.BoardType == BoardType.Danbooru)
if (post.Provider.BoardType == BoardType.Danbooru && post.Provider.Name.ToLower().Contains("sankaku"))
{
post = SankakuComplexParser.ParsePost(post, html, !chkUseGlobalProviderTags.Checked);
//post.FileUrl = tempPost.FileUrl;
Expand Down Expand Up @@ -1329,6 +1338,7 @@ private DanbooruPostDao GetBatchImageList(String url, String query, DanbooruBatc
{
//UpdateLog("DoBatchJob", "Wait for " + wait + " of " + delay);
Thread.Sleep(1000);

}
UpdateLog("DoBatchJob", "Retrying...");
}
Expand Down
4 changes: 2 additions & 2 deletions DanbooruDownloader3/Properties/AssemblyInfo.cs
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.2017.01.31")]
[assembly: AssemblyFileVersion("3.2017.01.31")]
[assembly: AssemblyVersion("3.2017.08.08")]
[assembly: AssemblyFileVersion("3.2017.08.08")]
3 changes: 3 additions & 0 deletions changelog.txt
@@ -1,5 +1,8 @@
Change Log:
=============================
- DanbooruDownloader20170808
- Fix Issue #128: Fix Danbooru updating API to block loli/shota for non-gold account.

- DanbooruDownloader20170131
- Implement #95: Filter images by extension in batch mode (using regex).
- Fix Issue #90: Cannot select Use Regex in Settings Tab (UI issue).
Expand Down

0 comments on commit 38fc0f6

Please sign in to comment.