[RELEASE] Library Editor script
#50
No probs, it was a quick fix and I have had a bit more time to look at it. As the script provides the movieid, I think it would be better to use 'VideoLibrary.GetMovieDetails'.
The way it is now it would get confused if two movies were named the same, so I made some adjustments. Smile

code..
PHP Code:
elif actionstring == "sorttitle" :
            
json_request xbmc.executeJSONRPC('{"jsonrpc": "2.0", "id": 1, "method": "VideoLibrary.GetMovieDetails", "params": {"properties": ["sorttitle"], "movieid": %s }}' self.DBID)
            
json_request unicode(json_request'utf-8'errors='ignore')
            
json_response json.loads(json_request)
            if 
json_response.has_key('result') and (json_response['result'] != None) and json_response['result'].has_key('moviedetails'):
                
sort_title str(json_response['result']['moviedetails']['sorttitle'])
            if 
sort_title == "":
                
self._edit_db_string(xbmc.getInfoLabel('ListItem.Title'),self.TYPE,"sorttitle")
            else:
                
self._edit_db_string(sort_title,self.TYPE,"sorttitle"

here is the adjusted default.py
default_update.zip
Reply


Messages In This Thread
[RELEASE] Library Editor script - by phil65 - 2013-03-09, 20:52
RE: [RELEASE] Library Editor script - by crni - 2013-03-11, 21:20
RE: [RELEASE] Library Editor script - by Gade - 2013-03-14, 00:55
RE: [RELEASE] Library Editor script - by User 55003 - 2015-07-29, 10:52
Logout Mark Read Team Forum Stats Members Help
[RELEASE] Library Editor script3