def createEpisodeSubtitle(sourcebase):
    seasonNumber = xbmclibrary.replaceEmptyItemWithHomeProperty(xbmclibrary.getItemFromHomeProperty(sourcebase + '.Season'), sourcebase + '.EpisodeSeason')
    episodeNumber = xbmclibrary.replaceEmptyItemWithHomeProperty(xbmclibrary.getItemFromHomeProperty(sourcebase + '.Episode'), sourcebase + '.EpisodeNumber')
    
    return xbmclibrary.joinItems(
        xbmclibrary.getItemFromHomeProperty(sourcebase + '.ShowTitle'),
        xbmclibrary.getItemFromHomeProperty(sourcebase + '.TVShowTitle'),
        xbmclibrary.addPrefixToItem(xbmclibrary.getLocalizedValue(20373) + ' ', xbmclibrary.getNumericValue(seasonNumber)),
        xbmclibrary.addPrefixToItem(xbmclibrary.getLocalizedValue(20359) + ' ', xbmclibrary.getNumericValue(episodeNumber)))
def createGenericAction(sourcebase):
    result = xbmclibrary.getItemFromHomeProperty(sourcebase + '.Play')
    if result == '':
        result = xbmclibrary.getItemFromHomeProperty(sourcebase + '.LibraryPath')
        if 'videodb' in result.lower():
            result = xbmclibrary.addPrefixAndSuffixToItem('ActivateWindow(videos,', result, ',return)')
        if 'musicdb' in result.lower():
            result = xbmclibrary.addPrefixAndSuffixToItem('ActivateWindow(music,', result, ',return)')
    if result == '':
        result = xbmclibrary.addPrefixAndSuffixToItem('PlayMedia("', xbmclibrary.getItemFromHomeProperty(sourcebase + '.Path'), '")')
    return result
def createGenericSubtitle(sourcebase):
    return xbmclibrary.joinItems(
        xbmclibrary.getItemFromHomeProperty(sourcebase + '.ShowTitle'),
        xbmclibrary.getItemFromHomeProperty(sourcebase + '.TVShowTitle'),
        xbmclibrary.getItemFromHomeProperty(sourcebase + '.Studio'),
        xbmclibrary.getItemFromHomeProperty(sourcebase + '.Artist'),
        xbmclibrary.getNumericValue(xbmclibrary.getItemFromHomeProperty(sourcebase + '.Year')),
        xbmclibrary.getNumericValue(xbmclibrary.getItemFromHomeProperty(sourcebase + '.Version')))
def createFavouriteAction(sourcebase):
    return baselibrary.escapePath(xbmclibrary.getItemFromHomeProperty(sourcebase + '.path'))
def createGenericBackgroundImage(sourcebase):
    result = xbmclibrary.getItemFromHomeProperty(sourcebase + '.Art(Fanart)')
    result = xbmclibrary.replaceEmptyItemWithHomeProperty(result, sourcebase + '.Property(Fanart_image)')
    result = xbmclibrary.replaceEmptyItemWithHomeProperty(result, sourcebase + '.Fanart')
    return result
def createGenericThumbnail(sourcebase):
    result = xbmclibrary.getItemFromHomeProperty(sourcebase + '.Art(poster)')
    result = xbmclibrary.replaceEmptyItemWithHomeProperty(result, sourcebase + '.thumb')
    result = xbmclibrary.replaceEmptyItemWithHomeProperty(result, sourcebase + '.Thumb')
    result = xbmclibrary.replaceEmptyItemWithHomeProperty(result, sourcebase + '.Icon')
    return result
def createSongSubtitle(sourcebase):
    return xbmclibrary.joinItems(
        xbmclibrary.getItemFromHomeProperty(sourcebase + '.Album'),
        xbmclibrary.getNumericValue(xbmclibrary.getItemFromHomeProperty(sourcebase + '.Year')))
def createFavouriteName(sourcebase):
    return xbmclibrary.getItemFromHomeProperty(sourcebase + '.name')
def createSongName(sourcebase):
    return xbmclibrary.getItemFromHomeProperty(sourcebase + '.Artist') + ' - ' + xbmclibrary.getItemFromHomeProperty(sourcebase + '.Title')
def createGenericName(sourcebase):
    return xbmclibrary.replaceEmptyItemWithHomeProperty(xbmclibrary.getItemFromHomeProperty(sourcebase + '.Title'), sourcebase + '.EpisodeTitle')