Can I modify how the Movie Database Scraper add on resolves movie names
#3
(2020-02-24, 00:51)scudlee Wrote: Note also, cleandatetime and cleanstrings can't be altered to help you in this case because they discard everything to the right of a match.  They assume the file is basically along the form of "Title (extra crap) (year) (extra crap).ext" and try to grab the year and remove all the extra crap so only the title makes it to the scraper.  In your case the bit to discard is on the left, so editing the scraper is potentially the best option, but does have issues.
Hello,

Thanks a lot for the detailed response.. saved me much time. If I understand you correctly surely "cleandatetime" will very often match what it thinks is a year in my filenames and then discard the movie name. These are more example filenames i have in my collection...

html:

20180305 2059 - Film4 - Carol.ts
20171024 1519 - Film4 - Patton.ts
20190410 2059 - Film4 - Gladiator.ts
20180511 2314 - Film4 - Northern Soul.ts
20150526 2059 - BBC Four - We Need to Talk About Kevin.ts

Looking at the cleandatetime RegExp:
xml:
<video> <cleandatetime>(.*[^ _\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9][0-9]|20[0-9][0-9])([ _\,\.\(\)\[\]\-]|[^0-9]$)?</cleandatetime> </video>

Any movie that has a time in its filename between 7 pm and 9 pm will have the movie name truncated... as in the first, third and fifth movies above.

This might be a show stopper for me unless there is a work-around? You say "editing the scraper is potentially the best option" but aside from adding my regex into <CreateSearchUrl> would you have any other suggestion for me (apart from renaming the files!)

Maybe if I cloned the MovieDB Add-on and modified it so that cleandatetime doesn't run and then have that as a second scraper that runs after the original MovieDB scraper to capture movies with non-standard filenames. Can you over-ride the behaviour of cleandatetime by putting a different regexp for it in advancedsettings.xml ? Maybe this file doesn't just work on individual scrapers but all that are installed? Where does cleandatetime get called from? Is there code running behind the scenes in python or something? Would be a pity if cleandatetime and cleanstrings could not be user over-ridden.

Thank you,

Flex
Reply


Messages In This Thread
RE: Can I modify how the Movie Database Scraper add on resolves movie names - by flexmcmurphy - 2020-02-24, 03:53
Logout Mark Read Team Forum Stats Members Help
Can I modify how the Movie Database Scraper add on resolves movie names0