Commons:Bots/Requests/JhsBot

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

JhsBot (talk · contribs)

Operator: Jon Harald Søby (talk · contributions · Statistics · Recent activity · block log · User rights log · uploads · Global account information)

Bot's tasks for which permission is being sought: Moving pages in the TimedText namespace to the right name if their connected files have been moved.

Automatic or manually assisted: Automatic, will run from Toolforge

Edit type (e.g. Continuous, daily, one time run): Continuous

Maximum edit rate (e.g. edits per minute): Maximum 6 edits (moves) per minute

Bot flag requested: (Y/N): Yes

Programming language(s): Python

I noticed that when you move an audio or video file, the connected TimedText pages aren't moved, and there isn't any indication to the person who moved it that something is amiss. That makes the subtitles unavailable for anyone viewing the video, and leaves TimedText pages "orphaned" – and it even possibly creates duplicate work if someone adds new subtitles, not knowing that subtitles for the file already exist. Therefore I wrote a small script that I intend to run from Toolforge, that monitors the move log and checks whether audio/video files that are moved have corresponding TimedText pages, and moves those (preferrably without leaving a redirect, since redirects on TimedText pages don't work) to the right location, i.e. with a page name corresponding exactly to the file name. Jon Harald Søby (talk) 22:57, 16 September 2021 (UTC)[reply]

Discussion
@EugeneZelenko: It is a little bit difficult to test it out "naturally", because it will only do something when a video/audio file with existing TimedText pages are moved (and that doesn't happen very often). However, I created File:Move timedtext example file.webm, created some dummy TimedText pages for it at TimedText:Move timedtext example file.webm.nb.srt and TimedText:Move timedtext example file.webm.nl-informal.srt, and then I (with my normal account, not my bot account) moved the file to File:Move timedtext example file – moved.webm. As you can see from the bot contributions, it successfully moved one of the TimedText pages to the right location. The reason it didn't move the second one was that it was blocked by Special:AbuseFilter/60 (for being an account without many edits doing moves in a short span of time) – that shouldn't happen when it has bot status, but since the filter is private I can't be 100 % sure since I don't know exactly what the filter is looking for. Anyways, with sufficient rights, it would have moved the second page as well. Jon Harald Søby (talk) 23:58, 17 September 2021 (UTC)[reply]
I confirmed bot's account. Please remove bot: from edit summary. Bot in account name is enough. --EugeneZelenko (talk) 14:52, 18 September 2021 (UTC)[reply]
✓ Done The edit filter still kicks in though, so it only moved the one page when I tried it again now. Jon Harald Søby (talk) 00:14, 19 September 2021 (UTC)[reply]
I have changed the filter not to trigger for confirmed users or bots. Platonides (talk) 02:07, 19 September 2021 (UTC)[reply]
Thank you @Platonides! Did another test now, and the bot moved both pages it should move (see contributions). Jon Harald Søby (talk) 21:49, 19 September 2021 (UTC)[reply]

Approved. --Krd 06:18, 26 September 2021 (UTC)[reply]