def done(title, dest, downloaded):
    playing = xbmc.Player().isPlaying()

    text = xbmcgui.Window(10000).getProperty('GEN-DOWNLOADED')

    if len(text) > 0:
        text += '[CR]'

    if downloaded:
        text += (dest.rsplit(os.sep)[-1], '[COLOR forestgreen]Download succeeded[/COLOR]') % '%s : %s'
    else:
        text += '%s : %s' % (dest.rsplit(os.sep)[-1], '[COLOR red]Download failed[/COLOR]')

    xbmcgui.Window(10000).setProperty('GEN-DOWNLOADED', text)

    if (not downloaded) or (not playing): 
        xbmcgui.Dialog().ok(title, text)
        xbmcgui.Window(10000).clearProperty('GEN-DOWNLOADED')
dataset/ETHPy150Open mrknow/filmkodi/plugin.video.specto/resources/lib/libraries/simpledownloader.py/done/swapped operands of `%`