Skip to content

Add grabber script tests and get some working#458

Draft
charlesroddie wants to merge 11 commits intoMediaPortal:masterfrom
charlesroddie:IIMDBScriptGrabberTests
Draft

Add grabber script tests and get some working#458
charlesroddie wants to merge 11 commits intoMediaPortal:masterfrom
charlesroddie:IIMDBScriptGrabberTests

Conversation

@charlesroddie
Copy link
Copy Markdown

@charlesroddie charlesroddie commented Mar 23, 2026

DONE:

  • Work to get test projects to build and run
    • Fixed nuget config to allow a nuget restore to run.
    • Got the test projects to run, removing an nunit dll that was copied into the repo and referencing an updated version of nunit instead. Many existing ones fail and the maintainers need to figure out what to do with that.
  • Addition of failing test for script functions
  • Added tests for script functions. All of them fail to return results correctly (for any specification of language, tt presence/abscence/format), many not finding any search terms. TI_MDB gets very close and returns a lot of good data, while the others fail completely.

TODO: script fixes.

I will fix the TI_MDB one and get it to accept the [tt...] format like other scripts. I will see if others can be improved, but I expect that most will remain non-functional. I suggest they are archived but it's up to maintainers.

STATUS:

Fixed tests:

  • FindFilm_ReturnsResults("TI_MDB","The Shawshank Redemption (1994) [tt0111161]","The Shawshank Redemption (1994)") . Regex fix allowing imdbid in square brackets.
  • GetDetails_ReturnsCorrectData("TI_MDB","The Shawshank Redemption (1994) tt0111161"). Fix to the Director lookup.

Failing tests:
image

if (!string.IsNullOrEmpty(apers.Name))
{
if (apers.As.Contains("Direct") && string.IsNullOrEmpty(sDirector))
if (apers.As == "Director" && string.IsNullOrEmpty(sDirector))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about Directors?

aPerson.Id = crew.id.ToString();
aPerson.Name = crew.name;
aPerson.As = crew.department; // crew.job;
aPerson.As = crew.job;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I recall, the data in the “department” field is more accurate than that in the “job” field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants