mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Add method to delete duplicate libraries
This commit is contained in:
parent
ee754ea533
commit
9cd6396c35
2 changed files with 32 additions and 1 deletions
|
@ -492,7 +492,20 @@ class WebInterface(object):
|
|||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps({'message': 'no data received'})
|
||||
else:
|
||||
return json.dumps({'message': 'Cannot refresh library while getting file sizes.'})
|
||||
return json.dumps({'message': 'Cannot refresh library while getting file sizes.'})
|
||||
|
||||
@cherrypy.expose
|
||||
def delete_duplicate_libraries(self):
|
||||
library_data = libraries.Libraries()
|
||||
|
||||
result = library_data.delete_duplicate_libraries()
|
||||
|
||||
if result:
|
||||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps({'message': result})
|
||||
else:
|
||||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps({'message': 'Unable to delete duplicate libraries from the database.'})
|
||||
|
||||
##### Users #####
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue