My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
auto_transfers  

Featured
Updated Apr 14, 2012 by moy...@yahoo.com

KMTTG AUTO TRANSFERS

You have the ability to run kmttg as a background non-graphical program that can automatically download and perform the other usual actions you choose based on titles and keywords you setup.

NOTE: If you have VideoRedo configured for use in kmttg consult the VideoRedo_configuration wiki page for special configuration instructions.

NOTE: By default the kmttg Windows service is setup as “automatic” startup mode. This means that should you restart your computer the kmttg service will automatically be started on bootup. If you would like to change this behavior see the relevant section below for more details on how to do that.

NOTE: For Windows users please read section below entitled "CONFIGURING ACCOUNT TO RUN KMTTG WINDOWS SERVICE". BEFORE SETTING UP KMTTG WINDOWS SERVICE YOU MUST FIRST CONFIGURE AUTO TRANSFERS FROM THE GUI. YOU NEED TO HAVE AT LEAST 1 AUTO TRANSFER ENTRY SETUP OR THE SERVICE WILL JUST EXIT WITH AN ERROR (look at auto.log.0 file).

CONFIGURING AUTO TRANSFERS

  • NOTE: It is highly recommended you enable Overwrite existing files option under kmttg configuration (File->Configure...) if setting up Auto Transfers as when Auto Transfers are interrupted that can leave partial files created that you would want Auto Transfers to overwrite.
  • Auto Transfers->Configure… entry should be use as the first step is to bring up the Auto Transfers Configuration GUI

Adding title and keyword entries

You can specify to match shows by title or keyword.

Title Matching

Title matching is very simple: supply the exact main title of a show such as ‘lost’, ‘two and a half men’, etc. Note that the title matching is case insensitive so using capital letters is not necessary, however any punctuation should be included.

If you already have shows on your Tivo with titles you wish to add you can more easily do so (outside this GUI) by selecting the entries in the shows list and then using the Auto Transfers->Add selected titles menu. Note that when adding entries that way they will default to performing tasks you have enabled in main kmttg window. You can configure and updated each entry individually as needed once they have been added to the auto transfers list.

Auto Transfer Everything

