* Use dogpile.cache sha1_mangle_key to mangle cache keys
When using the subtitle hashes as cache keys, sometimes they come
out as filenames of 270 characters.
Not a lot of filesystems out there support filenames with over 250
characters.
This behaviour was reported with ext4 and zfs on both linux and FreeBSD.
The dogpile.cache utils come with a function that returns a hex digest
of the key, limiting the filename to a fixed length of 40 characters.
* Set region to subliminal.region and only then configure it, instead of assigning the result of configure to the property
* Make sure subliminal ALWAYS mangles keys with the sha1 to prevent filenames that are too long
When using the subtitle hashes as cache keys, sometimes they come
out as filenames of 270 characters.
Not a lot of filesystems out there support filenames with over 250
characters.
This behaviour was reported with ext4 and zfs on both linux and FreeBSD.
The dogpile.cache utils come with a function that returns a hex digest
of the key, limiting the filename to a fixed length of 40 characters.
When getting information from subtitles, normally, Portuguese and Brazilian Portuguese are often considered as the same language (por, in this case), the only difference we have is when the name of them has some additional information.
For Brazilian Portuguese, this additional information is most of the time (Brazilian or Brasil).
So add the check when the language is por and try to differ Brazilian Portuguese from Portuguese.