# Path: core/config.py
# PLATFORM_NAME = "kodi-isengard"
# PLUGIN_NAME = "streamondemand-pureita-master"
# def get_platform():
# def is_xbmc():
# def get_library_support():
# def get_system_platform():
# def open_settings():
# def get_setting(name):
# def set_setting(name,value):
# def get_localized_string(code):
# def get_library_path():
# def get_temp_file(filename):
# def get_runtime_path():
# def get_data_path():
# def get_cookie_data():
# def verify_directories_created():
# 
# Path: core/logger.py
# def log_enable(active):
# def encode_log(message=""):
# def get_caller(message=None):
# def info(texto=""):
# def debug(texto=""):
# def error(texto=""):


import os
import urllib
import re
import sys
import xbmc
import shutil
import time
import string
import xbmcgui
import xbmcplugin
        import glob
    import shutil,time
from unicodedata import normalize
from core import config
from core import logger
      else:
        break
  
  if (tvshow == 1):
    for regex in regex_expressions:       
      response_sub = re.findall(regex, sub)
      if len(response_sub) > 0 :
        try :
          sub_info = "Regex Subtitle Ep: %s," % (str(response_sub[0][1]),)
          if (int(response_sub[0][1]) == int(response_file[0][1])):
            return True
        except: pass      
    return False
  if compare :
    return True
  else:
    return "","",""

    # Obtiene el nombre de la pelicula o capitulo de la serie guardado previamente en configuraciones del plugin 
    # y luego lo busca en el directorio de subtitulos, si los encuentra los activa.
def set_Subtitle():
    logger.info("[subtitletools] set_Subtitle")
    
    exts = [".srt", ".sub", ".txt", ".smi", ".ssa", ".ass" ]
    subtitle_folder_path = os.path.join (config.get_data_path(),"subtitles")
    
    subtitle_type = config.get_setting("subtitle_type")
    
    if subtitle_type == "2":
        subtitle_path = config.get_setting("subtitlepath_file")

# Path: core/config.py
# PLATFORM_NAME = "kodi-isengard"
# PLUGIN_NAME = "streamondemand-pureita-master"
# def get_platform():
# def is_xbmc():
# def get_library_support():
# def get_system_platform():
# def open_settings():
# def get_setting(name):
# def set_setting(name,value):
# def get_localized_string(code):
# def get_library_path():
# def get_temp_file(filename):
# def get_runtime_path():
# def get_data_path():
# def get_cookie_data():
# def verify_directories_created():
# 
# Path: core/logger.py
# def log_enable(active):
# def encode_log(message=""):
# def get_caller(message=None):
# def info(texto=""):
# def debug(texto=""):
# def error(texto=""):


# Path: platformcode/subtitletools.py
import os
import urllib
import re
import sys
import xbmc
import shutil
import time
import string
import xbmcgui
import xbmcplugin
        import glob
    import shutil,time
from unicodedata import normalize
from core import config
from core import logger

      else:
        break
  
  if (tvshow == 1):
    for regex in regex_expressions:       
      response_sub = re.findall(regex, sub)
      if len(response_sub) > 0 :
        try :
          sub_info = "Regex Subtitle Ep: %s," % (str(response_sub[0][1]),)
          if (int(response_sub[0][1]) == int(response_file[0][1])):
            return True
        except: pass      
    return False
  if compare :
    return True
  else:
    return "","",""

    # Obtiene el nombre de la pelicula o capitulo de la serie guardado previamente en configuraciones del plugin 
    # y luego lo busca en el directorio de subtitulos, si los encuentra los activa.
def set_Subtitle():
    logger.info("[subtitletools] set_Subtitle")
    
    exts = [".srt", ".sub", ".txt", ".smi", ".ssa", ".ass" ]
    subtitle_folder_path = os.path.join (config.get_data_path(),"subtitles")
    
    subtitle_type = config.get_setting("subtitle_type")
    
    if subtitle_type == "2":
        subtitle_path = config.get_setting("subtitlepath_file")

        logger.info("Con subtitulo : "+subtitle_path)