[mythtv-commits] Ticket #8374: update mythvideo's scan.php to support hash tags
MythTV
mythtv at cvs.mythtv.org
Fri Apr 23 14:37:00 UTC 2010
#8374: update mythvideo's scan.php to support hash tags
-----------------------------------------------+----------------------------
Reporter: Dave Miller <mythtv@…> | Owner: kormoc
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: Plugin - MythWeb | Version: Trunk Head
Severity: medium | Mlocked: 0
-----------------------------------------------+----------------------------
Changes (by robertm):
* status: infoneeded_new => new
Comment:
Replying to [comment:3 Dave Miller <mythtv@…>]:
> Replying to [comment:2 robertm]:
> > You can perform hashes using the Myth protocol, this is the preferred
way to do it (and should only take a couple lines of code instead of
large-ish changes like this).
>
> Asking the backend to do it for us indeed sounds like a much better way.
"largish" changes like this patch would still be needed (it's not as large
as it looks, the code's being reordered, not massively changed) it just
won't need the extra python file.
>
> Browsing through the Myth protocol, it doesn't look like it'll do the
actual database update for us yet, but it *will* let us do the file
search, which can also replace the call out to the unix 'find' command,
thus eliminating both shell execs. Not only that but it'll relay to
secondary backends if they're accessible, removing the need to limit
ourselves to storage groups that reside on the backend we're running on.
The only downside is our find command on the local filesystem gives us the
entire tree in one shot, where the directory listing generated by the Myth
protocol only gives us the current directory, so we'll have to recurse it
ourselves and repeat calls to the backend server to get each of the
subdirectories and so forth. I like the idea of being able to scan all of
the backends and not just the one we're running on. (Heck, maybe mythweb
doesn't even need to be running on the backend anymore, and will still
work that way!)
You're right. I only gave it a casual look before I responded, I see that
your basic logic is necessary regardless. Xris and Kormoc, when you get
to this one, the logic above is basically correct and analogous to what we
do in MythVideo. Dave, you are correct that at this point there should be
no reason to use any local file finding in MythWeb as it supports Storage
Groups only now. You can get a queried file list with the protocol on all
backends. This is how MythVideo does its scanning. Between hashing,
properly querying all backends (get the contents of the "Video" SGs, get a
file list on the relevant backend hosts of each dir), and parsing
filenames properly (see the regexp using in MythVideo to determine
season/episode/title/subtitle), MythWeb would be scanning things well
enough that at least a metadata lookup will work properly (It does not in
the case of television right now).
http://www.mythtv.org/wiki/QUERY_SG_GETFILELIST_%28Myth_Protocol%29
Obviously you are under no obligation to add these things, just getting
them out there as prerequisites for baseline functionality of the MW
scanner.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/8374#comment:4>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list