View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Dec 06, 2009 4:12 pm 
Offline
Joined: Wed Jul 25, 2007 7:56 pm
Posts: 103
Location: Arlington, VA, USA
Recently the girlfriend asked me to look into fixing up MythTV to iPod conversion. As far as I can tell, the myth2ipod stuff no longer works out of the box? I looked into fixing it, but it seemed more trouble than it was worth, so instead I've started using a script called mp4ize, which I found here.

I made a few modifications to it, wrote a helper script that allows it to be called as a user job, and it's working well. The best part is that it can be called right from MythWeb, which makes it extremely user (girlfriend) friendly. It spits out iPod-ready video files into a special directory, with names taken from the mythconverg database. However, this solution only works for recordings. Ideally I would like something just as easy to use for my MythVideo files.

I started playing around with MythWeb's video module, and got as far as adding a button beside the standard "Edit" and "IMDB" buttons. But my PHP skills are pretty much non-existent, and I can't seem to figure out how to change the source page of the little frame that those buttons call.

I realize this is more of a MythWeb/PHP question, but there doesn't seem to be a whole lot of documentation on MythWeb. If anyone has any tips or experience in hacking MythWeb, I'd appreciate suggestions.

For reference, I've edited the following file and duplicated an existing function for my purposes:

Code:
/data/srv/httpd/htdocs/mythweb/modules/video/tmpl/default/video.php

    function newWindow(id) {
        $('window_title').innerHTML   = '<?php echo t('Editing '); ?> ' + $(id+'-title').childNodes[0].innerHTML;
        $('window_content').innerHTML = '<iframe src="<?php echo root; ?>video/edit?intid='+id+'">';
        $('window').show();
        Tips.hideAll();
    }

    function iPod_convert(id) {
        $('window_title').innerHTML   = 'Encode ' + $(id+'-title').childNodes[0].innerHTML + ' for iPod';
        $('window_content').innerHTML = '<iframe src="<?php echo root; ?>video/ipod?intid='+id+'">';
        $('window').show();
        Tips.hideAll();
    } 


As you can see, the only substantive change (beside function name) is the iframe src; instead of pointing to the video/edit file, it points to the video/ipod file.

That file is located at /data/srv/httpd/htdocs/mythweb/modules/video/ipod.php, the same directory where the edit.php file is. I know it's the correct edit.php, because if I make a change, I see the change in MythWeb. But for whatever reason, the new frame that pops up when the function is called just displays the default MythWeb video gallery view. My new ipod.php page is never seen.

The eventual plan is to grab the filename of the video from the database, then pass that to mp4ize, perhaps also queuing it up as a user job. Now that I think about it, I suppose I could just forgo opening up the new frame and do the work directly on the video.php page, but I can't for the life of me figure out why the above changes aren't working.

_________________
MBE/FE: R6, P4 2.8 GHz/2 GB/2 TB, GeForce 6200 512 MB, PVR-150, Cisco RNG-100 cable box
FE: R6, P4 2.0 GHz/1 GB, GeForce4 MX 420 64 MB, diskless netboot


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu