Kodi Community Forum
How I refreshed all my TV shows without user interaction, using AutoHotkey - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+---- Forum: Ember Media Manager (https://forum.kodi.tv/forumdisplay.php?fid=195)
---- Thread: How I refreshed all my TV shows without user interaction, using AutoHotkey (/showthread.php?tid=191262)



How I refreshed all my TV shows without user interaction, using AutoHotkey - zerocool_ie - 2014-04-03

First off, I just want to say thanks for continuing the development on Ember. For me, it's the best media manager out there.

I use Ember more for TV shows than movies and the one thing I always wished EMM could do was to automatically refresh all my TV shows for me, like the movies section can. Depending on when the scrape is done, there can be missing ratings, air dates, thumbs, etc. The last time I refreshed all my shows, it took 2 or 3 evenings of on-and-off manual scraping, so I decided I would write a script to do it for me. I wrote and ran this last night and woke up this morning to a fully refreshed TV library.

I created a new AutoHotkey script using the contents below, which basically waits for the "TV Image Selection" & "Edit Show - show name" windows, activates them, waits 5 seconds and then clicks the OK button for me. You may need to modify the ahk_class name on a different operating system, but hopefully you get the idea of what worked for me and might find it useful. It could be total overkill, but it's what worked for me Big Grin

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Loop
{
IfWinExist, TV Image Selection
{
    Sleep 5000    
    WinActivate  ; Automatically uses the window found above
    Click 744, 469 ; Click OK
}

If WinExist("ahk_class WindowsForms10.Window.8.app.0.378734a")
{
    Sleep 5000    
    WinActivate  ; Automatically uses the window found above
    Click 743, 592 ; Click OK
}
}



RE: How I refreshed all my TV shows without user interaction, using AutoHotkey - DanCooper - 2014-04-03

Haha, great thing.
We will later install a feature which automatically refreshes the TV shows.


RE: How I refreshed all my TV shows without user interaction, using AutoHotkey - Wizzzard - 2014-04-04

I've tried your script only for some reason it doesn't do anything.

I have used the windows spy and the ahk_class is exactly the same.
When do i need to start the script? Can launch it before starting EMM?


RE: How I refreshed all my TV shows without user interaction, using AutoHotkey - ss4johnny - 2014-04-05

The ratings are a big issue. Might give it a try later.


RE: How I refreshed all my TV shows without user interaction, using AutoHotkey - zerocool_ie - 2014-04-05

(2014-04-04, 20:12)Wizzzard Wrote: I've tried your script only for some reason it doesn't do anything.

I have used the windows spy and the ahk_class is exactly the same.
When do i need to start the script? Can launch it before starting EMM?

Here's the exact steps I used:

1. Launched EmberMM
2. Left clicked on the first TV show in my list
3. Scrolled down to last TV show, held Shift and left clicked the last show
4. Right clicked on any show and chose "(Re)Scrape show"
5. Launch the script now
6. It should now activate and auto-click the OK button in each window.
7. Once all the scraping is done, stop the script.

Maybe check the mouse co-ordinates in the script to ensure they line up with the button position on your PC?

Hope this helps, let me know if you have other questions Smile


RE: How I refreshed all my TV shows without user interaction, using AutoHotkey - DanCooper - 2014-04-07

"Refresh Data" for tv shows in done for next beta release.
This works with single or multiple tv shows.

This function does the following:
- downloading new informations and images from TVDB
- add missing posters/fanarts/banners for seasons (without overwriting existing)
- add missing poster for episodes (without overwriting existing)
- rewrite/refresh tv show and episodes nfo's


RE: How I refreshed all my TV shows without user interaction, using AutoHotkey - Wizzzard - 2014-04-07

(2014-04-07, 00:12)DanCooper Wrote: "Refresh Data" for tv shows in done for next beta release.
This works with single or multiple tv shows.

This function does the following:
- downloading new informations and images from TVDB
- add missing posters/fanarts/banners for seasons (without overwriting existing)
- add missing poster for episodes (without overwriting existing)
- rewrite/refresh tv show and episodes nfo's

Nice!! This is a really great feature!


RE: How I refreshed all my TV shows without user interaction, using AutoHotkey - zerocool_ie - 2014-04-12

(2014-04-07, 00:12)DanCooper Wrote: "Refresh Data" for tv shows in done for next beta release.
This works with single or multiple tv shows.

This function does the following:
- downloading new informations and images from TVDB
- add missing posters/fanarts/banners for seasons (without overwriting existing)
- add missing poster for episodes (without overwriting existing)
- rewrite/refresh tv show and episodes nfo's

Woop! Thanks Dan


This forum uses Lukasz Tkacz MyBB addons.