diff options
Diffstat (limited to 'pyload/datatypes/PyFile.py')
-rw-r--r-- | pyload/datatypes/PyFile.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pyload/datatypes/PyFile.py b/pyload/datatypes/PyFile.py index 7bb3a4e31..f15ad7ee0 100644 --- a/pyload/datatypes/PyFile.py +++ b/pyload/datatypes/PyFile.py @@ -21,6 +21,7 @@ from ReadWriteLock import ReadWriteLock from pyload.Api import ProgressInfo, DownloadProgress, FileInfo, DownloadInfo, DownloadStatus from pyload.utils import lock, read_lock +from pyload.utils.filetypes import guess_type statusMap = { "none": 0, @@ -123,7 +124,11 @@ class PyFile(object): if type(name) == str: name = name.decode("utf8") - self._name = name + # media type is updated if needed + if self._name != name: + self.media = guess_type(name) + self._name = name + name = property(getName, setName) |