Private GIT

Skip to content
Snippets Groups Projects
Commit acff5085 authored by Luca's avatar Luca
Browse files

Fix unicode characters as well as other unicode issues

parent 9d647e8d
No related branches found
No related tags found
Loading
......@@ -609,7 +609,8 @@ def chmodAsParent(childPath):
logger.log(u"No parent path provided in "+childPath+", unable to get permissions from it", logger.DEBUG)
return
parentMode = stat.S_IMODE(os.stat(parentPath)[stat.ST_MODE])
parentPathStat = ek.ek(os.stat, parentPath)
parentMode = stat.S_IMODE(parentPathStat[stat.ST_MODE])
childPathStat = ek.ek(os.stat, childPath)
childPath_mode = stat.S_IMODE(childPathStat[stat.ST_MODE])
......@@ -647,7 +648,7 @@ def fixSetGroupID(childPath):
return
parentPath = ek.ek(os.path.dirname, childPath)
parentStat = os.stat(parentPath)
parentStat = ek.ek(os.stat, parentPath)
parentMode = stat.S_IMODE(parentStat[stat.ST_MODE])
if parentMode & stat.S_ISGID:
......
......@@ -16,18 +16,18 @@
# You should have received a copy of the GNU General Public License
# along with Sick Beard. If not, see <http://www.gnu.org/licenses/>.
import sickbeard
import re
import datetime
import sickbeard
from sickbeard.common import countryList
from sickbeard.helpers import sanitizeSceneName
from sickbeard.scene_exceptions import get_scene_exceptions
from sickbeard import logger
from sickbeard import db
import re
import datetime
from name_parser.parser import NameParser, InvalidNameException
from lib.unidecode import unidecode
resultFilters = ["sub(pack|s|bed)", "nlsub(bed|s)?", "swesub(bed)?",
"(dir|sample|nfo)fix", "sample", "(dvd)?extras",
......@@ -206,6 +206,7 @@ def isGoodResult(name, show, log=True):
all_show_names = allPossibleShowNames(show)
showNames = map(sanitizeSceneName, all_show_names) + all_show_names
showNames += map(unidecode, all_show_names)
for curName in set(showNames):
escaped_name = re.sub('\\\\[\\s.-]', '\W+', re.escape(curName))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment