PDA

View Full Version : KeepAtMostU



JJBliss
09-17-2004, 02:27 PM
KeepAtMostU.txt 0.1 by JJBliss
(C) 09/11/2004
---------------------------

The zip should contain 2 files:

KeepAtMostU.tcl : tcl script
KeepAtMostU.txt : you're reading it


Requested:
--------------------------------
A friend asked if I could modify the 5 episode limitation for season passes. Apparently there is a desire to keep something like 10 or more episodes, yet not "ALL" the episodes. I am little shocked by the request, but I am aware that lots of folks use their TiVo as babysitting devices. Many parents have been using their TiVo to record childrens programming so they always have a cache of some insipid show for Junior to watch. Boohbah, Barney, Calliou, etc... can easily fill up a TiVo drive if left "unattended" using the "ALL" option, but 5 episodes is just not enough.

In the same sprit as TCTimeout.tcl and the disable LiveTV code, this script might help those folks who still want some space on their TiVo for their own shows, but have up to 99 episodes of some nonsense. Of course you will still be able to keep ALL episodes.


Info:
---------------------------------
This script will change/readjust the MAXIMUM number of episodes that TiVo will keep of a season pass OTHER THAN "ALL". This is a one time script that will change the MFS value of the standard 5 episode limitation. If you require multiple options aside from 1, 2, 3, 4, and x I suggest you modify this code as appropriate to suit your own need.

You can choose the standard 5 episode option, or choose to increase it to 6 episodes or 9 episodes. There is also a custom episode option. This option allows you to choose your own MAXIMUM number of episodes up to 99. These options will replace the 5 episode choice when setting up your new season passes or modifying existing season passes until you reset it back to the standard. You will ALWAYS have the opion for ALL.

If you require your TiVo reset to the standard 5 episode MAXIMUM you may do so using option 1.

KeepAtMostU uses Universal MFS Constants for 3.x and 4.x software. There is an override for 2.5.2 that uses the size of the tivoapp file as an indicator of OS version and adjusts the values accordingly since 2.5.x does not utilize the same constants. There will be no additional OS support < 2.5.2

This script is provided as-is. There is NO WARRANTY expressed or implied. It may corrupt the MFS database and render your Tivo useless. You MUST have a backup of your Tivo before using ANY product that modifies the standard way the tivo operates.

DO NOT USE THIS WITHOUT A BACKUP.

-----------------

General Greetz to: mrblack51, KRavEN, rc3105, MuscleNerd, mbm, Alphawolf, jdiner, alldeadhomiez & Vadim


Install / Running in Menu Mode
-----------------------------------

Extract the files

send over to the TiVo in your favorite way.

change to the directory that you placed KeepAtMostU.tcl in

chmod +x KeepAtMostU.tcl

Then ./KeepAtMostU.tcl

type reboot


Running KeepAtMostU.tcl with Command Line Options
------------------------------------------------------

change to the directory that you placed KeepAtMostU.tcl in

Then ./KeepAtMostU.tcl

KeepAtMostU Usage:

KeepAtMostU.tcl <MAXIMUM number of episodes>

Example -

To give your tivo a MAXIMUM of 15 episodes in the old 5 episode slot:
./KeepAtMostU.tcl 15

type reboot

JJBliss
09-17-2004, 02:29 PM
I am leaving this in the Development forum, until I've gotten some feedback on it.

Once it becomes useful and has worked out some of the bugs that I don't know about, I'll move it over to the Files forum.

There is currently no support thread for this, since it is a preliminary release and should only truly be discussed in a development sense.

If someone actually has a support question, I suggest you start a support thread in the proper forum. Non-development posts will be summarily deleted.
JJ

JJBliss
09-17-2004, 02:29 PM
Placeholder #1

NutKase
09-18-2004, 08:07 AM
Hey, nice script.

SA S2 tivos have a 1, 2, 3, 4, 5, 10 and All episodes selections.

I was surprised to find that DTivos and SA S1 tivos apparently stop at 5.

I'll test your script shortly.

[EDIT]It's the middle of the morning with no backup. :)

Can I test anything for you on SA tivos? It seems that since we already have a 10 option maybe I could find a location to patch that so I wouldn't have 1234, 99 (babysitting), 10, All :)?


NutKase

AVD
09-18-2004, 08:59 AM
NK:

my 3.0 Standalone only has 1,2,3,4,5,ALL as options


maybe its a s2 thing?


JJ: thanks, this is most useful, why the stop at 99? One would think the max would be based an exponent of 2.

NutKase
09-18-2004, 09:02 AM
my 3.0 Standalone only has 1,2,3,4,5,ALL as options

maybe its a s2 thing?

You're, of course, RIGHT. I didn't mean to speak for S1 SA owners. Post corrected.


NutKase

JJBliss
09-18-2004, 11:49 AM
NK:

Once I hear from more S2SA users, I can adjust the script to look for that hardware and adjust the MFS location.


AVD:

99 is a limit I chose as not to potentially violate any double digit limitation. I don't think anyone would want more then that anyway. So it was somewhat arbitrary and overwhelimgly sufficient. I think.

NutKase
09-18-2004, 08:53 PM
NK:

Once I hear from more S2SA users, I can adjust the script to look for that hardware and adjust the MFS location.

JJ,
Everytime you write a script I learn something :).

What do you want to know?

I tested your script. It works fine. Here's the deal on SA S2 tivo's...

1. SA S2 tivos have 1, 2, 3, 4, 5, 10 and All episodes selections.

I ran your script and selected 25.

2. I then had 1, 2, 3, 4, 25, and All episodes selections.

So, the NewEpInsert string you wrote to MFS added the 25 and then left out the 10.

3. I wanted to go back to the way it was and Option 1 would've still left me without 10.

4. I edited your script. Added a place for 5 episodes, then ran the script and selected Option 4 then set 10 episodes.

Example (5 episodes|5|$NewEpString|$NewEp|)

5. I'm back where I started and all is good. I just wanted to help test it for you, so other than losing the 10 option they're the same. SA S2 users won't be able to undo things w/out script editing though.


NutKase

JJBliss
09-19-2004, 11:40 AM
After some suggestions from rc3105 and Nutkase, I put together a new version that addresses some of the issues raised.

The new version will identify whether or not the user is running this on a SAS2 and adjust accordingly as well as offer a command line option to increase the number of choices altogether with a user definable field.

Riley's suggestions:

5 == week of mon-fri
10 == week@daily or 2 weeks of mon-fri
15 == 2 weeks@daily or 3 weeks of mon-fri
25 == entire season (22 episodes) or month of mon-fri
PLUS a user defineable field at the end.

This new version will be out in a few days.

What versions other then 4.0 (or better) do I need to test for to meet the SAS2 criteria ONLY?

JJBliss
09-19-2004, 10:38 PM
Those of you who have 4.0 TiVos should test this version.

NutKase: This should solve your problem and allow interesting additional options.

Feedback is always appreciated in the development thread.

PortlandPaw
10-03-2004, 08:46 AM
I'm having trouble getting this and TCTimeout to work on my SA 1. What is needed are the grpid and resid MFS value adjustments, as implemented in bufferhack.

I believe BlackWidow000 developed those for bufferhack. Could BlackWidow000 or someone else please help me with this?

Thanks!

JJBliss
10-03-2004, 02:44 PM
I'm having trouble getting this and TCTimeout to work on my SA 1. What is needed are the grpid and resid MFS value adjustments, as implemented in bufferhack.

I believe BlackWidow000 developed those for bufferhack. Could BlackWidow000 or someone else please help me with this?

Thanks!

The value that you are looking for is 900 (for TCTimeout). Search your MFS dump for that value. That will tell you the grpid/resid for the alteration. However, it is best to use ResourceId once you find it.

For KeepAtMostU, look for the string that is processed. Using TWP and the MFS browser, you should be able to locate each of the locations.

I'm a little shocked that the "constants" don't work in 3.0, when it seems that they are "constant" in 3.x and 4.x.

What values are at thos locations in your SA 3.0?

PortlandPaw
10-03-2004, 09:58 PM
Thanks. I found the ResourceIds and discovered that they are the same as your "universal resource ids" for TCTimeout, but not so for KeepAtMost, which I found to be 2162688 and 2162716. EDIT: Turns out both sets of values were invalid. See later post.

Which begs the question, what did I write to the original grpid/resid of 2097152 and 2097180? It turns out it was just some text about times ("(approx 1 min)"), so it probably didn't affect anything.

But I'm still getting the CONFLICT errors on both the SA and DirecTivo, so I"m going to experiment with tivosh_poolsize. EDIT: Not the poolsize. Turns out I had an identical/conflicting variable causing headaches.

PortlandPaw
10-04-2004, 10:39 PM
Further research shows these resource values for my SA 1, v. 3.0

# universal resource IDs for KeepAtMostU 3.x & 4.x
# set grpid 2097152 Originals from JJBliss
# set resid 2097180
set grpid 2162688
set resid 2162716

# universal resource IDs for TCTimeout 3.x & 4.x
# set grpid 1507328 Originals from JJBliss
# set resid 1507346
set grpid 1572864
set resid 1572882

I've tested these values and they work fine on Version 3.0-01-1-000. For the sake of compatibility, I would love to know what the values should be for other 3.x & 4.x versions. Since I only have my SA 1 and DTivo 1, I need some input from other software version users.

This is for the development I'm doing on my latest version of Hackman.
Thanks!

JJBliss
10-04-2004, 10:47 PM
Further research shows these resource values for my SA 1, v. 3.0

<cut>

I've tested these values and they work fine on Version 3.0-01-1-000. For the sake of compatibility, I would love to know what the values should be for other 3.x & 4.x versions. Since I only have my SA 1 and DTivo 1, I need some input from other software version users.

This is for the development I'm doing on my latest version of Hackman.
Thanks!

I hope you get some positive responses that help you, but aside from the anamolies that you've listed, I'm under the impression that the "constants" are just that across other 3.x and 4.x versions.

If we find out that this is NOT true, it makes all this code somewhat circumspect.

Im interested in the results.

However, since you have done the research and found the adjusted locations, I will include them in new versions of TCTimeout and KeepAtMostU that will test for 3.0 on an SA1 and adjust accordingly. Apparently no one else with that software version has tried the software.

Look for new versions soon enough.

JJBliss
10-04-2004, 11:15 PM
Revision History
-----------------------------------
0.1 - Initial development release
0.2 - Added test for 4.0 or better and adjust final location (identified by Nutkase)
- Added "r" switch for extended choice options (recommended by rc3105)
0.3 - Adjusted 3.0 MFS values

John1980
10-06-2004, 04:57 AM
FYI: The resources for v2.5.5 are as follows:

grpid 2162688
resid 2162716

JJBliss
10-06-2004, 08:37 AM
Revision History
-----------------------------------
0.1 - Initial development release
0.2 - Added test for 4.0 or better and adjust final location (identified by Nutkase)
- Added "r" switch for extended choice options (recommended by rc3105)
0.3 - Adjusted 3.0 MFS values
0.4 - Added 2.5.5 support (thanks John1980)

FredThompson
10-08-2005, 03:13 PM
Can this be modified to be:

keep at most X (largest recordings) of identical series and episode title matches and automagically delete smaller instances

If so, it would be wonderful for folks like me who collect series shows which have multiple broadcasts.

Varying bitrate and the (fortunately less common now) encoder confusion during some scene changes after ads means all episodes need to be recorded. Most of them are thrown out but the goal is to get the higher bitrate and smooth transitions.

I guess it would have to allow records of X+1 matching episodes before automagically removing the smallest one.

JJBliss
10-08-2005, 03:55 PM
Can this be modified to be:

keep at most X (largest recordings) of identical series and episode title matches and automagically delete smaller instances
Modified, no. Utilized, yes.

Using the same or similar methodology, you can utilize the functionality of this script either as a stand alone, or incorporate the code into a new script that will do what you require.

However, it seems to me, that you'll first need to parse the show information, then identify the file part sizes, then delete the smaller ones AFTER you've kept ALL of them.

So instead of aborting this script which modifies MFS, think about writing something that queries MFS, then acts on the information it receives. Just as a side note, OS versions > 4.x are different animals and need further investigation to see if this even works at all.

Loosely related commentary: I just decided to move a development machine to 6.2 (finally), so a lot of the little helper apps (like this) that I've written over time will eventually be ported to 6.2, if possible. No promises on time frames, just that I obviously wanted them in the first place, so I guess I'll want them again in 6.2

We'll see.

LlamaLarry
10-09-2005, 03:39 PM
Excellent news on the 6.2 dev box. :)

FredThompson
10-09-2005, 06:30 PM
Hmmm...maybe it would be more efficient to do what I described via a PC calling tserver. Not as elegant, because it would be outside the TiVo, but perhaps easier to create.

bend
07-02-2006, 02:16 AM
Hey guys i realise this thread is somewhat old but wondering if you ever made a version 0.5 that would set the option to "all epiodes" instead of a number 5, 50, 99 etc ?
If not is that at all possible ?

cheer
07-02-2006, 06:56 AM
Why? Isn't "All" a standard option on Tivo? Sure is on mine, anyway...

JJBliss
07-02-2006, 12:36 PM
hmm.. This app doesn't get rid of the All option. Something doesn't sound right.