TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Main TiVo Forums > TiVo Home Media Features & TiVoToGo
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 01-05-2012, 09:47 AM   #31
windracer
joined the 10k club
 
windracer's Avatar
 
Join Date: Jan 2003
Location: St. Pete, FL
Posts: 11,243
I wonder if clam729 ever finished those other cool mods he was working on back in 2008?
__________________
840~Roamio Pro (TA, MoCA) + two A92~Minis, 758~Premiere XL4 (TA, MoCA)
S/old: 746~S4, 658~HDXL, 648~OLED S3, 565~TX20, 230~S2, 140~S2

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
windracer is offline   Reply With Quote
Old 04-11-2012, 09:47 PM   #32
HomeUser
Registered User
 
HomeUser's Avatar
 
Join Date: Jan 2003
Location: A2 Michigan
Posts: 2,315
Quote:
Originally Posted by windracer View Post
Note to others who may upgrade to HomeUser's new version: if you use the check_tivo plugin for Nagios to monitor free space, you'll need to update the plugin code to look for GB instead of MB in the regular expression and also account for the decimal place in the free space number. To do this, I changed the following line:
If you have Nagios sending e-mail alerts I found that "In Progress Recordings" cause the free space warning to send out false alerts. The "In Progress Recording" suggestions are not counted as suggestions and are being calculated as part of the used space then freeing up space when they become suggestions after recording has completed.

This free space flapping is especially annoying if you have the Elite with 4 tuners recording suggestions.

I don't see any indicator that shows a in progress recording is a suggestion so I came up with this hack.

Code:
foreach($tivos as $tivo) {
	unset($tivoarray, $totalsize, $totallength, $customicon, $sc, $totalitems, $freespace, $rssheader, $rsscontent, $rssfooter, $header, $content, $footer, $fp1, $fp2, $totalsuggestions, $percent_free, $fpt, $auto_size_gb , $recording_suggestion);

	// both requested and suggestions show now_recording when in progress. Any in progress
	// recordings before the first non suggestion should be counted as used space.
	$recording_suggestion = false;
At the start of the TiVo loop I added a new boolean $recording_suggestion and set it to false I also included it in the unset list JIC.

Code:
		// # compute suggestions added 10/28/2011 
		if($customicon[3] == "suggestion-recording") {
			$totalsuggestions += $tivoarray[$i]['sourcesize'];
		}

		// Fix Nagios free space flapping 04/11/12 VW>
		// Requested in progress recordings are listed first
		if($customicon[3] != "in-progress-recording"){
			//All in progress recordings should now be suggestions
			$recording_suggestion = true;
		}
		if($recording_suggestion == true){
			if($customicon[3] == "in-progress-recording"){
				$totalsuggestions += $tivoarray[$i]['sourcesize'];
			}
 		}
Added new code that checks for any non in progress recording I added it just after the space used by suggestions is computed $customicon[3] == "suggestion-recording". The new code sets the new Boolean true.
Next add any additional "In Progress Recordings" to the space used by suggestions.
__________________
VicW, Ex-Comcast customer ... And loving it!.
HomeUser is offline   Reply With Quote
Old 04-12-2012, 08:13 AM   #33
bshrock
Registered User
 
Join Date: Jan 2012
Posts: 263
Thanks works great.
Maybe a little more efficient coding?

Code:
	// Fix Nagios free space flapping 04/11/12 VW>
	// Requested in progress recordings are listed first

	if($recording_suggestion == true){
		if($customicon[3] == "in-progress-recording"){
			$totalsuggestions += $tivoarray[$i]['sourcesize'];
		}
	} else {
		if($customicon[3] != "in-progress-recording"){
			//All in progress recordings should now be suggestions
			$recording_suggestion = true;
		}
 	}

bshrock is offline   Reply With Quote
Old 04-18-2012, 03:58 PM   #34
bshrock
Registered User
 
Join Date: Jan 2012
Posts: 263
Is there an easy way to get the data sorted into folders?
bshrock is offline   Reply With Quote
Old 10-22-2012, 06:09 PM   #35
windracer
joined the 10k club
 
windracer's Avatar
 
Join Date: Jan 2003
Location: St. Pete, FL
Posts: 11,243
So ... I upgraded my Linux server to Ubuntu 12.10 (Quantal Quetzal) on Friday night and today noticed that this script wasn't working anymore. I have it set via cron to run hourly and the last time it ran successfully was Friday before the upgrade.

I'm thinking it has something to do with PHP 5.4, as I see other folks on the Ubuntu forums mentioning PHP problems. I'm not certain I want to rollback to 5.3 yet since other stuff (like WordPress) is working fine.

If I manually run 'php index.php' it just does nothing. No errors, no output, even with error_reporting set to -1.

Anyone have any ideas?

edit: ahh, fixed it! I found a tivo_errors.txt file that contained this:

Code:
[22-Oct-2012 20:57:01 UTC] PHP Notice:  Undefined index: OS in /usr/local/tivo/now_playing/tivo_settings.php on line 8
[22-Oct-2012 20:57:01 UTC] PHP Fatal error:  Call-time pass-by-reference has been removed in /usr/local/tivo/now_playing/class_tivo_xml.php on line 111
I commented out the check for $_ENV["OS"] in tivo_settings.php to get past the first error (I'm on Linux so I don't need to check for Windows to set the delimiter), but the second one was a little different. After a little Google searching, I determined that line 111 in class_tivo_xml.php needed to be changed from this:

Code:
 xml_set_object($this->parser, &$this);
to this:

Code:
 xml_set_object($this->parser, $this);
Basically, remove the ampersand (&) before $this.

That fixed it, the script is working again!
__________________
840~Roamio Pro (TA, MoCA) + two A92~Minis, 758~Premiere XL4 (TA, MoCA)
S/old: 746~S4, 658~HDXL, 648~OLED S3, 565~TX20, 230~S2, 140~S2

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by windracer : 10-22-2012 at 08:18 PM.
windracer is offline   Reply With Quote
Old 10-25-2012, 10:58 AM   #36
gonzotek
tivo_xml developer
 
gonzotek's Avatar
 
Join Date: Sep 2004
Location: Outside Phildadelphia
Posts: 2,222
Red face

Quote:
Originally Posted by windracer View Post
So ... I upgraded my Linux server to Ubuntu 12.10 (Quantal Quetzal) on Friday night and today noticed that this script wasn't working anymore. I have it set via cron to run hourly and the last time it ran successfully was Friday before the upgrade.

I'm thinking it has something to do with PHP 5.4, as I see other folks on the Ubuntu forums mentioning PHP problems. I'm not certain I want to rollback to 5.3 yet since other stuff (like WordPress) is working fine.

If I manually run 'php index.php' it just does nothing. No errors, no output, even with error_reporting set to -1.

Anyone have any ideas?

edit: ahh, fixed it! I found a tivo_errors.txt file that contained this:

Code:
[22-Oct-2012 20:57:01 UTC] PHP Notice:  Undefined index: OS in /usr/local/tivo/now_playing/tivo_settings.php on line 8
[22-Oct-2012 20:57:01 UTC] PHP Fatal error:  Call-time pass-by-reference has been removed in /usr/local/tivo/now_playing/class_tivo_xml.php on line 111
I commented out the check for $_ENV["OS"] in tivo_settings.php to get past the first error (I'm on Linux so I don't need to check for Windows to set the delimiter), but the second one was a little different. After a little Google searching, I determined that line 111 in class_tivo_xml.php needed to be changed from this:

Code:
 xml_set_object($this->parser, &$this);
to this:

Code:
 xml_set_object($this->parser, $this);
Basically, remove the ampersand (&) before $this.

That fixed it, the script is working again!
Just as an amusing point of historical fact: That ampersand bug goes all the way back to my first release of the script... and exists because I lifted the xml parsing routine from comments in the php documentation without fully understanding what it did (at the time) . Thanks for fixing it!
__________________
Follow @pytivo on Twitter for project updates and more!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
A Web app for Roku Remote Control
gonzotek is offline   Reply With Quote
Old 09-12-2013, 11:37 PM   #37
HomeUser
Registered User
 
HomeUser's Avatar
 
Join Date: Jan 2003
Location: A2 Michigan
Posts: 2,315
Any one still using or made any updates?
__________________
VicW, Ex-Comcast customer ... And loving it!.
HomeUser is offline   Reply With Quote
Old 09-13-2013, 06:34 AM   #38
gonzotek
tivo_xml developer
 
gonzotek's Avatar
 
Join Date: Sep 2004
Location: Outside Phildadelphia
Posts: 2,222
Quote:
Originally Posted by HomeUser View Post
Any one still using or made any updates?
Anything you're looking for specifically? Other than windracer's fix last year, there hasn't been much interest in this in a quite a while.
__________________
Follow @pytivo on Twitter for project updates and more!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
A Web app for Roku Remote Control
gonzotek is offline   Reply With Quote
Old 09-13-2013, 09:26 AM   #39
windracer
joined the 10k club
 
windracer's Avatar
 
Join Date: Jan 2003
Location: St. Pete, FL
Posts: 11,243
I still use it!
__________________
840~Roamio Pro (TA, MoCA) + two A92~Minis, 758~Premiere XL4 (TA, MoCA)
S/old: 746~S4, 658~HDXL, 648~OLED S3, 565~TX20, 230~S2, 140~S2

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
windracer is offline   Reply With Quote
Old 09-15-2013, 06:26 PM   #40
HomeUser
Registered User
 
HomeUser's Avatar
 
Join Date: Jan 2003
Location: A2 Michigan
Posts: 2,315
Quote:
Originally Posted by gonzotek View Post
Anything you're looking for specifically? Other than windracer's fix last year, there hasn't been much interest in this in a quite a while.
Looking to see if there is any interest or any important changes b4 cleaning up and posting new code.

Over the past year I have made many changes.
When I thought the DVR was deleting programs early I modified the program to save a history of the playlists. Click on the number of suggestions in the summery table to bring up a table linking to the play lists of that DVR for the current month.

When I was searching the DVR's for a BBCA program that did not record (was set to record only new) and hoping that the program was recorded as a suggestion I added a combined play list to make searching all of the DVRs easy.

Changes that I recall
  • Auto size adjustment for drives.
  • Archiving "now playing" lists.
  • Sorting of summery table.
  • Added field deleted to summery table (space not used by programs or suggestions).
  • Combined now playing for all DVR's.
  • URL path allowing generation when HTML files are not published on local computer some guru probably can find a better solution to this.
  • Other changes that I have forgot about.
    - I added something to the program information like series ID.
    - Toggle all button.

Almost live webpage with the modifications See HomeUser's Now Playing List

Notes:
  • The archive history is saved only when the program is run during the first 15 minutes of each hour it may take an hour before the history pages are generated.
  • For sorting the tables I used sortable.js table code from http://www.kryogenix.org/code/browser/sorttable/
  • My updated files attached. I moved all the js and php files except index.php to a bin directory and made lots of changes to tivo_settings.php and will not %100 compatible with the previous tivo_settings.php.

Attached Files
File Type: zip tnpl20130915.tar.zip (65.9 KB, 1 views)
__________________
VicW, Ex-Comcast customer ... And loving it!.

Last edited by HomeUser : 09-15-2013 at 08:49 PM.
HomeUser is offline   Reply With Quote
Old 09-15-2013, 07:15 PM   #41
windracer
joined the 10k club
 
windracer's Avatar
 
Join Date: Jan 2003
Location: St. Pete, FL
Posts: 11,243
That reminds me ... I put together some new image files for the Premiere, Elite, and Roamio models (attached).

Premiere: tivo_746 (can also copy as tivo_748)


Elite/XL4: tivo_750 (can also copy as tivo_750)


Roamio: tivo_840 (can also copy as tivo_848)

Attached Images
File Type: png tivo_746.png (7.8 KB, 29 views)
File Type: png tivo_750.png (8.3 KB, 28 views)
File Type: png tivo_840.png (6.9 KB, 28 views)
__________________
840~Roamio Pro (TA, MoCA) + two A92~Minis, 758~Premiere XL4 (TA, MoCA)
S/old: 746~S4, 658~HDXL, 648~OLED S3, 565~TX20, 230~S2, 140~S2

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
windracer is offline   Reply With Quote
Old 09-15-2013, 08:52 PM   #42
HomeUser
Registered User
 
HomeUser's Avatar
 
Join Date: Jan 2003
Location: A2 Michigan
Posts: 2,315
I tried adding them to the zip file and that makes the file over the 100K limit.
__________________
VicW, Ex-Comcast customer ... And loving it!.
HomeUser is offline   Reply With Quote
Reply
Forum Jump




Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 06:52 PM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |