[mythtv-users] Sending Myth Socket commands using Perl - lack of response
Michael T. Dean
mtdean at thirdcontact.com
Tue Oct 28 22:09:22 UTC 2008
On 10/28/2008 05:50 PM, Seth Daniel wrote:
> On Tue, Oct 28, 2008 at 05:43:49PM -0400, Michael T. Dean wrote:
> [...snip...]
>
>>> I haven't looked at the Perl code, but what exactly needs to
>>> be done?
>>>
>> To get the Perl bindings, you just need to install them and their
>> prerequisite Perl modules. The Perl bindings are in the mythtv source
>> distribution under bindings/Perl. TTBOMK, they're installed by default,
>> but you can always specify --with-bindings=perl to configure to make
>> sure. If you're using packages, they may be in a different package
>> (check with others using your distro).
>>
>> If you mean what has to be done to connect to Myth with Perl, read the
>> code in the bindings because it does it (and you'll likely see that it
>> does all the low-level stuff you're trying to do).
>>
> Actually I'm not asking about either thing you mention. :-)
>
> I have the mythtv source. I've been building it pretty much since I
> started using MythTV (in fact I *have* to build it so that I can apply
> patches that are required for my setup).
>
> When I asked, "what exactly needs to be done" I was wondering what
> changes you think need to be made to the Perl code. Do you have any
> ideas as to what improvements can be made? What does the code currently
> do that is bad? What functionality is missing? etc...
Oh, that. The Perl bindings are good. Many of the contributed Perl
scripts (in contrib directory) are evil because they do not use the
bindings. The two I'm most concerned about are myth.find_orphans.pl and
myth.rebuild_database.pl because they happen to be used a lot but aren't
well maintained and are both pretty much just hacks (and probably should
exist as the same database maintenance script). And, there's
http://svn.mythtv.org/trac/ticket/4599 , which includes a new script
that won't be added to contrib until it's ported to use the bindings.
It may actually be a good start toward combining myth.find_orphans.pl
and myth.rebuild_database.pl .
It would also be useful to update myth_archive_job.pl to use the
bindings (and storage groups). It allows people to automatically move
recordings--i.e. to network drives when there's space on those network
drives (which is a much better idea than changing Myth so it by default
has no preference for local storage, which some users are requesting).
There are a few scripts that actually use the bindings, including
optimize_mythdb.pl, myth_rename.pl, myth_upcoming_recordings.pl, and
myth_recent_recordings.pl (and possibly others). They would be pretty
good examples of how to use the bindings.
If you feel like working on some of those "legacy" contrib scripts, your
help would be very much appreciated. Figuring out what should be done
should be relatively straightforward once you realize that we don't
necessarily need a "direct translation" of each script--i.e. redesigning
the functionality and reducing the number of scripts is actually
preferred. Feel free to ask questions here or on IRC (if you mention me
(sphery) on #mythtv-users on IRC, I'll likely find your comment/question).
If you feel like working on the bindings themselves (they're good, but
they could be even better), you should probably talk to Chris Petersen
(he hangs out on IRC, too, so he's relatively easy to track down) since
he has plans for their future development. He or Rob Smith (also on
IRC) may also be a good source of info on the Perl scripts, too. (I'm
not mentioning Chris's or Rob's nick here in case they prefer their
e-mails and nicks to be separate, but most anyone on IRC could help you
find them.)
HTH (and I hope I got the right question answered this time),
Mike
More information about the mythtv-users
mailing list