########################################

import os, sys, xbmc, xbmcgui, xbmcplugin, xbmcaddon
	
# Dance Wave! by MSCP Pro

# Various constants used throughout the script
HANDLE = int(sys.argv[1])
ADDON = xbmcaddon.Addon(id='plugin.audio.dancewave')
LANGUAGE  = ADDON.getLocalizedString
THUMBNAIL_PATH = os.path.join( ADDON.getAddonInfo( 'path' ), 'resources', 'media')

def start() :

	li = xbmcgui.ListItem(label=LANGUAGE(30000), thumbnailImage=os.path.join(THUMBNAIL_PATH, 'dw_mp3.png'))
	xbmcplugin.addDirectoryItem(handle=HANDLE, url="http://dancewave.online/dance.mp3", listitem=li, isFolder=False)
	li = xbmcgui.ListItem(label=LANGUAGE(30001), thumbnailImage=os.path.join(THUMBNAIL_PATH, 'dw_ogg.png'))
	xbmcplugin.addDirectoryItem(handle=HANDLE, url="http://dancewave.online/dance.ogg", listitem=li, isFolder=False)
	li = xbmcgui.ListItem(label=LANGUAGE(30002), thumbnailImage=os.path.join(THUMBNAIL_PATH, 'dw_opus.png'))
	xbmcplugin.addDirectoryItem(handle=HANDLE, url="http://dancewave.online/dance.opus", listitem=li, isFolder=False)
	li = xbmcgui.ListItem(label=LANGUAGE(30003), thumbnailImage=os.path.join(THUMBNAIL_PATH, 'dw_aac.png'))
	xbmcplugin.addDirectoryItem(handle=HANDLE, url="http://dancewave.online/dance.aac", listitem=li, isFolder=False)
	li = xbmcgui.ListItem(label=LANGUAGE(30004), thumbnailImage=os.path.join(THUMBNAIL_PATH, 'dwr_mp3.png'))
	xbmcplugin.addDirectoryItem(handle=HANDLE, url="http://retro.dancewave.online/retrodance.mp3", listitem=li, isFolder=False)
	li = xbmcgui.ListItem(label=LANGUAGE(30005), thumbnailImage=os.path.join(THUMBNAIL_PATH, 'dwr_ogg.png'))
	xbmcplugin.addDirectoryItem(handle=HANDLE, url="http://retro.dancewave.online/retrodance.ogg", listitem=li, isFolder=False)
	li = xbmcgui.ListItem(label=LANGUAGE(30006), thumbnailImage=os.path.join(THUMBNAIL_PATH, 'dwr_opus.png'))
	xbmcplugin.addDirectoryItem(handle=HANDLE, url="http://retro.dancewave.online/retrodance.opus", listitem=li, isFolder=False)
	li = xbmcgui.ListItem(label=LANGUAGE(30007), thumbnailImage=os.path.join(THUMBNAIL_PATH, 'dwr_aac.png'))
	xbmcplugin.addDirectoryItem(handle=HANDLE, url="http://retro.dancewave.online/retrodance.aac", listitem=li, isFolder=False)
	setViewMode("504")
	xbmcplugin.endOfDirectory( HANDLE )
	
def setViewMode(id):
	if xbmc.getSkinDir() == "skin.confluence":
		xbmc.executebuiltin("Container.SetViewMode(" + id + ")")
	
start()