[mythtv-users] Remote Control for MythMusic

dargllun dargllun at googlemail.com
Mon Nov 22 14:22:33 UTC 2010


On 21.11.2010 20:47, Richard Morton wrote:
> Erm... the short answer unless the telnet interface has been dramatically
> enhanced in .24 Jand i dont think it has) even if you had access to the
> library (which is possible with a db connection) you couldnt initiate
> playback of the selected songs.

Well, my hand-rolled perl interface did the following:

         my $update = "UPDATE music_playlists SET " .
                 "playlist_songs='$songlist_str', " .
                 "songcount='$songcount' " .
                 "WHERE playlist_id='1'";
         command('jump mainmenu');
         select(undef, undef, undef, 0.10);
         $dbh->do("LOCK TABLES music_playlists WRITE");
         my $req = $dbh->prepare($update);
         $req->execute();
         $req->finish();
         $dbh->do("UNLOCK TABLES");
         select(undef, undef, undef, 0.10);
         command('jump playmusic');

with:
    command() => the well-known telnet channel and
    $songcount => the number of songs in the new playlist
    $songlist_str => the comma separated list of songs as required by the
       music_playlists table

Basically I wrote similary clumsy CGI code around this core 
functionality to get a simple browser for my music so I could select the 
prepared playlists, the smart playlists, all songs of an album or interpret.

With 0.24, the above hack to reload the default playlist does not work 
anymore, and so far I could not get reaction of any of the mythmusic 
devs on this. I had a peek into the mythmusic module, and there seems to 
be a proper function, but I don't know how to trigger it from outside.

> This is something i have mentioned in the past, as i looked into it for
> building a nice sonos type web remote. Unfortunately i dont think it got any
> interest from the devs, which is fair enough if it isnt of interest to them.
> I, or someone, need to roll up our sleeves i guess and enhance the telnet
> interface.

I'm willing to step in, both coding and testing. In the past I wasn't 
aware of the existing scripting bindings in mythtv; especially the 
Python binding looks quite interesting. If there was support for setting 
the playlist, we'd be almost there.

>
> Please excuse brevity and pistakes, this email was sent from my Android
> smart phone.
>
> Thanks and best regards,
>
> Richard Morton
>
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list