SMB client: versión 1.1.25 de pysmb

Hace posible el funcionamiento de la Videoteca en un servidor Samba (disco contectado a router, NAS, servidor windows,...)
This commit is contained in:
Kingbox
2018-11-27 18:16:07 +01:00
parent 97663563a4
commit b68489d04d
27 changed files with 9496 additions and 8605 deletions
+21
View File
@@ -576,3 +576,24 @@ def remove_tags(title):
return title_without_tags
else:
return title
def remove_smb_credential(path):
"""
devuelve el path sin contraseña/usuario para paths de SMB
@param path: ruta
@type path: str
@return: cadena sin credenciales
@rtype: str
"""
logger.info()
if not path.startswith("smb://"):
return path
path_without_credentials = scrapertools.find_single_match(path, '^smb:\/\/(?:[^;\n]+;)?(?:[^:@\n]+[:|@])?(?:[^@\n]+@)?(.*?$)')
if path_without_credentials:
return ('smb://' + path_without_credentials)
else:
return path