Ticket #845: schedhowto2.diff

File schedhowto2.diff, 24.5 KB (added by bjm <bjm@…>, 18 years ago)
  • docs/mythtv-HOWTO.sgml

     
    37173717scheduler find which showings you would like to record.
    37183718
    37193719<itemize>
    3720 <item>Single Record -- record only this title at this specific
    3721 time. This is the best way to be sure that a certain showing is
    3722 recorded. However, if the TV listings change and the show is not
    3723 broadcast at that time, the show will not be recorded.
     3720<item>Single Record -- record only this title at this specific time and
     3721this station. This is the best way to be sure that a certain showing is
     3722recorded. However, if the TV listings change and the show is not broadcast
     3723at that time, the show will not be recorded but will be marked as Not Listed
     3724to let you know that you should investigate.
    37243725
    37253726<item>Find One -- this will record a title once from any of the times
    37263727that appear in the TV listings. This is useful for recording a movie
     
    37413742the showing that was selected when the rule was set. This is useful
    37423743for news, current events or other programs where the same episode is
    37433744shown several times each week but the listings may not include
    3744 descriptive information. This is not a good choice if there are
     3745descriptive information. This may not be a good choice if there are
    37453746different episodes shown during the week.
    37463747
    37473748<item>Record Daily -- this records a show whenever the title is listed
    3748 for the time and channel on any day of the week. Here again, a show
     3749for the time and station on any day of the week. Here again, a show
    37493750will not be recorded if the time was altered by the station.
    37503751
    37513752<item>Find Daily -- this will record a title once per day from any
     
    37533754the showing that was selected when the rule was set. This is useful
    37543755for news, current events or other programs where the same episode is
    37553756shown several times each day but the listings may not include
    3756 descriptive information. This is not a good choice if there are
     3757descriptive information. This may not be a good choice if there are
    37573758different episodes shown during the day.
    37583759
    37593760<item>Channel Record -- records a show anytime the title is listed on
    3760 this channel.  This is perhaps the most common rule to use for most
     3761this station.  This is perhaps the most common rule to use for most
    37613762shows.
    37623763
    37633764<item>Record All -- record this title on any channel at any time. This
     
    37723773<p>By default, all shows you select have equal value to the
    37733774scheduler.  There are a set of rules to make good choices when
    37743775two or more shows are in conflict. However, priority values let the
    3775 scheduler know what you want so that it can set the schedule based
     3776scheduler know what you prefer so that it can set the schedule based
    37763777on your preferences.
    37773778
    37783779Initially all priority values are set to zero. You may choose to
     
    37873788which show you'd prefer verses any other show. The choice and style
    37883789are entirely up to you. However, the more information you give to
    37893790the scheduler, the more likely it will make the choices you would
    3790 like in the first place.
     3791prefer in the first place.
    37913792
    37923793The scheduler choices are based on the total priority for a showing
    3793 by adding up four different priority factors. By default, all of
     3794by adding up four different priority factors. By default, most of
    37943795these factors are "0" but you may use any combination to express
    37953796your likes and needs.
    37963797
     
    38013802simplicity and clarity.
    38023803
    38033804Per record type -- Setup->TV Settings->Recording Priorities->General
    3804 allows you to add to the priority based on the type. It may make
    3805 sense to increase the value for "Single" so that by default they
    3806 have an extra advantage over other shows. You may want to decrease
     3805allows you to add to the priority based on the type. It may make sense to
     3806increase the value for "Single" so that by default they have an extra
     3807advantage over other shows. The default is +1. You may want to decrease
    38073808the value for Find rules so that they will be less likely to interfere
    3808 with regular shows and will be more likely to record in a
    3809 non-conflicting time instead.
     3809with regular shows and will be more likely to record in a non-conflicting
     3810time instead. The default is -1.
    38103811
    38113812Per channel -- Setup->TV Settings->Recording Priorities->Channel
    38123813Priorities can be useful if you believe that you prefer any of the
     
    38823883schedule.
    38833884
    38843885<itemize>
    3885 <item>Currently recording beats not currently recording -- A recording in
    3886 progress can not be moved so it "wins" it's current timeslot.
     3886<item>Currently recording beats not currently recording -- A recording
     3887in progress can not be moved to another input or time so it "wins"
     3888its current timeslot.
    38873889
    3888 <item>Higher total priority beats lower total priority -- This is the core of
    3889 the scheduling process. Episodes of the highest priority show are placed
    3890 on the first available card then the next highest priority and so on.
     3890<item>Single showing rules with no match are marked Not Listed -- If a
     3891Single or Override do not match the current listings because the
     3892listings have changed, they are added to the schedule and marked to
     3893indicate that they will not record.
    38913894
    3892 <item>Future start time beats passed start time -- If there is an
     3895<item>Other record statuses beat Inactive or Repeat -- If two rules
     3896match the same showing of a program, a rule marked as inactive or
     3897a showing marked as a repeat yield to the other rule.
     3898
     3899<item>More specific record type is used in place of less specific -- If
     3900two rules match the same showing of a program, preference is given to
     3901Don't Record then Override, Single, Find One, Record Weekly, Find Weekly,
     3902Record Daily, Find Daily, Channel and finally All.
     3903
     3904<item>Higher total priority beats lower total priority -- This is the
     3905core of the scheduling process. Episodes of the highest priority show
     3906are placed on the first available input followed by the next highest
     3907priority show and so on.
     3908
     3909<item>Future start time beats past start time -- If there is an
    38933910episode in progress and also a later showing of the same episode, it
    38943911is better to record the complete episode. If there isn't another
    38953912showing, start recording now to record the remaining portion.
     
    39063923<item>If both start times have passed, later start time beats earlier start
    39073924time -- This attempts to miss the least amount of time.
    39083925
    3909 <item>If neither start time has passed, earlier start time beats later start
    3910 time -- This rule help assure that the earliest showing of an episode has
    3911 the advantage.
     3926<item>If neither start time has passed, earlier start time beats later
     3927start time -- This helps assure that the earliest showing of an episode
     3928has the advantage.
    39123929
    3913 <item>Lower input id beats higher input id -- The scheduler fills in open
    3914 time slots on the first available card. The next cards is used when there is
    3915 another show already placed for the first card.
     3930<item>Lower input id beats higher input id -- The scheduler fills in
     3931open time slots on the first available input for the video source. The
     3932next input is used when there is another show already placed for the
     3933card of the first input.
    39163934
    39173935<item>Older record rule beats newer record rule -- If two shows are still
    39183936equal after all of these other checks, the show whose record rule was added
    39193937first is preferred over a more recent addition.
    39203938
     3939<item>Postpone showings to resolve conflicts -- If Reschedule Higher
     3940Priorities is set or if a conflict has the same priority as a show
     3941that was scheduled at the same time, the scheduler will check to see
     3942if a scheduled show can be moved to another input or later matching
     3943showing without creating a new conflict so that the conflicting show
     3944can be scheduled to record.
     3945
    39213946</itemize>
    39223947
    39233948<sect2>Reschedule Higher Priorities
     
    39283953look for situations where a show cannot record because all inputs for the
    39293954channel are used for higher priority shows. It will check to see if any of
    39303955the other shows could be recorded at another time so that the conflicting
    3931 show can be recorded in it's place.
     3956show can be recorded in its place.
    39323957
    39333958Generally, this is a good strategy but there are tradeoffs. If a higher
    39343959priority show is postponed, you will not get to watch it until it is
     
    39363961may change and the later showing may go away. In this rare case the higher
    39373962priority show may never record. On the other hand, if you do not use this
    39383963option you will miss recording some lower priority shows unnecessarily
    3939 unless you make similar these changes manually.
     3964unless you manually make similar changes.
    39403965
    39413966By using Reschedule Higher Priorities, the scheduler will do a better job of
    39423967recording as many of your shows as possible when left unattended. It will
    39433968also be easy to see that shows have been marked to record at a later time.
    39443969You can then decide for yourself when you would prefer to record the first
    3945 showing.
     3970showing by clicking "Record anyway".
    39463971
    39473972<sect2>Controlling Your Schedule
    39483973<p>The Manage Recordings->Upcoming Recordings page is your control center
     
    39593984will remind you when there are conflicts that would prevent one or more
    39603985shows from being recorded.
    39613986
    3962 The items in the list are colored white for things that will record,
    3963 gray for those that do not need to record and yellow when there is a
    3964 time conflict. Items at the top of the list may also be highlighted
    3965 indicating that the recording is in progress.
     3987The items in the list are colored in the record color for things that
     3988will record, white for things that may need attention, gray for those
     3989that do not need to record and yellow when there is a time conflict.
     3990Items at the top of the list may also be highlighted indicating that the
     3991recording is in progress.
    39663992
    3967 Along with the channels, start times and titles, the right-hand column has a
    3968 status code. Numbers indicate which card number has been assigned to record
    3969 the show. Letters are used to indicate the reason that something will not be
    3970 recorded. Just below the box is a short status message for the highlighted
    3971 item that indicates the type of record rule that was matched and a one or
    3972 two word explanation of the status code. If you press SELECT, you will see
    3973 more information about the status.
     3993Along with the channels, start times and titles, the right-hand column has
     3994a status code. Numbers indicate which card number has been assigned to
     3995record the show. Letters are used to indicate the reason that something
     3996will not be recorded. Just below the box is a short status message for the
     3997highlighted item that indicates the type of record rule that was matched,
     3998the "total priority" for this showing and a one or two word explanation of
     3999the status code. If you press SELECT, you will see more information about
     4000the status.
    39744001
    39754002There are a few status codes that may require your attention. "C" indicates
    39764003that there are more overlapping shows to record than there are TV tuners to
     
    39804007notice situations where you would like to modify the scheduler's initial
    39814008choices.
    39824009
    3983 The first thing you can do is to highlight an item and press INFO once or
    3984 twice to see the Recording Options page. From this page you can change the
     4010The first thing you can do is to highlight an item and press INFO to
     4011see the recording options page. From this page you can change the
    39854012record rule type, the duplicate matching rules, or raise or lower the
    39864013priority to resolve whatever problem you noticed.
    39874014
     
    40064033such as raising the priority so that the show will record. These changes
    40074034would apply to this and all future showings that match this record rule.
    40084035"Add Override" will allow you to set options that apply to the specific
    4009 showing without affecting the existing record rule.
     4036showing without affecting the recurring record rule.
    40104037
    40114038If you return to an override page after an override has already been set,
    4012 you will also see a "Clear override" to undo your changes. This option makes
     4039you will also see a "Clear Override" to undo your changes. This option makes
    40134040it very easy to try out some "what if" attempts when deciding on your best
    40144041strategy in a difficult situation.
    40154042
     4043For a recording in progress, there will be a "Change Ending Time" button.
     4044This will take you to the options page for a Single or Override or create
     4045an Override if it is a recurring rule. Here you can go to the Recording
     4046Options section to change the program end time offset. If you extend the
     4047end time so that it overlaps upcoming recordings, the schedule will change
     4048to accommodate the new end time. This may cause a conflict or later showing
     4049even for a show with higher priority. Therefore, it is a good idea to
     4050check your schedule after changing the end time of a recording in
     4051progress.
     4052
    40164053<sect1>Storage Options
    40174054<sect2>Recording Profile
    4018 <p>Each schedule can be configured with a different recording profile.
    4019 For example, important shows can be configured with a "High Quality"
    4020 profile, while "filler" shows can be configured with a "Low Quality"
    4021 profile. These recording profiles need to be configured first (see
    4022 <ref id="Recording" name="Recording">, above).
     4055<p>Each recording rule can be configured with a different recording
     4056profile.  For example, colorful cinematography can be configured with a
     4057"High Quality" profile, while 'talking heads' interviews shows can be
     4058configured with a "Low Quality" profile. These recording profiles need to
     4059be configured before using them (see <ref id="Recording" name="Recording">,
     4060above).
    40234061
    40244062<sect2>Recording Group <label id="Recording Group">
    40254063<p>For organization of the "Watch Recordings" screen and the MythWeb
    4026 interface, recordings can be grouped into "recording groups".
     4064interface, recordings can be assigned into "recording groups".
    40274065
    4028 <sect2>Time Stretch
    4029 <p>A default time stretch value can be configured for each schedule;
    4030 this value will automatically be applied when the recordings are
    4031 played back.
     4066<sect2>Playback Group <label id="Playback Group">
     4067<p>This selects a set of pre-configured playback parameters which can be
     4068created and edited in Setup->TV Settings->Playback Groups.  When the
     4069recording is played, the values from this playback group will be
     4070used. This allows you to choose a default time stretch value, skip and
     4071jump amounts appropriate for this type of television program.
    40324072
    40334073<sect2>Auto-Expire <label id="Auto-Expire">
    40344074<p>MythTV will "autoexpire" old recordings to make room for new recordings
    40354075when disk space gets filled up. This option can be set to "Don't allow
    4036 auto expire" to prevent recordings from being automatically deleted
     4076auto expire" to prevent these recordings from being automatically deleted
    40374077when disk space fills up.
    40384078
    40394079<p>The default setting is for all scheduled recordings to be eligible
     
    40494089<p>An episode limit can also be configured to limit the maximum number
    40504090of episodes recorded of a single series, to restrict that series' disk
    40514091usage. If this is set, you can further decide what to do when this
    4052 limit is reached: either stop recording that series, or to delete the
     4092limit is reached; either stop recording that series, or to delete the
    40534093oldest episodes in favor of the new ones.
    40544094
    40554095<sect1>Post Recording Processing
     
    40954135</itemize>
    40964136
    40974137<sect1>Advanced Recording Options
    4098 <p>Creating Power Search rules with Custom Record
     4138<sect2>Creating Power Search rules with Custom Record
    40994139
    41004140MythTV's "Custom Record" feature gives you unlimited control for creating
    41014141specialized search recording rules to meet your needs. It allows you to
     
    41074147
    41084148<sect2>Getting Started
    41094149<p>
    4110 Go to Schedule Recordings->Custom Record. This page, titled "Power Search
    4111 Recording Rule Editor", helps you build a database search one clause at a
    4112 time. Each added clause further limits which showings will be matched in the
    4113 TV listings data. You can test the search at any time and when you are done,
    4114 you can save your search as a recording rule.
     4150Go to Schedule Recordings->Custom Record. This page, helps you build a
     4151database search one clause at a time. Each added clause further limits
     4152which showings will be matched in the TV listings. You can test the
     4153search at any time and when you are done, you can save your search as a
     4154recording rule.
    41154155
    41164156To familiarize yourself with how you can create custom rules, create a
    41174157simple rule to record "Nova" only in primetime.
    41184158
    4119 The first item at the top of the page allows you to edit an existing rule or
    4120 create a new rule. Leave it on "&lt;New rule&gt;". Arrow down to the third item
    4121 which says "Match an exact title". Right and left arrows would allow you to
    4122 select any of several prefabricated pieces or full examples but leave it on
    4123 the default for now. Arrow down to "Add this example clause" and press
    4124 SELECT (Enter or Space on a keyboard). The large text box should now show:
     4159The first item at the top of the page allows you to edit an existing rule
     4160or create a new rule. Leave it on "&lt;New rule&gt;". Arrow down to the
     4161third item which says "Match an exact title". Right and left arrows would
     4162allow you to select any of several prefabricated pieces or full examples
     4163but leave it on the default for now. Arrow down to "Add this example
     4164clause" and press SELECT (Enter or Space on a keyboard). The large text
     4165box should now show:
    41254166<tscreen><verb>
    4126      program.title = "Nova"
     4167     program.title = 'Nova'
    41274168</verb></tscreen>
    41284169As you have probably guessed, this says that we want to search for all
    41294170programs with the title "Nova" regardless of the time, day, channel, etc.
     
    41354176between the quotes. With a remote control, you can do 'cell phone' style
    41364177text entry with the number pad. The delete key is the "X" in the grouping
    41374178for "1", zero is grouped with "9" and "0" acts as the "Caps Lock" key.
     4179With MythTV version 0.19 or later, you can press ENTER in the text box
     4180to popup a virtual keyboard.
    41384181
    41394182Note: the text box honors many familiar Emacs control keys. It is also
    41404183possible to cut and paste text into the text box so you can edit with a
     
    41494192selector then press the right or left arrows until you find "Only in
    41504193primetime". Click "Add this example clause". You should now see:
    41514194<tscreen><verb>
    4152             program.title = "Nova"
     4195            program.title = 'Nova'
    41534196            AND HOUR(program.starttime) >= 19
    41544197            AND HOUR(program.starttime) < 23
    41554198</verb></tscreen>
     
    41634206then click "Save these settings". You now have a special rule to record
    41644207"Nova" but only when it is shown in primetime.
    41654208
     4209You can make further modifications to this rule by returning to the Custom
     4210Record page then press the right or left arrow keys on "Edit Rule:" until
     4211you find "Nova". You can experiment and test but the saved rule will not
     4212be updated until you click "Record" then "Save these settings".
     4213
    41664214To remove this, or any other rule, you can go to the "Recording Priorities"
    41674215page, arrow down to the title, press Enter and change the the recording type
    41684216to "Do not record this program" then "Save these settings".
     
    41744222is stored in the 'program' table and information about each TV station you
    41754223receive is stored in 'channel'. These two tables are used in the scheduler
    41764224queries and their fields are available to be used in your rules. The rules
    4177 you create are stored in 'record'. Normal rules in MythTV simply match the
    4178 title in the rule with the titles in the 'program' table.
     4225you create are stored in 'record'.
    41794226
    4180 MythTV also has search rules for "Titles", "Keywords" and "People". These
    4181 store the key phrase in the description field of the rule and includes them
    4182 in specialized SQL replacements for the normal title check. There is also a
    4183 type called "Power Search" which takes the raw SQL in the description as the
    4184 replacement for title matching.
     4227Normal rules in MythTV simply match the title in the rule with the titles
     4228in the 'program' table. MythTV also has search rules for "Titles",
     4229"Keywords" and "People". These store the key phrase in the description
     4230field of the rule and includes them in specialized SQL replacements for
     4231the normal title check. There is also a type called "Power Search" which
     4232takes the raw SQL in the description as the replacement for title
     4233matching.
    41854234
    41864235Custom Record is a tool to help you build valid SQL for Power Search rules.
    41874236You do not need to be a SQL expert to use Custom Record because the
     
    42354284Notice the word "LIKE" and the "%" at the end. This does wildcard matching
    42364285so that this would match even if the title ended with "2".  "III" or
    42374286":Revenge of the Snapple Lady". This can be useful where the title may
    4238 change from one season to the next like "Survivor%", "Big Brother%" or
     4287change from one season to the next like "Survivor: %", "Big Brother%" or
    42394288"The Amazing Race%".
    42404289
    42414290<sect2>Working with SQL
    42424291<p>
    4243 As you experiment, it is possible that you may misplace a quote or mistype a
    4244 word. If there is a mistake when you press "Test" or "Record" you will see
    4245 an error message returned from the database. This will usually give you a
    4246 good idea about what needs to be fixed. However, for more subtle MySQL
    4247 syntax errors, you can find more information in the documentation at <url
    4248 url="http://dev.mysql.com/doc/mysql/en/"
    4249 name="http://dev.mysql.com/doc/mysql/en/">. This contains a lot of
    4250 information that can be useful for Power Search rules such as the "Date and
    4251 Time Functions". There are many other good resources for SQL on the Web.
     4292As you experiment, it is possible that you may misplace a quote or mistype
     4293a word. If there is a mistake when you press "Test" or "Record" you will
     4294see an error message returned from the database. This will usually give
     4295you a good idea about what needs to be fixed. However, for more subtle
     4296MySQL syntax errors, you can find more information in the <url
     4297url="http://dev.mysql.com/doc/mysql/en/" name="documentation for
     4298MySQL">. This contains a lot of information that can be useful for Power
     4299Search rules such as the "Date and Time Functions". There are many other
     4300good resources for SQL on the Web.
    42524301
    4253 While the example clauses demonstrate how many of the data fields may be
    4254 used, you can get a more complete list of all the fields that are available
    4255 by using a MySQL client program:
     4302While the example clauses demonstrate how to use many of the data fields,
     4303you can get a more complete list of all the fields that are available by
     4304using a MySQL client program:
    42564305<tscreen><verb>
    42574306$ mysql -u mythtv -pmythtv mythconverg
    42584307mysql> describe program;
     
    42654314<item>"program.category_type" holds one of these exact four strings: "movie",
    42664315"series", "sports" or "tvshow".
    42674316
    4268 <item>"program.airdate" is a string representing the year of release for movies
    4269 and may have no meaning for other types of shows.
     4317<item>"program.airdate" is a string representing the year of release for
     4318movies and may have no meaning for other types of shows.
    42704319
    4271 <item>"program.stars" is a floating point number from 0.0 to 1.0. On a four star
    4272 scale, 1.0 would be four stars, 0.75 would be three stars and so on.
     4320<item>"program.stars" is a floating point number from 0.0 to 1.0. On a
     4321four star scale, 1.0 would be four stars, 0.75 would be three stars and so
     4322on.
    42734323
    42744324<item>"program.originalairdate" if provided is the date when a show
    42754325was, or will be, first televised. This may be useful for finding
     
    42824332airing. If this is "0" it usually means that this is a brand new show or a
    42834333rebroadcast within the first two weeks.
    42844334
    4285 <item>"program.programid" is the Tribune Media Service database record identifier
    4286 for each program description. In general, these start with a two letter
    4287 prefix, MV, EP, SP or SH that correspond to the "program.category_type".
    4288 For most, the last four digits are "0000" except EP where the last four
    4289 digits are the episode number in the series. Note that these are generated
    4290 by TMS and not the show's producers but they are usually in the same order as
    4291 the original air dates for the episodes. Detailed information can be found
    4292 in the Data Direct documentation at <url url="http://labs.zap2it.com/"
     4335<item>"program.programid" is the Tribune Media Service database record
     4336identifier for each program description. In general, these start with a
     4337two letter prefix, MV, EP, SP or SH that correspond to the
     4338"program.category_type".  For most, the last four digits are "0000" except
     4339EP where the last four digits are the episode number in the series. Note
     4340that these are generated by TMS and not the show's producers but they are
     4341usually in the same order as the original air dates for the
     4342episodes. Detailed information can be found in the Data Direct
     4343documentation at <url url="http://labs.zap2it.com/"
    42934344name="http://labs.zap2it.com/"> .
    42944345</itemize>
     4346
    42954347Finally, if you are doing something very experimental and a field is not
    42964348giving you the results you had anticipated, you can always check the MythTV
    42974349source code to see exactly how a field is used. The open source for MythTV