If you want kmttg to auto transfer everything available on all your tivos you can setup a title matching entry with simply .* as the title (that's 2 characters: a dot followed by an asterisk). In pattern matching this will match anything.

Regex Matching

With "title" matching kmttg actually uses Regex for matching up titles, so if you are familiar with regex expressions you can use them to setup pretty much any kind of title matching. As an example a user asked for a way to record all shows except "The Daily Show" and "Steven Colbert". This is possible by setting up a "title" match with following text which will match any title not containing "daily show" and "colbert" strings:
^((?!daily show|colbert).)*$

Keyword Matching

NOTE: Keywords will be matched only against show titles, episode titles and descriptions. Extended information such as actors, directors etc. are not included in the search. The reason for this is that extra information is only available as a separate URL for each show, so it would be too network intensive to gather all the extra information for each show.

You can specify one or more keywords for matching shows.

When you specify a single keyword that means that keyword must be present somewhere in title, episode title or description in order to get a match.

You can setup a more complex keyword match by specifying multiple keywords with different operators:

  • With no parenthesis surrounding a keyword this indicates a logical AND.
  • With (parenthesis) surrounding a keyword this indicates a logical OR.
  • With a ! as the first character in a keyword his indicates a logical NOT.
  • An example is given in the Auto Transfers Configuration GUI as a reminder:
(basketball)|(football)|!new york
This means match show descriptions that contain either “basketball” or “football” but don’t include any that have “new york”

TiVo

By default with all setting kmttg will match your auto transfer entries against recordings on all TiVos defined in kmttg. You can optionally restrict individual auto transfer entries to only look at a particular TiVo instead if you like.

Enabling desired options to perform following a download

Enable which tasks you want to perform following a download for each entry you define. The same options as are available in GUI mode are available here, just make sure kmttg is properly configured as described above. Note that you can define different tasks for each entry and if you are enabling encode task you can use different encoding profiles for each entry.

  • Unlike GUI mode you also have option for encoding to more than 1 file at a time. Second entry after Encoding Name defaults to Do not encode twice. You can change it to an encoding setting and set the file suffix to use in Second Encoding Suffix field if you want to generate 2 encodings from 1 source TiVo file.

channel filter

Here you can specify a channel name or a channel number that you wish to restrict an individual auto transfer setup to. Thus for example a type title setup with .* keyword and a specified channel will match all recordings from specified channel.

comskip.ini override

This only applies if you are using comskip in the Ad Detect step. This allows you to optionally specify a custom comskip.ini file to use for this auto transfer entry. Sometimes comskip needs to be tweaked to work well with certain shows. So this gives you ability to override the main/default kmttg comskip.ini for individual shows corresponding to auto transfer entries.

enabled

You can selectively disable auto transfer entries by unchecking this option. This provides a means of disabling certain auto transfer entries temporarily without having to delete them.

Filter out TiVo Suggestions

If enabled then kmttg will filter out and not process any TiVo Suggestion recordings for this auto entry. NOTE: If the GLOBAL version of this setting is enabled it will override this setting, so if you want this only to apply to specific auto transfer entries then be sure to not enable the GLOBAL setting.

Treat each recording as unique

  • If enabled then kmttg will generate a unique ProgramId based on ProgramId and recorded time for each recording of this program.
  • This is useful only for programs that do not already have unique ProgramIds for each episode, such as some news programs for example. For such programs kmttg would not ordinarily auto download subsequent episodes because a ProgramId entry already exists in auto.history file. By enabling this option kmttg will instead use a time-based ProgramId entry so that future recordings on different dates with same ProgramId will still auto download.
  • NOTE: Enabling this option may lead to repeated downloads of shows so use wisely/sparingly only for shows without unique ProgramId.

ADD

Once you are happy with an entry setup click this button to add the entry to the setup list. Note that if you click on an entry in the setup list then the form options are updated to match the setup for that entry.

UPDATE

If you want to modify an entry then select the entry in the setup list to display the current configuration for the entry. Then modify configuration as desired and click on the UPDATE button to update the entry.

DEL

If you want to remove 1 or more entries then select them in the setup list and click on the DEL button.

GLOBAL SETTING: Dry Run Mode (test keywords only)

This option enabled is useful for testing your title and keyword matching setup without actually having kmttg download and process matching shows. Kmttg will simply match your titles and keyword entries versus shows on your Tivo and report which shows match in the auto.log.0 file (or if you run in GUI mode you can see matching shows reported in the text area). This mode allows you to quickly test out your setup to make sure you will get the shows you want. Once you have finished debugging obviously this option should be disabled.

GLOBAL SETTING: Check Tivos Interval (mins)

This defines the interval in minutes for kmttg to check your Tivos for matching shows to download and process. Once matches are found kmttg will automatically download and process all matching shows, then it will sleep for the period of time you define here before checking your Tivos again for more matches. Don’t set this number too low since that will unnecessarily create too much network activity with your Tivos.

GLOBAL SETTING: Date Filter

As requested by some users this option allows you to restrict which shows are automatically downloaded by kmttg by date. You can setup to only consider shows that are either less than or more than a specified number of hours old. Thus for example to get only new recordings you could setup Date Filter to less than 24 hours old which means only shows recorded in last 24 hours or less will be considered.

GLOBAL SETTING: Filter out TiVo Suggestions

If enabled then kmttg will filter out and not process any TiVo Suggestion recordings. NOTE: If this GLOBAL version is enabled it will override individual auto transfer filter settings, so if you want this only to apply only to specific auto transfer entries then be sure to not enable this setting.

GLOBAL SETTING: Only process KUID recordings

When enabled only process TiVo recordings marked as Keep Until I Delete.

NOTE: If you don't use KUID feature on the TiVo this gives you a way to initiate transfers from your TiVo by having this option enabled and having kmttg auto transfers setup to transfer all recordings. For that setup once you mark a show as KUID on your TiVo it will transfer via kmttg auto transfers.

GLOBAL SETTING: Do not process recordings without ProgramId

Programs that were transferred to your TiVo(s) for example using TiVo Desktop or pyTivo do not have a TiVo assigned ProgramId identifier. kmttg auto transfers uses this identifier to prevent shows from downloading more than once in auto transfers mode. For these shows kmttg will generate a fake ProgramId which is needed to prevent them from being processed multiple times by Auto Transfers. With this option enabled, these kinds of shows with fake ProgramId entries will be automatically filtered out by kmttg auto transfers.

GLOBAL SETTING: Do not wait for all jobs to finish before processing new ones

When enabled kmttg will proceed to find and process new shows without waiting for all previously started or queued tasks to complete for each TiVo as has been default kmttg behavior for a long time.

RUNNING AUTO TRANSFERS IN GUI MODE

  • Auto Transfers->Run Once in GUI menu entry will run 1 pass of auto transfers in graphical mode so that you can easily monitor what shows are being processed. Note that while this is a convenient way of running and monitoring auto transfers be warned that if you close the kmttg GUI then all actively running jobs will be killed, so don’t use this mode if you plan on terminating the graphical program. If you want to run auto transfers in non-graphical mode consult the sections below.
  • Auto Transfers->Loop in GUI menu entry is similar to the above except it will continuously loop until you select the menu entry again to disable the looping. This is useful if you want to leave the GUI running for a long time while continuously checking your TiVos for matching auto transfer entries.

NOTE: There is a separate loop for each TiVo defined in kmttg. Once all matching entries are processed for a TiVo then kmttg will wait for number of minutes you configured in Auto Transfers setup: Check TiVos Interval (mins) before matching against that TiVo again.

NOTE: When you disable Loop in GUI it does not mean that all currently processed and queued jobs are terminated, it simply means that kmttg will stop checking TiVos for any new matches. All currently processing jobs will continue to run and queued jobs will go through as normal unless you close kmttg GUI.

NOTE: Loop in GUI mode also logs to auto.log.0 file so that there is a detailed record of all activity available should you need it.

WORKAROUND FOR REPEATED SHOWS WITH SAME ProgramId

In order to prevent transfer of same show over and over in auto mode kmttg creates an auto.history file that contains ProgramId entries for previously downloaded shows. ProgramId is usually unique for every show and each episode of a series. However, there are some series where for some reason that is not the case. So for those cases once an episode is downloaded once, no further episodes will download in auto transfers mode because of this issue. To workaround this issue you can use the Treat each recording as unique option for such programs as described above.

RUNNING THE AUTO TRANSFERS PROGRAM AS A SERVICE IN WINDOWS

In Windows the auto transfer program can be setup to run as a Windows Service called kmttg.

NOTE: BEFORE SETTING UP KMTTG WINDOWS SERVICE YOU MUST FIRST CONFIGURE AUTO TRANSFERS FROM THE GUI. YOU NEED TO HAVE AT LEAST 1 AUTO TRANSFER ENTRY SETUP OR THE SERVICE WILL JUST EXIT WITH AN ERROR (look at auto.log.0 file).

You can install, start, stop and remove kmttg service directly from the kmttg GUI:

  • Use Auto Transfers->Service->Status to view the status of kmttg service
  • Use Auto Transfers->Service->Install to install the kmttg service so as to run auto transfers as a service. NOTE: This only installs the service, you then need to start it using entry below.
  • Use Auto Transfers->Service->Start to start the kmttg service
  • Use Auto Transfers->Service->Stop to stop the kmttg service
  • Use Auto Transfers->Service->Remove to remove the kmttg service

NOTE: If you get an error such as OpenSCManager failed - Access is denied. you need to run the batch files described below as Administrator for it to work.

Alternatively there is another way to control kmttg service. Browse to the folder where you installed kmttg and then go to service\win32 folder. Here there are scripts to install, start, stop or uninstall the kmttg service. For Windows XP simply double-click on the appropriate script to run it. For Vista or Windows 7 because of UAC these must be run as Administrator in order to work, so you should right click and select "Run as administrator" to run them.

  • install-kmttg-service.bat Installs kmttg as a service
  • start-kmttg-service.bat Will start an already installed kmttg service
  • stop-kmttg-service.bat Stops a running kmttg service (this doesn’t delete the service, merely stops it)
  • uninstall-kmttg-service.bat Deletes the kmttg service such that it won’t automatically start running again upon reboot

NOTE: If you have a service already running from a previous kmttg installation you must uninstall the service using that installation first and then re-install using the new installation.

NOTE: All output messages will be logged in auto.log.0 file which resides in the main kmttg installation folder (where kmttg.jar file is located).

For more specific control you can get to the kmttg service in Windows as follows:

  • Control Panel->Administrative Tools->Services
  • Scroll down and find kmttg entry
  • Right click on kmttg and stop service if it is running
  • Right click on kmttg and select Properties

CONFIGURING ACCOUNT TO RUN KMTTG WINDOWS SERVICE

By default the kmttg service will be setup to run using a generic administrator account. This may cause problems for certain setups such as if you have output files setup to go to network or external drives or you are using VideoRedo tasks. To avoid potential problems you should configure the kmttg service to run using the same login account you are using when running kmttg GUI. You can do that as follows:

  • Control Panel->Administrative Tools->Services
  • Scroll down and find kmttg entry
  • Right click on kmttg and stop service if it is running
  • Right click on kmttg and select Properties
  • Choose Log On tab
  • Click on This account and type in a valid user account for this computer along with the password to go along with it.
  • OK the form

CHANGING KMTTG WINDOWS SERVICE STARTUP MODE

By default the kmttg service is setup as automatic startup mode. This means that should you restart your computer the kmttg service will automatically be started on bootup. If desired you can change the mode to manual (which means you will need to manually start and stop the service and by default the service will not start on bootup) as follows (Windows XP):

  • Control Panel – Administrative Tools – Services
  • Find the kmttg service in the list and right click and select Properties and change Startup Type to Manual
  • Note that you can also stop and start the service from here if you wish

CONTROLLING KMTTG WINDOWS SERVICE FROM COMMAND LINE

You can control services from the command line using the “sc.exe” command. Examples:

  • sc query kmttg
  • sc start kmttg
  • sc stop kmttg
  • sc delete kmttg

FURTHER DETAILS ON KMTTG WINDOWS SERVICE

Java scripts cannot natively be run as services in windows. Kmttg uses a windows wrapper program which can interface with Windows services in order to run:

"<path>\service\win32\bin\wrapper.exe" -s "<path>\service\conf\wrapper.conf"

The wrapper.conf files sets up to run Java with com.tivo.kmttg.main.kmttg -a as arguments.

The –a option to indicates to run kmttg in non graphical auto transfers mode, running in a loop where Tivos are checked and matching shows processed.

SETTING UP KMTTG AUTO TRANSFERS AS A BACKGROUND JOB (MACINTOSH/LINUX)

On Mac & linux systems you can setup to run kmttg as a background non-graphical job. You need to start kmttg with -a argument to do this. You can use the kmttg that comes with the installation and simply add -a argument when running it:

kmttg -a

You can start and stop kmttg as a background auto transfers job directly from the kmttg GUI if you wish:

  • Use Auto Transfers->Background Job->Status to check if background job is running
  • Use Auto Transfers->Background Job->Enable to run a kmttg background auto transfers job.
  • Use Auto Transfers->Background Job->Disable to stop the kmttg background job.

If you reboot your system then you will need to re-start the program, or you can use the /etc/rc method to put a script in place that will automatically start the program in background mode with the –a option.

RUNNING THE AUTO TRANSFERS PROGRAM AS A BATCH COMMAND

As an alternative to running auto transfers program as a service, you can alternatively supply the –b command line option to kmttg to run batch mode. For example, the command might look something like:

kmttg –b

In this mode the program will check your tivos once for matching programs and download and process any matches and then exit.

This is especially useful when used in conjunction with a job scheduler program such as Linux cron.

AUTO TRANSFER RELATED FILES

There are 3 files associated with auto transfers you should be aware of, all residing in the same directory where the kmttg.jar main program file is located:

auto.ini

This file contains your saved auto transfers configuration including any title and keyword matching setups.

NOTE: This file is re-parsed at every Check Tivos Interval so that it is not necessary to re-start the background process whenever you want to update your auto transfer configuration.

auto.log.0

This file contains activity log information for the background process. Entries in the log file all contain a time stamp. You can view this file from kmttg GUI using Auto Transfers->Examine Log File menu.

NOTE: In order to prevent this log file from growing too large over time there is a user-configurable setting to limit the size of this log file. Once the limit is reached the file is copied to auto.log.1 and auto.log.0 is reset. The configuration option can be found in kmttg main configuration window (File->Configure) under File Settings tab and is called auto log file size limit (MB). This allows you to set file size limit in MBytes (default is 10).

auto.history

This file contains a list of ProgramId entries for every show that has been processed by the kmttg background process. This is what prevents the same shows from being downloaded over and over again from your Tivos. The ProgramId entry is added to this file following a successful download of a show by the kmttg background process. Any shows that are not downloaded are indicated with their associated ProgramId entry in the auto.log.0 file.

NOTE: If this file is already created then downloads that complete successfully in GUI mode will also be recorded in the history file such that they will not be re-processed in kmttg background/service mode.

NOTE: You can use Auto Transfers->Add selected to history file menu entry to add selected entries in show list to the history file if you wish.

Comment by stormsp...@gmail.com, Oct 28, 2010

Is it possible to add an option to move the cut.mpg to a folder(Using Title) on completion and renaming it without the cut name?

Comment by project member moy...@yahoo.com, Oct 28, 2010

You can write a custom script to do it and then in kmttg configuration define the following for "custom command" in "Programs" tab:

<your script name> mpegFile_cut?

(Obviously your script needs to handle file name as an argument)

Comment by jeff.ric...@gmail.com, May 13, 2011

Would it be possible to add an option for the maximum number of shows to keep? Once the max threshold is exceeded the auto transfer task would delete the oldest show before adding a new one.

Comment by mwby...@gmail.com, Mar 20, 2012

auto.history recieves an entry as soon as kmttg begins the download. Issue with this approach is that when an error occurs, such as server busy, or failed encodimg, then it will never be downloaded or processed again. Would the development team consider changing this behavior to make the entry after all jobs for the transaction are complete? In other words, when an item is selected to download, decrypt, encode, etc., there are jobs for each action, which essentially creates a transaction. The entry could be made only if all jobs complete successfully. Anyone else have this issue? Thoughts? Thanks.


Sign in to add a comment
Powered by Google Project Hosting