upgrading myth, part two

I’ve almost finished the upgrade process for MythTV.  Last night I ported all my patches towards 0.21 and so far everything is working great.  This time I took it a step further and modified the code so it would look for all cover art in a central directory, instead of locally (filename.jpg for individual files, folder.jpg for directories).  Kind of cool, I think, that I’m starting to make the changes directly in MythVideo for my personal preferences instead of working around Myth’s functionality by creating symlinks and stuff on the filesystem.

Usually I would avoid going into the code, but I’m slowly getting more comfortable doing it.  I think the Qt3 docs could stand being a tad bit more verbose, though.  In a lot of cases where I was confused, it was a matter of not understanding exactly what the function was returning, and I’d have to execute it myself to figure it out.

Aside from that, all the “original” stuff is in, but I found two more bugs that I want to hunt down.  I thought I had this first one licked, but I guess not — if you have a file on the filesystem that is not stored in the database, then it will display the filename sans extension as the title at the top of the page (fex: Mr._Belvedere).   I’ve already fixed it so that it will show the “correct” title (replace _ with spaces) when displaying the grid of all files, but I can’t seem to find the variable where it’s showing the other title and it’s a little hard going through the code trying to figure out what everything is doing.  I haven’t figured *that* much out.  In fact, I know my way around just a few functions in videogallery.cpp and that’s about it.  Once it gets outside of that, I’m back in Wonderland.  I’m lost.

Add on top of that there’s not much documentation, if any, in the code and it makes it a bit of slow going.  Ah well, it’s only a matter of time most likely.

The second bug is really annoying, and it’s interesting in that it’s one of those phantom ones that was always like … “wait a minute, did something just change?”  There was a nagging feeling that something had changed, but I could never pin my finger on it.  I finally found it.  What happens is, when MythVideo has scanned the files and put the metadata into the database, it will do some kind of intelligent sorting based on the titles for display.  That is, titles prefixed with “A”, “And”, “The”, etc. will have the prefix dropped (can’t remember the correct grammatical term for those) and then sorted by the following words in the title.  I only caught it because I had added an MP3 file for the LP of “A View To A Kill” (and yes, there are children’s records that tell the story of the 007 films — how cool is that?) and I was testing some stuff in that folder and actually saw it’s position change before and after it was put into the metadata database.

That one, I have absolutely no idea where it’s getting sorted at all.  I don’t have a clue, and it could be anywhere, since all the MythVideo displays implement that, not just the Gallery view.  I just need to send a note off to the mythtv user’s mailing list and hopefully someone will know.  That would be nice to get rid of, though.  I don’t like the inconsistency.

In fact, I never use the metadata database at all.  Pretty much all I see is the cover image, which I supply manually, and the title.  And I rename all my videos so that the title is part of the filename, including the episode order for the ones that are a part of a series.  I already ripped out the stuff to display the metadata before playback, since I’m not interested in that.  So, I know that it’s somehow related to the metadata database, since the titles *and* the orders are affected once they are in there.  Just gotta figure out where.

Other than that, everything has gone really smooth, and it’s been nice.  One thing I did notice as well was that 0.21 just seems generally snappier and much more responsive.  It could be my imagination, but I don’t think so … there just seems to be less latency and wait when navigating and moving around places.  It’s pretty nice.

Leave a Reply