def startStreamRecord():
    vName = ''
    vPath = ''
    p = xbmc.Player()
    if (p.isPlayingVideo() == True):
        pType = 'Video'
        debob("isPlayingVideo")
        vPath = addst('download_folder_default', '')
    elif (p.isPlayingAudio() == True):
        pType = 'Audio'
        debob("isPlayingAudio")
        vPath = addst('download_folder_audio', '')
        if len(vPath) == 0: vPath = addst('download_folder_default', '')
    elif (p.isPlaying() == True):
        pType = 'Unknown'
        debob("isPlaying")
        vPath = addst('download_folder_default', '')
    else:
        pType = ''
        debob("Couldn't find anything playing.")
        vPath = addst('download_folder_default', '')
    try:
        if (p.isInternetStream() == True):
            iIS = True
            deb("isInternetStream()", "True")
        else:
            iIS = False
            deb("isInternetStream()", "False")
    except:
        iIS = True
        deb("isInternetStream()", "error")
    if (len(vPath) > 0) and (len(pType) > 0) and (iIS == True):
        vPath = fixPath(vPath)
        deb("vPath", vPath)
        vUrl = xbmc.Player().getPlayingFile()
        deb("vUrl", vUrl)
        vName = setupName(vName, pType, vUrl)
        ###
        eod()
        DoA("Back")
        DownloadThis(vUrl, vName, vPath, False)
    else:
        eod()
        DoA("Back")
def startStreamRecord():
	vName=''; vPath=''; p=xbmc.Player(); 
	if   (p.isPlayingVideo()==True): pType='Video'; debob("isPlayingVideo"); vPath=addst('download_folder_default',''); 
	elif (p.isPlayingAudio()==True): 
		pType='Audio'; debob("isPlayingAudio"); vPath=addst('download_folder_audio',''); 
		if len(vPath)==0: vPath=addst('download_folder_default',''); 
	elif (p.isPlaying()==True): pType='Unknown'; debob("isPlaying"); vPath=addst('download_folder_default',''); 
	else: pType=''; debob("Couldn't find anything playing."); vPath=addst('download_folder_default',''); 
	try:
		if (p.isInternetStream()==True): iIS=True; deb("isInternetStream()","True"); 
		else: iIS=False; deb("isInternetStream()","False"); 
	except: iIS=True; deb("isInternetStream()","error"); 
	if (len(vPath) > 0) and (len(pType) > 0) and (iIS==True):
		vPath=fixPath(vPath); deb("vPath",vPath); 
		vUrl=xbmc.Player().getPlayingFile(); deb("vUrl",vUrl); 
		vName=setupName(vName,pType,vUrl); 
		###
		eod(); DoA("Back"); 
		DownloadThis(vUrl,vName,vPath,False); 
	else: eod(); DoA("Back"); 
Example #3
0
def SectionMenu():
	vName=''; vPath=''; p=xbmc.Player(); 
	if   (p.isPlayingVideo()==True): pType='Video'; debob("isPlayingVideo"); vPath=addst('download_folder_default',''); 
	elif (p.isPlayingAudio()==True): 
		pType='Audio'; debob("isPlayingAudio"); vPath=addst('download_folder_audio',''); 
		if len(vPath)==0: vPath=addst('download_folder_default',''); 
	elif (p.isPlaying()==True): pType='Unknown'; debob("isPlaying"); vPath=addst('download_folder_default',''); 
	else: pType=''; debob("Couldn't find anything playing."); vPath=addst('download_folder_default',''); 
	try:
		if (p.isInternetStream()==True): iIS=True; deb("isInternetStream()","True"); 
		else: iIS=False; deb("isInternetStream()","False"); 
	except: iIS=True; deb("isInternetStream()","error"); 
	if (len(vPath) > 0) and (len(pType) > 0) and (iIS==True):
		vPath=fixPath(vPath); deb("vPath",vPath); 
		vUrl=xbmc.Player().getPlayingFile(); deb("vUrl",vUrl); 
		vName=setupName(vName,pType); 
		###
		_addon.add_directory({'mode':'Download','url':vUrl,'destfile':vName,'filetype':pType,'destpath':vPath,'site':site,'section':section},{'title':cFL('Download '+str(pType)+': ','firebrick')+cFL(vName,'mediumpurple')+CR+vUrl},is_folder=True,fanart=fanartSite,img=iconSite)
	###
	_addon.add_directory({'mode':'About','site':site,'section':section},{'title':AFColoring('About')},is_folder=True,fanart=fanartSite,img='http://i.imgur.com/0h78x5V.png') # iconSite
	set_view('list',view_mode=addst('default-view')); eod()