Verzeichnis und Dateinamen escapen

This commit is contained in:
Stefan Bethke 2010-01-10 17:09:19 +00:00
parent 098490dee6
commit 70ae55fac6

View file

@ -1,6 +1,6 @@
#!/usr/bin/python
# $Schlepperbande: src/tivomirror/tivomirror,v 1.9 2010/01/07 00:06:23 stb Exp $
# $Schlepperbande: src/tivomirror/tivomirror,v 1.10 2010/01/09 17:46:15 stb Exp $
#
# Stefans Script, um die Sendungen vom Tivo runterzuladen und in MPEG4
# zu transkodieren.
@ -164,9 +164,8 @@ for i in items:
if episode == "":
episode = date
name = "%s - %s" % (title, episode)
name = re.sub("[:/]", "-", name)
dir = "%s/tivo/%s" % (curdir, title)
file = "%s/%s" % (dir, name)
dir = "%s/tivo/%s" % (curdir, re.sub("[:/]", "-", title))
file = "%s/%s" % (dir, "[:/]", "-", name))
name = name.encode("utf-8");
dir = dir.encode("utf-8");
file = file.encode("utf-8");