Commit Graph

22 Commits

Author SHA1 Message Date
Michiel van Baak 9d73ccacf3 Use sha1 digest as cache key
Subliminal uses dogpile.cache to save state of subtitle availability.
Some methods that dogpile.cache caches can have big argument lists,
resulting in a default cache key that is longer than 255 characters.
The dogpile.cache backend used, saves cache items to the filesystem,
using the cache key as filename. This can result in errors about
Filename too long.
SHA1 generates a 160bit hash of the key, and we use the hexadecimal
digest of that hash, resulting in key names of 80 characters.
2021-03-14 16:56:50 +01:00
Michiel van Baak f10bac1fad Revert "Make subliminal always mangle cache keys to prevent long filenames"
This reverts commit 87fbd196a4.
2021-03-14 11:34:12 +01:00
Michiel van Baak 87fbd196a4
Make subliminal always mangle cache keys to prevent long filenames
* 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
2021-03-13 18:04:18 -05:00
Louis Vézina 376e13d7f1 Upgraded GuessIt to 3.0.1 2020-05-20 11:29:39 -04:00
ngosang 55bb3791da tvsubtitles provider: hide error message when not found
Test: The Boys
2020-05-16 15:44:43 +02:00
Louis Vézina bcc4183ef3 WIP 2019-09-22 22:27:23 -04:00
Louis Vézina 3ca2c98cd4 WIP 2019-09-16 22:04:27 -04:00
Louis Vézina c5fa0f56e4 WIP 2019-09-13 15:14:31 -04:00
Louis Vézina 645952c61a WIP 2019-09-13 15:12:26 -04:00
panni 927b7b6406 core: update to subliminal_patch:head; fix subscene; solve cf almost instantly; fix chinese subs; fix titlovi; 2019-05-12 06:23:46 +02:00
Guy Khmelnitsky bddfc5f0af
Update Subscenter to use new Subscenter.biz domain 2019-05-08 15:34:51 +03:00
panni 8f584143f8 update deps 2018-10-31 17:08:29 +01:00
panni 4beaeaa99e Merge remote-tracking branch 'origin/development' into subliminal_patch
# Conflicts:
#	libs/subliminal/subtitle.py
2018-10-31 17:02:33 +01:00
Louis Vézina 37142e247e Fix for multiple format in filename. 2018-10-23 21:31:40 -04:00
Louis Vézina d61bdfcd4f Initial commit. 2018-10-20 22:53:12 -04:00
Louis Vézina 3c1532148a Second part of previous fix. 2018-10-17 06:24:13 -04:00
Louis Vézina 4dfc250287 Fix for Subliminal exception: 'list' object has no attribute 'lower'. This is panni's fix. 2018-10-17 00:21:24 -04:00
Louis Vézina bb85224826 Fix for guessit returning a list for format 2018-10-10 22:33:08 -04:00
morpheus65535 26118abb2a Real fix for #158 2018-09-30 20:23:12 -04:00
morpheus65535 98cf99d1d0 Fix for #158 2018-09-28 21:32:39 -04:00
morpheus65535 b0854cb33d Upgrade Subliminal to 2.1.0dev #60 2018-04-23 08:36:17 -04:00
morpheus65535 36e6557a1c Including a modified version of subliminal 2.0.5 in libs 2018-03-23 19:59:59 -04:00