[RELEASE] Texture Cache Maintenance utility
@Milhouse, I have a python script which calls texturecache.py for scanning a new movie path.

This used to work but now i don't get the response I used to get:

Code:
def update_kodi(self, group):

        log.info("Sending JSON-RPC update command to Kodi")

        try:
            remote_moviepath = os.path.join(self.prefix_path, os.path.basename(os.path.normpath(group['destination_dir'])))

            log.debug("Sending JSON VideoLibrary.Scan to scan new movie: %s", remote_moviepath)
            command = []
            command = ['python', self.texturecache_path, 'vscan', self.prefix_path, self.config_file, self.log_file]
            p = Popen(command, stdout=PIPE, stderr=STDOUT)
            response = p.communicate()[0]
            response = response[:-1] if response.endswith("\n") else response
            log.debug('update_kodi response: %s', response)
            if response.find('Updating Library: New movieid') != -1:
                log.info("Successfully updated Kodi library with movie: %s", self.movie_name)
                # wait for Kodi to update database
                time.sleep(20)
                return True
            else:
                log.info("No response from Kodi! Disconnected?")
                return False
        except:
            log.error("There was a problem updating Kodi library with movie %s: %s", (self.movie_name, (traceback.format_exc())))
            return False

I only get the response:
Code:
update_kodi response: Rescanning directory: nfs://192.168.1.77/movies/...

Can you implement a valid response from json rpc response?

Thanks
Reply
 
Thread Rating:
  • 17 Vote(s) - 4.76 Average


Messages In This Thread
Crash on Gotham on OS X - by desepticon - 2014-05-29, 17:57
RE: [RELEASE] Texture Cache Maintenance utility - by redglory - 2017-03-07, 00:56
Cleaning - by AleisterHH - 2018-05-28, 22:03
RE: Cleaning - by Milhouse - 2018-05-28, 22:16
qax genre not updated - by Just-Me_A-User - 2018-06-12, 22:06
RE: qax genre not updated - by Milhouse - 2018-06-12, 23:40


Logout Mark Read Team Forum Stats Members Help
[RELEASE] Texture Cache Maintenance utility4.7617