a recent PR of mine (https://github.com/sabnzbd/sabnzbd/pull/2461) had occasional test failures. The function tested uses guessit to detect cd and part in filenames, and for this test was supplied with filenames (also) containing a random hexadecimal string.
It turned out guessit was very eager to match the cd property even in the middle of such strings. The part property on the other hand behaves as expected, i.e. it is only matched if surrounded by some form of spacing or delimiter:
hi,
a recent PR of mine (https://github.com/sabnzbd/sabnzbd/pull/2461) had occasional test failures. The function tested uses guessit to detect
cd
andpart
in filenames, and for this test was supplied with filenames (also) containing a random hexadecimal string.It turned out guessit was very eager to match the
cd
property even in the middle of such strings. Thepart
property on the other hand behaves as expected, i.e. it is only matched if surrounded by some form of spacing or delimiter: