XMLFetcher doesn't like Looney Tunes

XMLFetcher is a great tool, has been working well for me for some time. But today I encountered my first problem with it - it won’t download information for the Looney Tunes series, complaining that the season number is greater than 99, seemingly for every episode.

TheTVDB series ID = 72514

  • Paul

Whoever put them into the TV database used the YEAR for the season number.

So the first season is 1930.

The tool isn’t equipped to deal with these one-offs…

…and to add insult to injury, the series are locked so it’s not going to change. I don’t know why it’s that way, or why they would lock it. But I do know I have 85 episodes with no metadata…

I understand you have to draw the line somewhere (I’m a software developer too), but I don’t think you’d be eternally **bleep** for loosening the validation to accept years as season numbers, at least for the 20th and 21st century…

I admit it, XMLFetcher has spoiled me, I don’t relish the idea of doing it manually… :slight_smile:

  • Paul

Heheh…  It’s not a validation thing…  It’s lazy programming.

It’s really simple on the back-end; I use the season number as a reference into a two-dimensional array.

The array is allocated as 99 seasons by 999 episodes.

Since VB alloctes memory at startup, If I had to dimension the array as 3000 (or whatever) by 999 episodes, the memory requirement would explode.

How about keeping the allocation the way it is, and handling it as a sliding range of 100 instead?

here’s some ratty pseudocode:

rangeIsSet = false;
seasonOffset = 0;
while (parsing seasons)
    if (rangeIsSet == false)
        seasonOffset = thisSeason;
        rangeIsSet = true;
    seasonIndex = thisSeason - seasonOffset;

    if (seasonIndex < 0 OR seasonIndex > 99)
        complain bitterly;
    process season-related stuff;

this trick only works if the seasons are presented in ascending order - i.e. the lowest one occurs first. If that’s not true, you’d have to do a preflight pass to find the lowest season first, before you could set seasonOffset correctly.

I could argue that you really ought to manage it as a list or mapping instead, but you know that already :wink:

  • Paul