write() can only use buffers of type strings or bytearrays, not buffers of unicode type

This commit is contained in:
Famille Bollu 2018-07-26 21:54:59 +02:00
parent 119667789d
commit db7984431b
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ class PeertubeAddon():
# Save magnet link temporarily.
tmp_f = xbmc.translatePath('special://temp') + '/plugin.video.peertube/' + video['uuid']
f = xbmcvfs.File(tmp_f, 'w')
f.write(magnet)
f.write(bytearray(magnet, 'utf8'))
f.close()
# Add our item to the listing as a 3-element tuple.