i have a code that take the music title of xbmc and i want to put it in a url to send it. However urllib does not like the space in the title here the code:
if xbmc.Player().isPlayingAudio() and audio != 1 :
audio = 1
urllib2.urlopen('http://%s:3480/data_request?id=variableset&DeviceNum=%s&serviceId=urn:upnp-org:serviceId:XBMCState1&Variable=PlayerStatus&Value=playing_audio' % (ip, dev))
tag = xbmc.Player().getMusicInfoTag()
title = tag.getTitle()
title.replace(" ", "_")
print ("playing:" + title)
however when check in the log file, the space still there. All i want is (title = summer of 69) to (title = summer_of_69) and if possible convert also the (') to nothing
Thanks Mic