[9 June 2010] C-200/A-200 NMJ UI PREVIEW (under development) | 18. Jan 2010 Popcornhour C-200 Manual

Firmware Updates C-200 [7 May 2010] | A-200 [14 May 2010] | A-100 [24 Mar. 2010] | A-110 [24 Mar. 2010] | B-110 [23 Apr. 2010]

Just got your NMT | WIKI has the answers | Search the forum BETTER | Forum Rules/Policy | Firmware & Official NMT News


1 user browsing this thread: (0 members, and 1 guest).

Thread Closed 
 
Thread Rating:
  • 3 Votes - 3.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Partial MythTV integration success (list recordings/view/delete!)
06-29-2009, 03:31 AM (This post was last modified: 06-29-2009 06:36 AM by goofygrin.)
Post: #1
Partial MythTV integration success (list recordings/view/delete!)
I hope I'm not duplicating effort somewhere... but I had some success getting MythTV and my NMT integrated enough for me to power down my MythFrontend in the family room (where it gets the most use!).

Download this file --> http://mpghead.com/mythtv.zip

The instructions below should work, and I hope I didn't miss any steps since I didn't take any notes while I was getting it working.

Background
I like the flexibility and distributed nature of Myth. I dislike how fragile it is and how hard/expensive it is getting a small, stable, HD/Bluray capable front end is.

I have a MythTV server with quite a few tuners (a mix of hardware and HDHomeRuns). I also have a 5TB (and growing) unRaid server with a ton of different media types (dvd .iso, dvd structures, .avi, .mkv, .m2ts, .mp4 etc.).

I want a single box (and the cheaper the better!) that can play all my files and has good WAF. My wife is fairly easy going on UI suckage, but if stuff doesn't work or is crashing she is NOT pleased. We have used XBMC for a long time and it's UI is very good, but the older hardware of the Xbox simply doesn't cut it with HD sources.

I use Mythweb heavily to schedule and manage recordings. I don't use LiveTV (just about never, only for testing tuners).

MythBackend File Setup
I'm running Mythbuntu, so YMMV on paths, etc.
  1. create a directory in /home/mythtv, nmt.
  2. share this directory out (read only is fine)
  3. create a symbolic link to your recordings directory in the nmt directory (sudo ln -s /var/lib/mythtv/recordings recordings)
  4. Copy the index.htm from the file I provided to the nmt directory
  5. Edit the index.htm and make the following edits:
    • Line 3: replace with your URL to Mythweb
      Quote:http-equiv="refresh" content="0;url=http://192.168.1.53/mythweb/tv/recorded?sortby=title&reverse=no&title="


NMT setup
It shouldn't quite work correctly at this point
  1. Add a new network share to the nmt share created previously


Hacking Mythweb
This is where it gets a bit hairy. If I (or someone else) gets the time, maybe we can finish this out and get it integrated into the trunk of MythTV so that the next release won't break it!
  1. Create a nmt directory in /usr/share/mythtv/mythweb/modules/_shared/tmpl
  2. Copy everything from default to nmt (sudo cp default/* nmt)
  3. Create a nmt directory in /usr/share/mythtv/mythweb/modules/mythweb/tmpl
  4. Copy everything from default to nmt
  5. Edit /usr/share/mythtv/mythweb/modules/mythweb/set_session.php
  6. On line 42, make the following change:
    Quote:foreach (array('default', 'lite', 'nmt') as $tmpl) {
    // Print the option
  7. Create a nmt directory in /usr/share/mythtv/mythweb/modules/tv/tmpl
  8. Copy everything from lite to the nmt directory
  9. Replace the recorded.php in the nmt directory with the one in the package I provided
  10. Edit the replaced recorded.php and change the following lines:
    • Line 74: set your share name on the NMT
      Quote: href='file:///opt/sybhttpd/localhost.drives/NETWORK_SHARE/Myth/recordings/"
    • Line 75: set your MythWeb url (we're actually stripping it out here)
      Quote:.str_replace('myth://192.168.1.53:6543/', '',$show->filename)."' TVID='Play' name='Play' vod=''>";
  11. Edit /usr/share/mythtv/mythweb/includes/skin.php and add the following lines at line 25:
    Quote:// force the nmt template
    elseif( preg_match('/^Syabas/i',$_SERVER['HTTP_USER_AGENT']) )
    $_SESSION['tmpl'] = 'nmt';
    (the whole section looks like this)
    Quote: if (isMobileUser()) {
    // Browser is mobile but does it accept HTML?
    // @TODO Need to fail more gracefully...
    $_SESSION['tmpl'] = 'wap';
    // Make sure the skin is set to the appropriate phone-template type
    $_SESSION['skin'] = $_SESSION['tmpl'];
    define('skin', $_SESSION['skin']);
    }
    // force the nmt template
    elseif( preg_match('/^Syabas/i',$_SERVER['HTTP_USER_AGENT']) )
    $_SESSION['tmpl'] = 'nmt';

    // Force the "lite" template
    elseif ($_REQUEST['RESET_TMPL'] == 'lite' || preg_match('/^(Lynx|ELinks)/i', $_SERVER['HTTP_USER_AGENT']))
    $_SESSION['tmpl'] = 'lite';
    // Reset the template?
    elseif ($_REQUEST['RESET_TMPL'] || $_REQUEST['RESET_TEMPLATE'])
    $_SESSION['tmpl'] = 'default';
    // If the requested template is missing the welcome file, use the default template
    elseif (!file_exists(modules_path.'/_shared/tmpl/'.$_SESSION['tmpl'].'/welcome.php')) {
    $_SESSION['tmpl'] = 'default';
    }


At this point we just need to make sure everything works ok on your computer before getting it working on the NMT.
  1. Open a browser and head over to Mythweb and go the Mythweb session settings: /mythweb/settings/mythweb
  2. Select "NMT" from the Template drop down and select Save
  3. Click "Recorded Programs" and you should see a list of your programs. You might have to click "Back" to see anything (or just go here: /mythweb/tv/recorded?sortby=title&reverse=no&title=)
  4. If everything is working, reset you theme on your computer -- go to /mythweb/tv/recorded?RESET_TMPL=lite (then go to the session settings again and set it to default for the good one).


If everything is working ok on the computer, let's get the NMT up and working
  • go to the source on your NMT. You should be forwarded to the recordings page as ugly as it may be.

Things that need improved upon
  • the UI sucks but works
  • installation is weak Wink
  • auto detecting of the theme would be good DONE
  • completing the theme would also be a good idea (and likely one of the only wants to get it integrated into Myth trunk)

I hope it works for you.

Backup any files you edit in case something is unhappy Smile

Screenshots of the super crappy UI (but super functional!)
[Image: listings.png]
[Image: shows.png]
Find all posts by this user
06-29-2009, 04:09 AM
Post: #2
RE: Partial MythTV integration success (list recordings/view/delete!)
Great work,

I have been thinking of doing a Web interface to my mythtv recording for some time, Just i'm not a web developer :-).

I'm going to have to try this, do you think it would be hard to have the recorded eposides sort most recent first ?

Downloading now.

thanks.
Find all posts by this user
06-29-2009, 04:16 AM
Post: #3
RE: Partial MythTV integration success (list recordings/view/delete!)
(06-29-2009 04:09 AM)frontlinefodder Wrote:  Great work,

I have been thinking of doing a Web interface to my mythtv recording for some time, Just i'm not a web developer :-).

I'm going to have to try this, do you think it would be hard to have the recorded eposides sort most recent first ?

Downloading now.

thanks.

I built it to work more like the "folder" approach that we (my wife) prefers. During the year, with 1TB of storage, we'll rack up quite a bit of stuff and having to scroll through all the stuff for the kid (Thomas, etc.) is annoying. Easier just to find the program you want and go directly to it.

Add that to the "todo" list Wink
Find all posts by this user
06-29-2009, 06:27 AM (This post was last modified: 06-29-2009 06:36 AM by goofygrin.)
Post: #4
RE: Partial MythTV integration success (list recordings/view/delete!)
OK so it's not hanging onto the theme selection... so the auto theme selection will have to come sooner than later Wink
OK... updated the instructions above for the automatic setting of the NMT theme.
Find all posts by this user
06-29-2009, 07:54 AM
Post: #5
RE: Partial MythTV integration success (list recordings/view/delete!)
Moving to Apps as im sure you'll find some help with tweaks improvements.

Looking great though and knowing how popular MythTV is should be well appreciated.

A200 [No fan-metal case]: 3.5" HDD, HDMI, WN150
C200: USB (Apps), 2.5" HDD, BD iHOS104.37, HDMI, CAT6
Network: A100, W7, HP ProCurve 1400-8G, Netgear GS-605, Synology CS407 4Tb, Thompson 780v5, CAT6
Find all posts by this user
07-16-2009, 04:39 AM
Post: #6
RE: Partial MythTV integration success (list recordings/view/delete!)
I haven't purchased a PCH unit yet, but based on this thread I probably will. This looks like it could make an effective front end for my mythtv system! I do have a few questions:

1. My recordings are mostly Hidef digital cable transmissions in the US which implies a bit rate of ~19Mbits/second. Mythtv places this mpeg2 stream into a transport stream container. Can anyone confirm that PCH will properly play back these types of recordings across a wired 100mbps ethernet connection without problems?

2. Does the web interface you've designed provide a synopsis of each episode?

Thanks!

Marc
Find all posts by this user
07-16-2009, 04:41 AM
Post: #7
RE: Partial MythTV integration success (list recordings/view/delete!)
(07-16-2009 04:39 AM)marcaronson408 Wrote:  I haven't purchased a PCH unit yet, but based on this thread I probably will. This looks like it could make an effective front end for my mythtv system! I do have a few questions:

1. My recordings are mostly Hidef digital cable transmissions in the US which implies a bit rate of ~19Mbits/second. Mythtv places this mpeg2 stream into a transport stream container. Can anyone confirm that PCH will properly play back these types of recordings across a wired 100mbps ethernet connection without problems?

2. Does the web interface you've designed provide a synopsis of each episode?

Thanks!

Marc

Almost all my recordings are either OTA HD or QAM HD. They play fine on my gigabit network. The PCH/NMT only has 10/100 networking though.

The interface I wrote doesn't have the synopsis, but it's trivial to add if you look at what the original page does.
Find all posts by this user
07-23-2009, 08:04 AM
Post: #8
RE: Partial MythTV integration success (list recordings/view/delete!)
My NMT arrived -- an eGreat m34A. Everything works well with my mythtv system. With some help from a friend I made some changes to the frontend. The first screen (list of series) now provides some sorting options. When you drill down I've added synopsis info as well as a flag that shows which recordings are hidef. Here's a screen snapshot:
[Image: index.php?binary=internal%3A%2F%2Fdffd99...d3f0e.jpeg]

On the NMT the links don't have any underscores. The green text are links that play back the selected recording. The red text are links that delete the corresponding recording. I've increased the font size since the snapshot was taken -- pretty easy to tweak them up or down if you want to change it.

Here is a link to the revised version of recorded.php posted by the goofygrin.

Marc
Find all posts by this user
07-23-2009, 03:34 PM
Post: #9
RE: Partial MythTV integration success (list recordings/view/delete!)
Great job :0)
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Check & Repair Tool for Transport Streams of DVB/HDTV Recordings (TS-Doctor) Cypheros 423 71,101 07-26-2010 06:49 AM
Last Post: Neoworld
Bug Wget on NMT giving wrong address?? [delete /tmp/dns_cache - bug in wget] lordy 9 1,290 03-14-2010 10:05 PM
Last Post: lordy
  mythtv - LiveTV and Recording using llink-mod mwahal 2 986 11-23-2009 05:39 AM
Last Post: tivo1
  List of User's apps/tools under development or completed Syabas 52 100,081 09-17-2009 03:31 PM
Last Post: lordy
  Cannot delete files from USB attached Drive Drypowder 1 691 09-13-2009 05:53 PM
Last Post: oddball
  Cannot delete folders, and folders keep coming n5k 8 913 09-03-2009 08:09 AM
Last Post: n5k
  Possible to sort folder list by date added? PiNPOiNT 0 332 08-29-2009 06:24 AM
Last Post: PiNPOiNT
  It is safe to delete this files/folders?? Jerome 19 1,571 08-19-2009 03:18 PM
Last Post: Ger Teunis
Thumbsdown HOW TO REMOVE / DELETE WEB SERVICES? nikunj 8 1,384 07-23-2009 12:44 AM
Last Post: nikunj
  Request: complete list of numbers and descriptions for /tmp/irkey Ger Teunis 3 686 07-21-2009 05:59 PM
Last Post: gfb107

Forum Jump: