Last modified: 2010-05-15 16:03:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15911, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13911 - Adding the API support for Special:FileDuplicateSearch
Adding the API support for Special:FileDuplicateSearch
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.13.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-01 11:14 UTC by Filippo
Modified: 2010-05-15 16:03 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Filippo 2008-05-01 11:14:01 UTC
Hello,

On the #mediawiki channel, I was suggest to request new APIs feature instead of using the HTML's pages with my Bots (that won't work after also some minor changes in the HTML format). So, here I am.

I need to use this special page: Special:FileDuplicateSearch with my Bots and I would like to do it trough APIs instead of HTML.

It would be really useful for commons and the other wikis in general to catch the duplicated images in the uploading phase.

Thanks,

Filnik
Comment 1 Roan Kattouw 2008-05-01 11:19:02 UTC
That's possible already. First, get the file's SHA-1 hash with

http://commons.wikimedia.org/w/api.php?action=query&titles=Image:Bombers_of_WW1.ogg&prop=imageinfo&iiprop=sha1

then get a list of all files with that SHA-1 hash with

http://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=3caa72f8f594f7c5089224ec8595fee14801eab9

The latter should only list the original title (Image:Bombers_of_WW1.ogg), if it lists other images as well, they're duplicates.
Comment 2 Filippo 2008-05-01 11:23:48 UTC
Uhm... a bit hackish but the bots doesn't care too much if the procedure is complicated. So, thanks for the HowTo :-)

So, can you close the bug? :-) (not sure if I can/if it's the case that I close it on my own ;-))

Thanks again, Filnik
Comment 3 Roan Kattouw 2008-05-01 11:31:08 UTC
(In reply to comment #2)
> Uhm... a bit hackish but the bots doesn't care too much if the procedure is
> complicated. So, thanks for the HowTo :-)
No problem.

> 
> So, can you close the bug? :-) (not sure if I can/if it's the case that I close
> it on my own ;-))
Did that already. Look at the top of this page, where it says Status: RESOLVED Resolution: WORKSFORME

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links