Danbooru

Danbooru 2 Issues Topic

Posted under General

This topic has been locked.

Can't add tags.

Error

The database timed out running your query.

Details

ActiveRecord::QueryCanceled exception raised
app/models/tag.rb:95:in `increment_post_counts'
app/models/post.rb:572:in `update_tag_post_counts'
app/controllers/posts_controller.rb:50:in `update'

Only happens in main site, it works just fine in the mirrors.[/s]

Edit: Fixed now, seems like it was a temporary issue.

Updated

Why am I not able to upload images from my computer? I installed the Upload File Input CSS code into both Greasemonkey and Danbooru's CSS settings, but while I actually see the icon for browsing my computer pop up, it's only there for a split second before it disappears.

This is particularly concerning because sometimes I upload images from Hitomi, but they recently switched over from JPG/PNG files to WebP, which Danbooru doesn't seem to support at the moment. That means I can't use the URL to upload. Thus I've had to manually convert these WebP images into PNG and upload from my computer, but now the upload file input doesn't work.

So yeah, I'm kind of stuck.

Benit149 said:

Please don't recompress anything anywhere.
First Hitomi is a exhentai rip, second you can still get original image from them.
say the id on the link is 1499969 you go on https://ltn.hitomi.la/galleries/1499969.js , view the image for page x, say the page 0 the name is SskVR_000.jpg, then go on https://aa.hitomi.la/galleries/1499969/SskVR_001.jpg .
or just go to the original gallery on exhentai, https://exhentai.org/g/1492263/62331248aa/ (notice the id of the gallery is the same as on hitomi because hitomi is just a selective copy of exhentai)

fredgido said:

Please don't recompress anything anywhere.
First Hitomi is a exhentai rip, second you can still get original image from them.
say the id on the link is 1499969 you go on https://ltn.hitomi.la/galleries/1499969.js , view the image for page x, say the page 0 the name is SskVR_000.jpg, then go on https://aa.hitomi.la/galleries/1499969/SskVR_001.jpg .
or just go to the original gallery on exhentai, https://exhentai.org/g/1492263/62331248aa/ (notice the id of the gallery is the same as on hitomi because hitomi is just a selective copy of exhentai)

They're not even a *good* exh RIP, they only rip the 1200p images, I think.

DeusExCalamus said:

They're not even a *good* exh RIP, they only rip the 1200p images, I think.

As far as I saw the "download" images are the original.

Ah I forgot to say it seems there is a problem, looks like you can only access direct link images with a referrer. So you do have to press download on the gallery page, or do some complicated stuff. Anyway, just use exhentai.

Updated

Benit149 said:

Why am I not able to upload images from my computer? I installed the Upload File Input CSS code into both Greasemonkey and Danbooru's CSS settings, but while I actually see the icon for browsing my computer pop up, it's only there for a split second before it disappears.

I developed a userscript fix for that in forum #160207.

fredgido said:

Please don't recompress anything anywhere.
First Hitomi is a exhentai rip, second you can still get original image from them.
say the id on the link is 1499969 you go on https://ltn.hitomi.la/galleries/1499969.js , view the image for page x, say the page 0 the name is SskVR_000.jpg, then go on https://aa.hitomi.la/galleries/1499969/SskVR_001.jpg .
or just go to the original gallery on exhentai, https://exhentai.org/g/1492263/62331248aa/ (notice the id of the gallery is the same as on hitomi because hitomi is just a selective copy of exhentai)

I wish I could use exhentai, but the website only comes up as a blank page for me.

BrokenEagle98 said:

I developed a userscript fix for that in forum #160207.

That's the exact same userscript I used yesterday, and the same problem keeps happening to me. The Browse button pops up for a split second, but then disappears.

Benit149 said:

That's the exact same userscript I used yesterday, and the same problem keeps happening to me. The Browse button pops up for a split second, but then disappears.

What browser are you using? Also what custom CSS are you using?

Benit149 said:

My browser is Firefox. I’m using Danbooru’s custom CSS rather than Greasemonkey.

I meant what is your custom CSS? I was going to look it over and see if there was anything in it that was causing issues.

Anyways, I just tried the userscript on Firefox and it works for me. You might want to check to make sure that the script is even activated. If you click the Tampermonkey icon next to the address bar, it'll open up and show all of the scripts that are running. Make sure that "Upload File Input" is one of them. If all of that checks out, then check the dev console (F12) for errors.

BrokenEagle98 said:

I meant what is your custom CSS? I was going to look it over and see if there was anything in it that was causing issues.

Anyways, I just tried the userscript on Firefox and it works for me. You might want to check to make sure that the script is even activated. If you click the Tampermonkey icon next to the address bar, it'll open up and show all of the scripts that are running. Make sure that "Upload File Input" is one of them. If all of that checks out, then check the dev console (F12) for errors.

Well, this is the custom CSS I have in my Danbooru settings. My Greasemonkey settings are disabled, so these are the only settings that should be active...

BTW, I'm still on Greasemonkey. Should that be updated to Tampermonkey, or am I fine?

/* make spoiler text readable only when selected */
.spoiler { color: black }
.spoiler a { color: black }
.blacklisted-active { display:none }

#c-posts #tags {
font-family: Arial;
}

#c-uploads #a-new #filedropzone {
display: none;
}
#c-uploads #a-new .input.fallback {
display: block;
}

#c-uploads #a-new #related-tags-container {
display: block;
}

// ==UserScript==
// @name Upload File Input
// @version 1.0
// @description Add the file input back to the uploads page.
// @match *://*.donmai.us/uploads/new*
// @exclude /^https?://\w+\.donmai\.us/.*\.(xml|json|atom)(\?|$)/
// @grant none
// @run-at document-end
// ==/UserScript==

const timer = setInterval(()=>{
if ($('#upload_file').length === 0) {
clearInterval(timer);
$("#filedropzone").before(`
<div class="input fallback">
<label for="upload_file">File</label>
<input size="50" type="file" name="upload[file]" id="upload_file" />
</div>`);
}
}, 100);

Benit149 said:

Well, this is the custom CSS I have in my Danbooru settings. My Greasemonkey settings are disabled, so these are the only settings that should be active...

BTW, I'm still on Greasemonkey. Should that be updated to Tampermonkey, or am I fine?

My scripts are always coded for Tampermonkey, so they should normally be used with that. The problem is that the Greasemonkey doesn't port jQuery over to the script so it doesn't have access to it like Tampermonkey does. It can be solved by using unsafeWindow like in the following, but it's generally not recommended.

// ==UserScript==
// @name         Upload File Input (Greasemonkey ver)
// @version      1.0.g
// @description  Add the file input back to the uploads page.
// @match        *://*.donmai.us/uploads/new*
// @exclude      /^https?://\w+\.donmai\.us/.*\.(xml|json|atom)(\?|$)/
// @grant        none
// @run-at       document-end
// ==/UserScript==

const timer = setInterval(function (){
    if (unsafeWindow.$('#upload_file').length === 0) {
        clearInterval(timer);
        unsafeWindow.$("#filedropzone").before(`
<div class="input fallback">
    <label for="upload_file">File</label>
    <input size="50" type="file" name="upload[file]" id="upload_file" />
</div>`);
    }
}, 100);

Site update

Changes
  • Increased the sidebar width.
  • Posts now show the full source in the sidebar.
  • IQDB:
    • The uploads page now shows more similar image results (the minimum similarity was lowered from 80% to 20%). This will lead to more false positives. This is intentionally low because sometimes there are good matches that have very low similarity scores.
    • Added more info beneath similar image results. The source and upload date are now shown, and you can click the filesize to open full images for comparison.
    • Removed the 'Similar' button next to the source field in the post edit form. Use the 'Find similar' link in the sidebar instead.
  • DText:
    • Tags are now colorized in wiki pages, in forum posts, and elsewhere (ex: touhou, chen, bkub).
    • Links to nonexistent wiki pages are now marked with a dotted underline (ex: this tag does not exist).
    • Basic HTML tags are now supported. Supported tags: <b>, <i>, <s>, <u>, <strong>, <em>, <table>, <thead>, <tbody>, <tr>, <th>, <td>, <code>, <quote>, <tn>, <expand>, <spoiler>, <nodtext>.
    • HTML links are now supported (ex: <a href="http://www.example.com">link text goes here</a>).
    • Markdown style links are now supported (ex: [http://www.example.com](link text goes here)).
Fixes
  • Fixed the "nil can't be coerced into Float" error when searching certain video tags. This happened when a post had a blank width or height.
  • Fixed long usernames in comments not word wrapping.
  • Fixed long sources on the upload tags report not word wrapping.
  • Fixed long tags in the sidebar not word wrapping (ex: kuouzumiaiginsusutakeizumonokamimeichoujin_mika).
  • Fixed related tags returning nonexistent tags linked in wiki pages.
  • Fixed [code] tags not ignoring DText markup inside the tag.
  • Fixed pixiv #1234 links to use new Pixiv urls.
API Changes
  • /iqdb_queries.json now supports the 'limit' (max number of results) and 'similarity' (minimum similarity threshold) params.
  • /iqdb_queries.xml is now supported (previously only .json was supported).

Full changelog: https://github.com/r888888888/danbooru/compare/production-2019.10.08-045432-utc...production-2019.10.15-030638-utc

Is there a custom CSS to restore the old sidebear width?
There is a lot of wasted space and my phone only displays three images per row instead of four now, which is a bit annoying.

.sidebar-container aside {
  min-width: 15em;
}

The desktop layout is designed for desktop. You can use it on mobile, but if there are things that don't work well they're not generally going to be changed to accommodate phones. That's what the mobile layout is for.

evazion said:

.sidebar-container aside {
  min-width: 15em;
}

The desktop layout is designed for desktop. You can use it on mobile, but if there are things that don't work well they're not generally going to be changed to accommodate phones. That's what the mobile layout is for.

Thank you very much.
And yes, I know, which is why I asked for CSS rather than a sitewide change.
Sorry if it came out wrongly.

Is there a way to keep the "Similar" button from automatically uploading your post and keeping you from adding tags in the meantime? I just want to check if the image has already been posted, and if it turns out it hasn't been that doesn't necessarily mean I want it to be added either.

Minor update
  • Uploads: raised the minimum similarity threshold to 50%.
  • Uploads: fix the 'Similar' button not working correctly when manually clicked.
  • Related tags: fixed wiki tags not being listed in wiki order.
  • Related tags: fixed error when using related tags on a copyright tag without a wiki.
  • Related tags: fix artist urls not opening in new tab.

Anonymous9000 said:

Is there a way to keep the "Similar" button from automatically uploading your post and keeping you from adding tags in the meantime? I just want to check if the image has already been posted, and if it turns out it hasn't been that doesn't necessarily mean I want it to be added either.

Not sure what you mean. The Similar button on the upload page has to download the image in order to do the check. It doesn't upload the post though unless you click submit. I'm not sure what you mean by it keeping you from adding tags.

You can use https://danbooru.donmai.us/iqdb_queries if you just want to do a reverse image search without uploading. It's easier though to use userscripts if you're checking for posts that have already been uploaded: