import xbmc # Get the current service reference service = xbmc.Service(xbmc.getInfoLabel('Container.ServiceName')) # Replace the service with a new one new_service = xbmc.Service('new_service') service.replace(new_service)
import xbmc # Get the current service reference service = xbmc.Service(xbmc.getInfoLabel('Container.ServiceName')) # Get the properties of the service props = service.describe() # Print the properties for key, value in props.items(): print(f'{key}: {value}')The package library that contains the ServiceReference in Python is `xbmc`, which is a Python wrapper for the Kodi media center software.