Index: mythplugins/mythweb/modules/tv/detail.php
===================================================================
--- mythplugins/mythweb/modules/tv/detail.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/detail.php	(working copy)
@@ -222,6 +222,7 @@
                 $schedule->inactive      = $_POST['inactive']     ? 1 : 0;
                 $schedule->dupin         = _or($_POST['dupin'] + $_POST['dupin2'], dupsin_all);
                 $schedule->dupmethod     = _or($_POST['dupmethod'], 6);
+                $schedule->seasonlimit   = intval($_POST['seasonlimit']);
                 $schedule->recpriority   = intval($_POST['recpriority']);
                 $schedule->maxepisodes   = intval($_POST['maxepisodes']);
                 $schedule->startoffset   = intval($_POST['startoffset']);
Index: mythplugins/mythweb/modules/tv/schedules_custom.php
===================================================================
--- mythplugins/mythweb/modules/tv/schedules_custom.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/schedules_custom.php	(working copy)
@@ -85,6 +85,7 @@
             $schedule->maxnewest     = $_POST['maxnewest']    ? 1 : 0;
             $schedule->dupin         = _or($_POST['dupin'] + $_POST['dupin2'], dupsin_all);
             $schedule->dupmethod     = _or($_POST['dupmethod'], 6);
+            $schedule->seasonlimit   = intval($_POST['seasonlimit']);
             $schedule->recpriority   = intval($_POST['recpriority']);
             $schedule->maxepisodes   = intval($_POST['maxepisodes']);
             $schedule->startoffset   = intval($_POST['startoffset']);
Index: mythplugins/mythweb/modules/tv/schedules_manual.php
===================================================================
--- mythplugins/mythweb/modules/tv/schedules_manual.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/schedules_manual.php	(working copy)
@@ -70,6 +70,7 @@
             $schedule->maxnewest     = $_POST['maxnewest']    ? 1 : 0;
             $schedule->dupin         = _or($_POST['dupin'] + $_POST['dupin2'], dupsin_all);
             $schedule->dupmethod     = _or($_POST['dupmethod'], 6);
+            $schedule->seasonlimit   = intval($_POST['seasonlimit']);
             $schedule->recpriority   = intval($_POST['recpriority']);
             $schedule->maxepisodes   = intval($_POST['maxepisodes']);
             $schedule->startoffset   = intval($_POST['startoffset']);
Index: mythplugins/mythweb/modules/tv/classes/Schedule.php
===================================================================
--- mythplugins/mythweb/modules/tv/classes/Schedule.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/classes/Schedule.php	(working copy)
@@ -35,6 +35,7 @@
     var $storagegroup;
     var $dupmethod;
     var $dupin;
+    var $seasonlimit;
     var $station;
     var $seriesid;
     var $programid;
@@ -204,14 +205,14 @@
         $sh = $db->query('REPLACE INTO record (recordid,type,chanid,starttime,startdate,endtime,enddate,search,
                                                title,subtitle,description,profile,recpriority,category,
                                                maxnewest,inactive,maxepisodes,autoexpire,startoffset,endoffset,
-                                               recgroup,dupmethod,dupin,station,seriesid,programid,autocommflag,
+                                               recgroup,dupmethod,dupin,seasonlimit,station,seriesid,programid,autocommflag,
                                                findday,findtime,findid,autotranscode,parentid,transcoder,
                                                autouserjob1,autouserjob2,autouserjob3,autouserjob4,
                                                playgroup,storagegroup,prefinput,
                                                next_record,last_record,last_delete)
                                        VALUES (?,?,?,
                                                FROM_UNIXTIME(?),FROM_UNIXTIME(?),FROM_UNIXTIME(?),FROM_UNIXTIME(?),
-                                               ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
+                                               ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
                          _or($this->recordid,      0,          true),
                          _or($this->type,          0,          true),
                          $this->chanid,
@@ -235,6 +236,7 @@
                          _or($this->recgroup,      'Default'       ),
                          _or($this->dupmethod,     0,          true),
                          _or($this->dupin,         15,         true),
+                         _or($this->seasonlimit,   0,          true),
                          _or($this->station,       ''              ),  // callsign!
                          _or($this->seriesid,      ''              ),
                          _or($this->programid,     ''              ),
Index: mythplugins/mythweb/modules/tv/classes/Program.php
===================================================================
--- mythplugins/mythweb/modules/tv/classes/Program.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/classes/Program.php	(working copy)
@@ -47,6 +47,7 @@
     public $rectype;
     public $dupin;
     public $dupmethod;
+    public $seasonlimit;
     public $recstartts;
     public $recendts;
     public $progflags;
@@ -152,25 +153,26 @@
             $this->rectype         = $data[20];
             $this->dupin           = $data[21];
             $this->dupmethod       = $data[22];
-            $this->recstartts      = $data[23];         # ACTUAL start time (also maps to recorded.starttime)
-            $this->recendts        = $data[24];         # ACTUAL end time
-            $this->progflags       = $data[25];
-            $this->recgroup        = $data[26];
-            $this->outputfilters   = $data[27];
-            $this->seriesid        = $data[28];
-            $this->programid       = $data[29];
+            $this->seasonlimit     = $data[23];
+            $this->recstartts      = $data[24];         # ACTUAL start time (also maps to recorded.starttime)
+            $this->recendts        = $data[25];         # ACTUAL end time
+            $this->progflags       = $data[26];
+            $this->recgroup        = $data[27];
+            $this->outputfilters   = $data[28];
+            $this->seriesid        = $data[29];
+            $this->programid       = $data[30];
 
-            $this->lastmodified    = $data[30];
-            $this->stars           = $data[31];
-            $this->airdate         = $data[32];
-            $this->playgroup       = $data[33];
-            $this->recpriority2    = $data[34];
-            $this->parentid        = $data[35];
-            $this->storagegroup    = $data[36];
-            $this->audioproperties = $data[37];
-            $this->videoproperties = $data[38];
-            $this->subtitletype    = $data[39];
-            $this->year            = $data[40];
+            $this->lastmodified    = $data[31];
+            $this->stars           = $data[32];
+            $this->airdate         = $data[33];
+            $this->playgroup       = $data[34];
+            $this->recpriority2    = $data[35];
+            $this->parentid        = $data[36];
+            $this->storagegroup    = $data[37];
+            $this->audioproperties = $data[38];
+            $this->videoproperties = $data[39];
+            $this->subtitletype    = $data[40];
+            $this->year            = $data[41];
         // Is this a previously-recorded program?
             if (!empty($this->filename)) {
                 $this->url = video_url($this); // get download info
@@ -418,25 +420,26 @@
                              $this->rectype        , // 20 rectype
                              $this->dupin          , // 21 dupin
                              $this->dupmethod      , // 22 dupmethod
-                             $this->recstartts     , // 23 recstartts
-                             $this->recendts       , // 24 recendts
-                             $this->progflags      , // 25 programflags
-                             $this->recgroup       , // 26 recgroup
-                             $this->outputfilters  , // 27 chanOutputFilters
-                             $this->seriesid       , // 28 seriesid
-                             $this->programid      , // 29 programid
+                             $this->seasonlimit    , // 23 seasonlimit
+                             $this->recstartts     , // 24 recstartts
+                             $this->recendts       , // 25 recendts
+                             $this->progflags      , // 26 programflags
+                             $this->recgroup       , // 27 recgroup
+                             $this->outputfilters  , // 28 chanOutputFilters
+                             $this->seriesid       , // 29 seriesid
+                             $this->programid      , // 30 programid
 
-                             $this->lastmodified   , // 30 lastmodified
-                             $this->stars          , // 31 stars
-                             $this->airdate        , // 32 originalAirDate
-                             $this->playgroup      , // 33 playgroup
-                             $this->recpriority2   , // 34 recpriority2
-                             $this->parentid       , // 35 parentid
-                             $this->storagegroup   , // 36 storagegroup
-                             $this->audioproperties, // 37 audioprop
-                             $this->videoproperties, // 38 videoprop
-                             $this->subtitletype,    // 39 subtitletype
-                             $this->year,            // 40 year
+                             $this->lastmodified   , // 31 lastmodified
+                             $this->stars          , // 32 stars
+                             $this->airdate        , // 33 originalAirDate
+                             $this->playgroup      , // 34 playgroup
+                             $this->recpriority2   , // 35 recpriority2
+                             $this->parentid       , // 36 parentid
+                             $this->storagegroup   , // 37 storagegroup
+                             $this->audioproperties, // 38 audioprop
+                             $this->videoproperties, // 39 videoprop
+                             $this->subtitletype,    // 40 subtitletype
+                             $this->year,            // 41 year
                             )
                       );
     }
Index: mythplugins/mythweb/modules/tv/tmpl/default/_advanced_options.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/default/_advanced_options.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/tmpl/default/_advanced_options.php	(working copy)
@@ -130,6 +130,20 @@
                             echo ' SELECTED';
                         echo '>' . t('Exclude Repeat and Generic Episodes') . '</option>';
                    ?></select></dd>
+                <dt><?php echo t('Season Limit'); ?>:</dt>
+                <dd><select name="seasonlimit">
+                    <?php
+                        echo '<option value="0"';
+                        if ($schedule->seasonlimit == 0) echo ' selected';
+                        echo '>' . t('Any Season') . '</option>';
+                        for ($i = 1; $i <= 25; $i++) {
+                            echo '<option value="' . $i . '"';
+                            if ($schedule->seasonlimit == $i) echo ' selected';
+                            echo '>' . t('Season') . ' ' . $i . '</option>';
+                        }
+                    ?>
+                    </select>
+                </dd>
                 <dt><?php echo t('Preferred Input') ?>:</dt>
                 <dd><?php input_select($schedule->prefinput, 'prefinput') ?></dd>
                 <dt><label for="autocommflag"><?php echo t('Auto-flag commercials') ?>:</label></dt>
Index: mythplugins/mythweb/modules/tv/tmpl/lite/detail.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/lite/detail.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/tmpl/lite/detail.php	(working copy)
@@ -418,6 +418,20 @@
                             echo ' SELECTED';
                         echo '>'.t('Subtitle then Description').'</option>';
                    ?></select></dd>
+                <dt><?php echo t('Season Limit'); ?>:</dt>
+                <dd><select name="seasonlimit">
+                    <?php
+                        echo '<option value="0"';
+                        if ($schedule->seasonlimit == 0) echo ' selected';
+                        echo '>' . t('Any Season') . '</option>';
+                        for ($i = 1; $i <= 25; $i++) {
+                            echo '<option value="' . $i . '"';
+                            if ($schedule->seasonlimit == $i) echo ' selected';
+                            echo '>' . t('Season') . ' ' . $i . '</option>';
+                        }
+                    ?>
+                    </select>
+                </dd>
                 <dt><?php echo t('Preferred Input') ?>:</dt>
                 <dd><?php input_select($schedule->prefinput, 'prefinput') ?></dd>
                 <dt><label for="autocommflag"><?php echo t('Auto-flag commercials') ?>:</label></dt>
Index: mythplugins/mythweb/modules/tv/tmpl/lite/schedules_custom.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/lite/schedules_custom.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/tmpl/lite/schedules_custom.php	(working copy)
@@ -200,6 +200,20 @@
                             echo ' SELECTED';
                         echo '>'.t('Subtitle then Description').'</option>';
                    ?></select></dd>
+                <dt><?php echo t('Season Limit'); ?>:</dt>
+                <dd><select name="seasonlimit">
+                    <?php
+                        echo '<option value="0"';
+                        if ($schedule->seasonlimit == 0) echo ' selected';
+                        echo '>' . t('Any Season') . '</option>';
+                        for ($i = 1; $i <= 25; $i++) {
+                            echo '<option value="' . $i . '"';
+                            if ($schedule->seasonlimit == $i) echo ' selected';
+                            echo '>' . t('Season') . ' ' . $i . '</option>';
+                        }
+                    ?>
+                    </select>
+                </dd>
                 <dt><?php echo t('Auto-flag commercials') ?>:</dt>
                 <dd><input type="checkbox" class="radio" name="autocommflag"<?php if ($schedule->autocommflag) echo ' CHECKED' ?> value="1" /></dd>
                 <dt><?php echo t('Auto-transcode') ?>:</dt>
Index: mythplugins/mythweb/modules/tv/tmpl/lite/schedules_manual.php
===================================================================
--- mythplugins/mythweb/modules/tv/tmpl/lite/schedules_manual.php	(revision 24996)
+++ mythplugins/mythweb/modules/tv/tmpl/lite/schedules_manual.php	(working copy)
@@ -157,6 +157,20 @@
                             echo ' SELECTED';
                         echo '>'.t('Subtitle then Description').'</option>';
                    ?></select></dd>
+                <dt><?php echo t('Season Limit'); ?>:</dt>
+                <dd><select name="seasonlimit">
+                    <?php
+                        echo '<option value="0"';
+                        if ($schedule->seasonlimit == 0) echo ' selected';
+                        echo '>' . t('Any Season') . '</option>';
+                        for ($i = 1; $i <= 25; $i++) {
+                            echo '<option value="' . $i . '"';
+                            if ($schedule->seasonlimit == $i) echo ' selected';
+                            echo '>' . t('Season') . ' ' . $i . '</option>';
+                        }
+                    ?>
+                    </select>
+                </dd>
                 <dt><?php echo t('Auto-flag commercials') ?>:</dt>
                 <dd><input type="checkbox" class="radio" name="autocommflag"<?php if ($schedule->autocommflag) echo ' CHECKED' ?> value="1" /></dd>
                 <dt><?php echo t('Auto-transcode') ?>:</dt>
Index: mythplugins/mythweb/modules/_shared/lang/English_GB.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/English_GB.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/English_GB.lang	(working copy)
@@ -84,6 +84,7 @@
 "Any Channel"
 "Any Program Type"
     Any Programme Type
+"Any Season"
 "Append"
 "Append to Current Playlist"
 "Are you sure you want to delete the following show?"
@@ -747,6 +748,7 @@
 "Searches"
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
 "Set Host"
Index: mythplugins/mythweb/modules/_shared/lang/Spanish.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Spanish.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Spanish.lang	(working copy)
@@ -149,6 +149,7 @@
     Cualquier Canal
 "Any Program Type"
     Cualquier Tipo de Programa
+"Any Season"
 "Append"
     Agregar
 "Append to Current Playlist"
@@ -1028,6 +1029,7 @@
     Búsquedas
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
 "Set Host"
Index: mythplugins/mythweb/modules/_shared/lang/Swedish.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Swedish.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Swedish.lang	(working copy)
@@ -153,6 +153,7 @@
     Alla kanaler
 "Any Program Type"
     Alla programtyper
+"Any Season"
 "Append"
     Lägg till slutet
 "Append to Current Playlist"
@@ -1223,6 +1224,7 @@
     Sökningar
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
     Serie ID
 "Server Statistics"
Index: mythplugins/mythweb/modules/_shared/lang/Dutch.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Dutch.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Dutch.lang	(working copy)
@@ -112,6 +112,7 @@
     Alle zenders
 "Any Program Type"
     Alle programmatypes
+"Any Season"
 "Append"
 "Append to Current Playlist"
 "Are you sure you want to delete the following show?"
@@ -919,6 +920,7 @@
     Zoekopdrachten
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
 "Set Host"
Index: mythplugins/mythweb/modules/_shared/lang/French_CA.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/French_CA.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/French_CA.lang	(working copy)
@@ -162,6 +162,7 @@
     Toute chaîne
 "Any Program Type"
     Tout type d'émission
+"Any Season"
 "Append"
     Ajouter
 "Append to Current Playlist"
@@ -1306,6 +1307,7 @@
     Les recherches seront effectuées sur le titre de toutes les émissions TV
 "Season"
     Saison
+"Season Limit"
 "Series ID"
     Identifiant de la série
 "Server Statistics"
Index: mythplugins/mythweb/modules/_shared/lang/Catalan.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Catalan.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Catalan.lang	(working copy)
@@ -119,6 +119,7 @@
     Qualsevol canal
 "Any Program Type"
     Qualsevol tipus de programa
+"Any Season"
 "Append"
 "Append to Current Playlist"
 "Are you sure you want to delete the following show?"
@@ -957,6 +958,7 @@
     Recerques
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
 "Set Host"
Index: mythplugins/mythweb/modules/_shared/lang/French.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/French.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/French.lang	(working copy)
@@ -162,6 +162,7 @@
     Toute chaîne
 "Any Program Type"
     Tout type de programme
+"Any Season"
 "Append"
     Ajouter
 "Append to Current Playlist"
@@ -1306,6 +1307,7 @@
     Les recherches seront effectuées sur le titre de tous les programmes TV
 "Season"
     Saison
+"Season Limit"
 "Series ID"
     Identifiant de la série
 "Server Statistics"
Index: mythplugins/mythweb/modules/_shared/lang/Danish.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Danish.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Danish.lang	(working copy)
@@ -161,6 +161,7 @@
     Alle kanaler
 "Any Program Type"
     Alle program typer
+"Any Season"
 "Append"
     Tilføj
 "Append to Current Playlist"
@@ -1295,6 +1296,7 @@
     Søgningen vil gennemgå alle titler på alle udsendelser
 "Season"
     Sæson
+"Season Limit"
 "Series ID"
     Serie ID
 "Server Statistics"
Index: mythplugins/mythweb/modules/_shared/lang/German.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/German.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/German.lang	(working copy)
@@ -154,6 +154,7 @@
     Jeder Sender
 "Any Program Type"
     Jeder Programmtyp
+"Any Season"
 "Append"
     Hinzufügen
 "Append to Current Playlist"
@@ -1229,6 +1230,7 @@
 "Searches will be performed against the title of all TV shows"
 "Season"
     Staffel
+"Season Limit"
 "Series ID"
     Serien-ID
 "Server Statistics"
Index: mythplugins/mythweb/modules/_shared/lang/Hungarian.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Hungarian.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Hungarian.lang	(working copy)
@@ -153,6 +153,7 @@
     Bármely csatorna
 "Any Program Type"
     Bármely program tipus
+"Any Season"
 "Append"
     Hozzáfűz
 "Append to Current Playlist"
@@ -1227,6 +1228,7 @@
     Keresőprofilok
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
     Sorozat ID
 "Server Statistics"
Index: mythplugins/mythweb/modules/_shared/lang/Japanese.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Japanese.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Japanese.lang	(working copy)
@@ -112,6 +112,7 @@
     いずれかのチャンネル
 "Any Program Type"
     いずれかのタイプ
+"Any Season"
 "Append"
 "Append to Current Playlist"
 "Are you sure you want to delete the following show?"
@@ -930,6 +931,7 @@
     サーチメニュー
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
 "Set Host"
Index: mythplugins/mythweb/modules/_shared/lang/English.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/English.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/English.lang	(working copy)
@@ -83,6 +83,7 @@
 "Any Category"
 "Any Channel"
 "Any Program Type"
+"Any Season"
 "Append"
 "Append to Current Playlist"
 "Are you sure you want to delete the following show?"
@@ -742,6 +743,7 @@
 "Searches"
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
 "Set Host"
Index: mythplugins/mythweb/modules/_shared/lang/Czech.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Czech.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Czech.lang	(working copy)
@@ -157,6 +157,7 @@
     Jakýkoli kanál
 "Any Program Type"
     Jakýkoli typ programu
+"Any Season"
 "Append"
     Připojit
 "Append to Current Playlist"
@@ -1063,6 +1064,7 @@
     Vyhledávání
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
 "Set Host"
Index: mythplugins/mythweb/modules/_shared/lang/Slovenian.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Slovenian.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Slovenian.lang	(working copy)
@@ -144,6 +144,7 @@
     Katerikoli kanal
 "Any Program Type"
     Katerikoli tip programa
+"Any Season"
 "Append"
     Dodaj
 "Append to Current Playlist"
@@ -1170,6 +1171,7 @@
     Iskanja
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
     Stratistike strežnika
Index: mythplugins/mythweb/modules/_shared/lang/Polish.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Polish.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Polish.lang	(working copy)
@@ -106,6 +106,7 @@
     Dowolny kanał
 "Any Program Type"
     Dowolny typ programu
+"Any Season"
 "Append"
 "Append to Current Playlist"
 "Are you sure you want to delete the following show?"
@@ -839,6 +840,7 @@
     Poszukiwania
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
 "Set Host"
Index: mythplugins/mythweb/modules/_shared/lang/Finnish.lang
===================================================================
--- mythplugins/mythweb/modules/_shared/lang/Finnish.lang	(revision 24996)
+++ mythplugins/mythweb/modules/_shared/lang/Finnish.lang	(working copy)
@@ -150,6 +150,7 @@
     Mikä tahansa kanava
 "Any Program Type"
     Mikä tahansa ohjelmatyyppi
+"Any Season"
 "Append"
     Kiinnitys
 "Append to Current Playlist"
@@ -1207,6 +1208,7 @@
     Haut
 "Searches will be performed against the title of all TV shows"
 "Season"
+"Season Limit"
 "Series ID"
 "Server Statistics"
     Serverin statistiikkaa
Index: mythplugins/mythweb/classes/MythBackend.php
===================================================================
--- mythplugins/mythweb/classes/MythBackend.php	(revision 24996)
+++ mythplugins/mythweb/classes/MythBackend.php	(working copy)
@@ -23,7 +23,7 @@
 // NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
 // the number of items in a ProgramInfo QStringList group used by
 // ProgramInfo::ToSringList and ProgramInfo::FromStringList.
-    static $program_line_number     = 41;
+    static $program_line_number     = 42;
 
     private $fp                     = null;
     private $connected              = false;
Index: mythplugins/mythweb/classes/MythTVProgram.php
===================================================================
--- mythplugins/mythweb/classes/MythTVProgram.php	(revision 24996)
+++ mythplugins/mythweb/classes/MythTVProgram.php	(working copy)
@@ -28,6 +28,7 @@
     public $rectype;
     public $dupin;
     public $dupmethod;
+    public $seasonlimit;
     public $recstartts;
     public $recendts;
     public $progflags;
Index: myththemes/Childish/schedule-ui.xml
===================================================================
--- myththemes/Childish/schedule-ui.xml	(revision 24996)
+++ myththemes/Childish/schedule-ui.xml	(working copy)
@@ -1655,17 +1655,22 @@
             <helptext></helptext>
         </buttonlist>
 
+        <buttonlist name="season" from="basewideselector">
+            <position>215,495</position>
+            <helptext></helptext>
+        </buttonlist>
+
         <checkbox name="ruleactive" from="basecheckbox">
-            <position>215,495</position>
+            <position>215,538</position>
         </checkbox>
 
         <textarea name="ruleactivelabel" from="basetextarea">
-            <area>260,495,300,30</area>
+            <area>260,538,300,30</area>
             <value>Recording Rule Active</value>
         </textarea>
 
         <button name="back" from="basesmallbutton">
-            <position>320,520</position>
+            <position>470,524</position>
             <value>Back</value>
         </button>
 
Index: myththemes/Arclight/schedule-ui.xml
===================================================================
--- myththemes/Arclight/schedule-ui.xml	(revision 24996)
+++ myththemes/Arclight/schedule-ui.xml	(working copy)
@@ -1881,12 +1881,23 @@
             <position>1396,684</position>
         </spinbox>
 
+        <textarea name="season_label" from="basetextarea">
+            <area>1140,752,250,30</area>
+            <align>right,vcenter</align>
+            <font>basesmall</font>
+            <value>Season Limit:</value>
+        </textarea>
+
+        <spinbox name="season" from="basewidespinbox">
+            <position>1396,744</position>
+        </spinbox>
+
         <checkbox name="ruleactive" from="basecheckbox">
-            <position>1426,794</position>
+            <position>1426,804</position>
         </checkbox>
 
         <textarea name="ruleactive_label" from="basetextarea">
-            <area>1473,798,450,30</area>
+            <area>1473,808,450,30</area>
             <align>left,vcenter</align>
             <font>basesmall</font>
             <value>Recording Rule is Active</value>
Index: myththemes/Mythbuntu/schedule-ui.xml
===================================================================
--- myththemes/Mythbuntu/schedule-ui.xml	(revision 24996)
+++ myththemes/Mythbuntu/schedule-ui.xml	(working copy)
@@ -1809,7 +1809,7 @@
         </textarea>
 
         <spinbox name="priority" from="basewidespinbox">
-            <position>377,310</position>
+            <position>377,290</position>
             <template type="negative">Reduce priority by %n</template>
             <template type="zero">Normal recording priority</template>
             <template type="positive">Raise priority by %n</template>
@@ -1817,12 +1817,12 @@
         </spinbox>
 
         <buttonlist name="input" from="basewideselector">
-            <position>377,355</position>
+            <position>377,335</position>
             <helptext></helptext>
         </buttonlist>
 
         <spinbox name="startoffset" from="basewidespinbox">
-            <position>377,400</position>
+            <position>377,380</position>
             <template type="negative">Start recording %n minute(s) late</template>
             <template type="zero">Start recording on time</template>
             <template type="positive">Start recording %n minute(s) early</template>
@@ -1830,7 +1830,7 @@
         </spinbox>
 
         <spinbox name="endoffset" from="basewidespinbox">
-            <position>377,445</position>
+            <position>377,425</position>
             <template type="negative">End recording %n minute(s) early</template>
             <template type="zero">End recording on time</template>
             <template type="positive">End recording %n minute(s) late</template>
@@ -1838,21 +1838,26 @@
         </spinbox>
 
         <buttonlist name="dupmethod" from="basewideselector">
-            <position>377,490</position>
+            <position>377,470</position>
             <helptext></helptext>
         </buttonlist>
 
         <buttonlist name="dupscope" from="basewideselector">
-            <position>377,535</position>
+            <position>377,515</position>
             <helptext></helptext>
         </buttonlist>
 
+        <buttonlist name="season" from="basewideselector">
+            <position>377,560</position>
+            <helptext></helptext>
+        </buttonlist>
+
         <checkbox name="ruleactive" from="basecheckbox">
-            <position>500,597</position>
+            <position>500,607</position>
         </checkbox>
 
         <textarea name="ruleactivelabel" from="basetextarea">
-            <area>550,592,300,30</area>
+            <area>550,602,300,30</area>
             <value>Recording Rule Active</value>
         </textarea>
 
Index: myththemes/Graphite/schedule-ui.xml
===================================================================
--- myththemes/Graphite/schedule-ui.xml	(revision 24996)
+++ myththemes/Graphite/schedule-ui.xml	(working copy)
@@ -1839,6 +1839,17 @@
             <helptext></helptext>
         </spinbox>
 
+        <textarea name="season_limit" from="basetextarea">
+            <area>20,443,180,30</area>
+            <align>right,vcenter</align>
+            <value>Season Limit:</value>
+        </textarea>
+
+        <buttonlist name="season" from="basewideselector">
+            <position>215,439</position>
+            <helptext></helptext>
+        </buttonlist>
+
         <textarea name="endoff" from="basetextarea">
             <area>655,309,180,30</area>
             <align>right,vcenter</align>
@@ -1876,16 +1887,16 @@
         </buttonlist>
 
         <checkbox name="ruleactive" from="basecheckbox">
-            <position>482,440</position>
+            <position>364,488</position>
         </checkbox>
 
         <textarea name="ruleactivelabel" from="basetextarea">
-            <area>517,442,300,30</area>
+            <area>396,490,300,30</area>
             <value>Recording Rule Active</value>
         </textarea>
 
         <button name="back" from="basebutton">
-            <position>565,480</position>
+            <position>700,486</position>
             <value>Back</value>
         </button>
     </window>
Index: mythtv/themes/MythCenter/schedule-ui.xml
===================================================================
--- mythtv/themes/MythCenter/schedule-ui.xml	(revision 24996)
+++ mythtv/themes/MythCenter/schedule-ui.xml	(working copy)
@@ -1784,12 +1784,17 @@
             <helptext></helptext>
         </buttonlist>
 
+        <buttonlist name="season" from="basewideselector">
+            <position>215,480</position>
+            <helptext></helptext>
+        </buttonlist>
+
         <checkbox name="ruleactive" from="basecheckbox">
-            <position>215,480</position>
+            <position>215,524</position>
         </checkbox>
 
         <textarea name="ruleactivelabel" from="basetextarea">
-            <area>260,487,300,30</area>
+            <area>260,530,300,30</area>
             <value>Recording Rule Active</value>
         </textarea>
 
Index: mythtv/themes/default/schedule-ui.xml
===================================================================
--- mythtv/themes/default/schedule-ui.xml	(revision 24996)
+++ mythtv/themes/default/schedule-ui.xml	(working copy)
@@ -1686,8 +1686,9 @@
             <multiline>yes</multiline>
             <template>%|"SUBTITLE|"% %LONGREPEAT%%STARS| %%DESCRIPTION%</template>
         </textarea>
+
         <spinbox name="priority" from="basewidespinbox">
-            <position>215,210</position>
+            <position>215,205</position>
             <template type="negative">Reduce priority by %n</template>
             <template type="zero">Normal recording priority</template>
             <template type="positive">Raise priority by %n</template>
@@ -1695,12 +1696,12 @@
         </spinbox>
 
         <buttonlist name="input" from="basewideselector">
-            <position>215,255</position>
+            <position>215,250</position>
             <helptext></helptext>
         </buttonlist>
 
         <spinbox name="startoffset" from="basewidespinbox">
-            <position>215,300</position>
+            <position>215,295</position>
             <template type="negative">Start recording %n minute(s) late</template>
             <template type="zero">Start recording on time</template>
             <template type="positive">Start recording %n minute(s) early</template>
@@ -1708,7 +1709,7 @@
         </spinbox>
 
         <spinbox name="endoffset" from="basewidespinbox">
-            <position>215,345</position>
+            <position>215,340</position>
             <template type="negative">End recording %n minute(s) early</template>
             <template type="zero">End recording on time</template>
             <template type="positive">End recording %n minute(s) late</template>
@@ -1716,26 +1717,31 @@
         </spinbox>
 
         <buttonlist name="dupmethod" from="basewideselector">
-            <position>215,390</position>
+            <position>215,385</position>
             <helptext></helptext>
         </buttonlist>
 
         <buttonlist name="dupscope" from="basewideselector">
-            <position>215,435</position>
+            <position>215,430</position>
             <helptext></helptext>
         </buttonlist>
 
+        <buttonlist name="season" from="basewideselector">
+            <position>215,475</position>
+            <helptext></helptext>
+        </buttonlist>
+
         <checkbox name="ruleactive" from="basecheckbox">
-            <position>215,480</position>
+            <position>215,520</position>
         </checkbox>
 
         <textarea name="ruleactivelabel" from="basetextarea">
-            <area>260,487,300,30</area>
+            <area>260,527,300,30</area>
             <value>Recording Rule Active</value>
         </textarea>
 
         <button name="back" from="basebutton">
-            <position>40,525</position>
+            <position>40,550</position>
             <value>Back</value>
         </button>
     </window>
Index: mythtv/themes/MythCenter-wide/schedule-ui.xml
===================================================================
--- mythtv/themes/MythCenter-wide/schedule-ui.xml	(revision 24996)
+++ mythtv/themes/MythCenter-wide/schedule-ui.xml	(working copy)
@@ -1854,17 +1854,22 @@
             <helptext></helptext>
         </buttonlist>
 
+        <buttonlist name="season" from="basewideselector">
+            <position>454,578</position>
+            <helptext></helptext>
+        </buttonlist>
+
         <checkbox name="ruleactive" from="basecheckbox">
-            <position>454,580</position>
+            <position>450,630</position>
         </checkbox>
 
         <textarea name="ruleactivelabel" from="basetextarea">
-            <area>500,582,300,30</area>
+            <area>495,632,300,30</area>
             <value>Recording Rule Active</value>
         </textarea>
 
         <button name="back" from="basebutton">
-            <position>590,644</position>
+            <position>805,628</position>
             <value>Back</value>
         </button>
     </window>
Index: mythtv/themes/default-wide/schedule-ui.xml
===================================================================
--- mythtv/themes/default-wide/schedule-ui.xml	(revision 24996)
+++ mythtv/themes/default-wide/schedule-ui.xml	(working copy)
@@ -1762,7 +1762,7 @@
         </textarea>
 
         <spinbox name="priority" from="basewidespinbox">
-            <position>455,310</position>
+            <position>455,305</position>
             <template type="negative">Reduce priority by %n</template>
             <template type="zero">Normal recording priority</template>
             <template type="positive">Raise priority by %n</template>
@@ -1770,12 +1770,12 @@
         </spinbox>
 
         <buttonlist name="input" from="basewideselector">
-            <position>455,355</position>
+            <position>455,350</position>
             <helptext></helptext>
         </buttonlist>
 
         <spinbox name="startoffset" from="basewidespinbox">
-            <position>455,400</position>
+            <position>455,395</position>
             <template type="negative">Start recording %n minute(s) late</template>
             <template type="zero">Start recording on time</template>
             <template type="positive">Start recording %n minute(s) early</template>
@@ -1783,7 +1783,7 @@
         </spinbox>
 
         <spinbox name="endoffset" from="basewidespinbox">
-            <position>455,445</position>
+            <position>455,440</position>
             <template type="negative">End recording %n minute(s) early</template>
             <template type="zero">End recording on time</template>
             <template type="positive">End recording %n minute(s) late</template>
@@ -1791,21 +1791,26 @@
         </spinbox>
 
         <buttonlist name="dupmethod" from="basewideselector">
-            <position>455,490</position>
+            <position>455,485</position>
             <helptext></helptext>
         </buttonlist>
 
         <buttonlist name="dupscope" from="basewideselector">
-            <position>455,535</position>
+            <position>455,530</position>
             <helptext></helptext>
         </buttonlist>
 
+        <buttonlist name="season" from="basewideselector">
+            <position>455,575</position>
+            <helptext></helptext>
+        </buttonlist>
+
         <checkbox name="ruleactive" from="basecheckbox">
-            <position>455,580</position>
+            <position>455,618</position>
         </checkbox>
 
         <textarea name="ruleactivelabel" from="basetextarea">
-            <area>500,583,300,30</area>
+            <area>500,621,300,30</area>
             <value>Recording Rule Active</value>
         </textarea>
 
Index: mythtv/themes/Terra/schedule-ui.xml
===================================================================
--- mythtv/themes/Terra/schedule-ui.xml	(revision 24996)
+++ mythtv/themes/Terra/schedule-ui.xml	(working copy)
@@ -1549,7 +1549,7 @@
         </textarea>
 
         <spinbox name="priority" from="basewidespinbox">
-            <position>40,160</position>
+            <position>40,100</position>
             <template type="negative">Reduce priority by %n</template>
             <template type="zero">Normal recording priority</template>
             <template type="positive">Raise priority by %n</template>
@@ -1557,12 +1557,12 @@
         </spinbox>
 
         <buttonlist name="input" from="basewideselector">
-            <position>40,220</position>
+            <position>40,160</position>
             <helptext></helptext>
         </buttonlist>
 
         <spinbox name="startoffset" from="basewidespinbox">
-            <position>40,280</position>
+            <position>40,220</position>
             <template type="negative">Start recording %n minute(s) late</template>
             <template type="zero">Start recording on time</template>
             <template type="positive">Start recording %n minute(s) early</template>
@@ -1570,7 +1570,7 @@
         </spinbox>
 
         <spinbox name="endoffset" from="basewidespinbox">
-            <position>40,340</position>
+            <position>40,280</position>
             <template type="negative">End recording %n minute(s) early</template>
             <template type="zero">End recording on time</template>
             <template type="positive">End recording %n minute(s) late</template>
@@ -1578,15 +1578,20 @@
         </spinbox>
 
         <buttonlist name="dupmethod" from="basewideselector">
-            <position>40,400</position>
+            <position>40,340</position>
             <helptext></helptext>
         </buttonlist>
 
         <buttonlist name="dupscope" from="basewideselector">
-            <position>40,460</position>
+            <position>40,400</position>
             <helptext></helptext>
         </buttonlist>
 
+		<buttonlist name="season" from="basewideselector">
+			<position>40,460</position>
+			<helptext></helptext>
+		</buttonlist>
+
         <checkbox name="ruleactive" from="basecheckbox">
             <position>154,520</position>
         </checkbox>
Index: mythtv/libs/libmythtv/dbcheck.cpp
===================================================================
--- mythtv/libs/libmythtv/dbcheck.cpp	(revision 24996)
+++ mythtv/libs/libmythtv/dbcheck.cpp	(working copy)
@@ -20,7 +20,7 @@
    mythtv/bindings/python/MythTV/MythStatic.py
 */
 /// This is the DB schema version expected by the running MythTV instance.
-const QString currentDatabaseVersion = "1259";
+const QString currentDatabaseVersion = "1260";
 
 static bool UpdateDBVersionNumber(const QString &newnumber);
 static bool performActualUpdate(
@@ -5340,7 +5340,21 @@
 
         dbver = "1259";
     }
+    
+    if (dbver == "1259")
+    {
+        const char *updates[] = {
+            "ALTER TABLE record ADD COLUMN seasonlimit TINYINT(3) UNSIGNED "
+            "DEFAULT 0 NOT NULL AFTER dupin;",
+            NULL
+        };
+        if (!performActualUpdate(updates, "1260", dbver)) {
+            return false;
+        }
 
+        dbver = "1260";
+    }
+
     return true;
 }
 
Index: mythtv/libs/libmythtv/recordinginfo.h
===================================================================
--- mythtv/libs/libmythtv/recordinginfo.h	(revision 24996)
+++ mythtv/libs/libmythtv/recordinginfo.h	(working copy)
@@ -95,6 +95,7 @@
         RecordingType rectype,
         RecordingDupInType dupin,
         RecordingDupMethodType dupmethod,
+        int seasonlimit,
 
         uint sourceid,
         uint inputid,
@@ -138,6 +139,7 @@
         RecordingType rectype,
         RecordingDupInType dupin,
         RecordingDupMethodType dupmethod,
+        int seasonlimit,
 
         uint findid);
 
Index: mythtv/libs/libmythtv/recordingrule.h
===================================================================
--- mythtv/libs/libmythtv/recordingrule.h	(revision 24996)
+++ mythtv/libs/libmythtv/recordingrule.h	(working copy)
@@ -86,6 +86,7 @@
     int m_prefInput;
     int m_startOffset;
     int m_endOffset;
+    int m_seasonLimit;
     RecordingDupMethodType m_dupMethod;
     RecordingDupInType m_dupIn;
 
Index: mythtv/libs/libmythtv/recordingrule.cpp
===================================================================
--- mythtv/libs/libmythtv/recordingrule.cpp	(revision 24996)
+++ mythtv/libs/libmythtv/recordingrule.cpp	(working copy)
@@ -31,6 +31,7 @@
     m_dupMethod(static_cast<RecordingDupMethodType>(
                 gCoreContext->GetNumSetting("prefDupMethod", kDupCheckSubDesc))),
     m_dupIn(kDupsInAll),
+    m_seasonLimit(0),
     m_recProfile(QObject::tr("Default")),
     m_recGroup("Default"),
     m_storageGroup("Default"),
@@ -66,7 +67,8 @@
     MSqlQuery query(MSqlQuery::InitCon());
     query.prepare("SELECT type, search, "
     "recpriority, prefinput, startoffset, endoffset, dupmethod, dupin, "
-    "inactive, profile, recgroup, storagegroup, playgroup, autoexpire, "
+    "seasonlimit, inactive, "
+    "profile, recgroup, storagegroup, playgroup, autoexpire, "
     "maxepisodes, maxnewest, autocommflag, autotranscode, transcoder, "
     "autouserjob1, autouserjob2, autouserjob3, autouserjob4, "
     "parentid, title, subtitle, description, category, "
@@ -95,48 +97,49 @@
         m_dupMethod = static_cast<RecordingDupMethodType>
                                                 (query.value(6).toInt());
         m_dupIn = static_cast<RecordingDupInType>(query.value(7).toInt());
-        m_isInactive = query.value(8).toBool();
+        m_seasonLimit = query.value(8).toInt();
+        m_isInactive = query.value(9).toBool();
         // Storage
-        m_recProfile = query.value(9).toString();
-        m_recGroup = query.value(10).toString();
-        m_storageGroup = query.value(11).toString();
-        m_playGroup = query.value(12).toString();
-        m_autoExpire = query.value(13).toBool();
-        m_maxEpisodes = query.value(14).toInt();
-        m_maxNewest = query.value(15).toBool();
+        m_recProfile = query.value(10).toString();
+        m_recGroup = query.value(11).toString();
+        m_storageGroup = query.value(12).toString();
+        m_playGroup = query.value(13).toString();
+        m_autoExpire = query.value(14).toBool();
+        m_maxEpisodes = query.value(15).toInt();
+        m_maxNewest = query.value(16).toBool();
         // Post Process
-        m_autoCommFlag = query.value(16).toBool();
-        m_autoTranscode = query.value(17).toBool();
-        m_transcoder = query.value(18).toInt();
-        m_autoUserJob1 = query.value(19).toBool();
-        m_autoUserJob2 = query.value(20).toBool();
-        m_autoUserJob3 = query.value(21).toBool();
-        m_autoUserJob4 = query.value(22).toBool();
+        m_autoCommFlag = query.value(17).toBool();
+        m_autoTranscode = query.value(18).toBool();
+        m_transcoder = query.value(19).toInt();
+        m_autoUserJob1 = query.value(20).toBool();
+        m_autoUserJob2 = query.value(21).toBool();
+        m_autoUserJob3 = query.value(22).toBool();
+        m_autoUserJob4 = query.value(23).toBool();
         // Original rule id for override rule
-        m_parentRecID = query.value(23).toInt();
+        m_parentRecID = query.value(24).toInt();
         // Recording metadata
-        m_title = query.value(24).toString();
-        m_subtitle = query.value(25).toString();
-        m_description = query.value(26).toString();
-        m_category = query.value(27).toString();
-        m_starttime = query.value(28).toTime();
-        m_startdate = query.value(29).toDate();
-        m_endtime = query.value(30).toTime();
-        m_enddate = query.value(31).toDate();
-        m_seriesid = query.value(32).toString();
-        m_programid = query.value(33).toString();
+        m_title = query.value(25).toString();
+        m_subtitle = query.value(26).toString();
+        m_description = query.value(27).toString();
+        m_category = query.value(28).toString();
+        m_starttime = query.value(29).toTime();
+        m_startdate = query.value(30).toDate();
+        m_endtime = query.value(31).toTime();
+        m_enddate = query.value(32).toDate();
+        m_seriesid = query.value(33).toString();
+        m_programid = query.value(34).toString();
         // Associated data for rule types
-        m_channelid = query.value(34).toInt();
-        m_station = query.value(35).toString();
-        m_findday = query.value(36).toInt();
-        m_findtime = query.value(37).toTime();
-        m_findid = query.value(38).toInt();
+        m_channelid = query.value(35).toInt();
+        m_station = query.value(36).toString();
+        m_findday = query.value(37).toInt();
+        m_findtime = query.value(38).toTime();
+        m_findid = query.value(39).toInt();
         // Statistic fields - Used to generate statistics about particular rules
         // and influence watch list weighting
-        m_nextRecording = query.value(39).toDateTime();
-        m_lastRecorded = query.value(40).toDateTime();
-        m_lastDeleted = query.value(41).toDateTime();
-        m_averageDelay = query.value(42).toInt();
+        m_nextRecording = query.value(40).toDateTime();
+        m_lastRecorded = query.value(41).toDateTime();
+        m_lastDeleted = query.value(42).toDateTime();
+        m_averageDelay = query.value(43).toInt();
 
         m_isOverride = (m_type == kOverrideRecord || m_type == kDontRecord);
     }
@@ -288,6 +291,7 @@
                     "recpriority = :RECPRIORITY, prefinput = :INPUT, "
                     "startoffset = :STARTOFFSET, endoffset = :ENDOFFSET, "
                     "dupmethod = :DUPMETHOD, dupin = :DUPIN, "
+                    "seasonlimit = :SEASONLIMIT, "
                     "inactive = :INACTIVE, profile = :RECPROFILE, "
                     "recgroup = :RECGROUP, storagegroup = :STORAGEGROUP, "
                     "playgroup = :PLAYGROUP, autoexpire = :AUTOEXPIRE, "
@@ -326,6 +330,7 @@
     query.bindValue(":ENDOFFSET", m_endOffset);
     query.bindValue(":DUPMETHOD", m_dupMethod);
     query.bindValue(":DUPIN", m_dupIn);
+    query.bindValue(":SEASONLIMIT", m_seasonLimit);
     query.bindValue(":INACTIVE", m_isInactive);
     query.bindValue(":RECPROFILE", m_recProfile);
     query.bindValue(":RECGROUP", m_recGroup);
Index: mythtv/libs/libmythtv/recordinginfo.cpp
===================================================================
--- mythtv/libs/libmythtv/recordinginfo.cpp	(revision 24996)
+++ mythtv/libs/libmythtv/recordinginfo.cpp	(working copy)
@@ -83,6 +83,7 @@
     RecordingType _rectype,
     RecordingDupInType _dupin,
     RecordingDupMethodType _dupmethod,
+    int _seasonlimit,
 
     uint _sourceid,
     uint _inputid,
@@ -133,6 +134,7 @@
     rectype = _rectype;
     dupin = _dupin;
     dupmethod = _dupmethod;
+    seasonlimit = _seasonlimit;
 
     sourceid = _sourceid;
     inputid = _inputid;
@@ -182,6 +184,7 @@
     RecordingType _rectype,
     RecordingDupInType _dupin,
     RecordingDupMethodType _dupmethod,
+    int _seasonlimit,
 
     uint _findid) :
     ProgramInfo(
@@ -202,6 +205,7 @@
     rectype = _rectype;
     dupin = _dupin;
     dupmethod = _dupmethod;
+    seasonlimit = _seasonlimit;
 
     findid = _findid;
 }
Index: mythtv/libs/libmyth/programinfo.h
===================================================================
--- mythtv/libs/libmyth/programinfo.h	(revision 24996)
+++ mythtv/libs/libmyth/programinfo.h	(working copy)
@@ -25,7 +25,7 @@
    mythtv/bindings/perl/MythTV/Program.pm
    mythtv/bindings/python/MythTV/MythData.py
 */
-#define NUMPROGRAMLINES 41
+#define NUMPROGRAMLINES 42
 
 class ProgramInfo;
 typedef AutoDeleteDeque<ProgramInfo*> ProgramList;
@@ -118,6 +118,7 @@
 
                 RecordingDupInType dupin,
                 RecordingDupMethodType dupmethod,
+                int seasonlimit,
 
                 uint findid,
 
@@ -651,6 +652,7 @@
     uint8_t rectype;
     uint8_t dupin;
     uint8_t dupmethod;
+    int32_t seasonlimit;
 
 // everything below this line is not serialized
     uint8_t availableStatus; // only used for playbackbox.cpp
Index: mythtv/libs/libmyth/programinfo.cpp
===================================================================
--- mythtv/libs/libmyth/programinfo.cpp	(revision 24996)
+++ mythtv/libs/libmyth/programinfo.cpp	(working copy)
@@ -60,7 +60,8 @@
     "       r.preserve,         r.cutlist,      r.autoexpire,      "//33-35
     "       r.editing,          r.bookmark,     r.watched,         "//36-38
     "       p.audioprop+0,      p.videoprop+0,  p.subtitletypes+0, "//39-41
-    "       r.findid,           rec.dupin,      rec.dupmethod      "//42-44
+    "       r.findid,           rec.dupin,      rec.dupmethod,     "//42-44
+    "       rec.seasonlimit                                        "//45
     "FROM recorded AS r "
     "LEFT JOIN channel AS c "
     "ON (r.chanid    = c.chanid) "
@@ -140,6 +141,7 @@
     rectype(kNotRecording),
     dupin(kDupsInAll),
     dupmethod(kDupCheckSubDesc),
+    seasonlimit(0),
 
     // everything below this line is not serialized
     availableStatus(asAvailable),
@@ -214,6 +216,7 @@
     rectype(other.rectype),
     dupin(other.dupin),
     dupmethod(other.dupmethod),
+    seasonlimit(other.seasonlimit),
 
     // everything below this line is not serialized
     availableStatus(other.availableStatus),
@@ -278,6 +281,7 @@
 
     RecordingDupInType _dupin,
     RecordingDupMethodType _dupmethod,
+    int _seasonlimit,
 
     uint _findid,
 
@@ -343,6 +347,7 @@
     rectype(kNotRecording),
     dupin(_dupin),
     dupmethod(_dupmethod),
+    seasonlimit(_seasonlimit),
 
     // everything below this line is not serialized
     availableStatus(asAvailable),
@@ -446,6 +451,7 @@
     rectype(_rectype),
     dupin(kDupsInAll),
     dupmethod(kDupCheckSubDesc),
+    seasonlimit(0),
 
     // everything below this line is not serialized
     availableStatus(asAvailable),
@@ -550,6 +556,7 @@
     rectype(_rectype),
     dupin(kDupsInAll),
     dupmethod(kDupCheckSubDesc),
+    seasonlimit(0),
 
     // everything below this line is not serialized
     availableStatus(asAvailable),
@@ -584,6 +591,7 @@
         inputid     = s.inputid;
         dupin       = s.dupin;
         dupmethod   = s.dupmethod;
+        seasonlimit = s.seasonlimit;
         findid      = s.findid;
 
         if (s.recstatus == rsWillRecord || s.recstatus == rsRecording)
@@ -683,6 +691,7 @@
     rectype(kNotRecording),
     dupin(kDupsInAll),
     dupmethod(kDupCheckSubDesc),
+    seasonlimit(0),
 
     // everything below this line is not serialized
     availableStatus(asAvailable),
@@ -905,6 +914,7 @@
     rectype = other.rectype;
     dupin = other.dupin;
     dupmethod = other.dupmethod;
+    seasonlimit = other.seasonlimit;
 
     sourceid = other.sourceid;
     inputid = other.inputid;
@@ -1004,6 +1014,7 @@
     rectype = kNotRecording;
     dupin = kDupsInAll;
     dupmethod = kDupCheckSubDesc;
+    seasonlimit = 0;
 
     sourceid = 0;
     inputid = 0;
@@ -1132,26 +1143,27 @@
     INT_TO_LIST(rectype);      // 20
     INT_TO_LIST(dupin);        // 21
     INT_TO_LIST(dupmethod);    // 22
-    DATETIME_TO_LIST(recstartts);//23
-    DATETIME_TO_LIST(recendts);// 24
-    INT_TO_LIST(programflags); // 25
-    STR_TO_LIST((!recgroup.isEmpty()) ? recgroup : "Default"); // 26
-    STR_TO_LIST(chanplaybackfilters); // 27
-    STR_TO_LIST(seriesid);     // 28
-    STR_TO_LIST(programid);    // 29
+    INT_TO_LIST(seasonlimit);  //23
+    DATETIME_TO_LIST(recstartts);//24
+    DATETIME_TO_LIST(recendts);// 25
+    INT_TO_LIST(programflags); // 26
+    STR_TO_LIST((!recgroup.isEmpty()) ? recgroup : "Default"); // 27
+    STR_TO_LIST(chanplaybackfilters); // 28
+    STR_TO_LIST(seriesid);     // 29
+    STR_TO_LIST(programid);    // 30
 
-    DATETIME_TO_LIST(lastmodified); // 30
-    FLOAT_TO_LIST(stars);           // 31
-    DATE_TO_LIST(originalAirDate);  // 32
-    STR_TO_LIST((!playgroup.isEmpty()) ? playgroup : "Default"); // 33
-    INT_TO_LIST(recpriority2);      // 34
-    INT_TO_LIST(parentid);          // 35
-    STR_TO_LIST((!storagegroup.isEmpty()) ? storagegroup : "Default"); // 36
-    INT_TO_LIST(GetAudioProperties()); // 37
-    INT_TO_LIST(GetVideoProperties()); // 38
-    INT_TO_LIST(GetSubtitleType());    // 39
+    DATETIME_TO_LIST(lastmodified); // 31
+    FLOAT_TO_LIST(stars);           // 32
+    DATE_TO_LIST(originalAirDate);  // 33
+    STR_TO_LIST((!playgroup.isEmpty()) ? playgroup : "Default"); // 34
+    INT_TO_LIST(recpriority2);      // 35
+    INT_TO_LIST(parentid);          // 36
+    STR_TO_LIST((!storagegroup.isEmpty()) ? storagegroup : "Default"); // 37
+    INT_TO_LIST(GetAudioProperties()); // 38
+    INT_TO_LIST(GetVideoProperties()); // 39
+    INT_TO_LIST(GetSubtitleType());    // 40
 
-    INT_TO_LIST(year);              // 40
+    INT_TO_LIST(year);              // 41
 /* do not forget to update the NUMPROGRAMLINES defines! */
 }
 
@@ -1224,28 +1236,29 @@
     ENUM_FROM_LIST(rectype, RecordingType);            // 20
     ENUM_FROM_LIST(dupin, RecordingDupInType);         // 21
     ENUM_FROM_LIST(dupmethod, RecordingDupMethodType); // 22
-    DATETIME_FROM_LIST(recstartts);   // 23
-    DATETIME_FROM_LIST(recendts);     // 24
-    INT_FROM_LIST(programflags);      // 25
-    STR_FROM_LIST(recgroup);          // 26
-    STR_FROM_LIST(chanplaybackfilters);//27
-    STR_FROM_LIST(seriesid);          // 28
-    STR_FROM_LIST(programid);         // 29
+    INT_FROM_LIST(seasonlimit);       // 23
+    DATETIME_FROM_LIST(recstartts);   // 24
+    DATETIME_FROM_LIST(recendts);     // 25
+    INT_FROM_LIST(programflags);      // 26
+    STR_FROM_LIST(recgroup);          // 27
+    STR_FROM_LIST(chanplaybackfilters);//28
+    STR_FROM_LIST(seriesid);          // 29
+    STR_FROM_LIST(programid);         // 30
 
-    DATETIME_FROM_LIST(lastmodified); // 30
-    FLOAT_FROM_LIST(stars);           // 31
-    DATE_FROM_LIST(originalAirDate);; // 32
-    STR_FROM_LIST(playgroup);         // 33
-    INT_FROM_LIST(recpriority2);      // 34
-    INT_FROM_LIST(parentid);          // 35
-    STR_FROM_LIST(storagegroup);      // 36
+    DATETIME_FROM_LIST(lastmodified); // 31
+    FLOAT_FROM_LIST(stars);           // 32
+    DATE_FROM_LIST(originalAirDate);; // 33
+    STR_FROM_LIST(playgroup);         // 34
+    INT_FROM_LIST(recpriority2);      // 35
+    INT_FROM_LIST(parentid);          // 36
+    STR_FROM_LIST(storagegroup);      // 37
     uint audioproperties, videoproperties, subtitleType;
-    INT_FROM_LIST(audioproperties);   // 37
-    INT_FROM_LIST(videoproperties);   // 38
-    INT_FROM_LIST(subtitleType);      // 39
+    INT_FROM_LIST(audioproperties);   // 38
+    INT_FROM_LIST(videoproperties);   // 39
+    INT_FROM_LIST(subtitleType);      // 40
     properties = (subtitleType<<11) | (videoproperties<<6) | audioproperties;
 
-    INT_FROM_LIST(year);              // 40
+    INT_FROM_LIST(year);              // 41
 
     if (!origChanid || !origRecstartts.isValid() ||
         (origChanid != chanid) || (origRecstartts != recstartts))
@@ -1419,6 +1432,13 @@
         {
             tmp_rec += ::toString(GetRecordingStatus(), GetRecordingRuleType());
         }
+        if (seasonlimit == 0)
+        {
+            tmp_rec += " - Any Season";
+        }
+        else {
+            tmp_rec += QString().sprintf(" - Season %d", seasonlimit);
+        }
     }
     progMap["rectypestatus"] = tmp_rec;
 
@@ -1675,6 +1695,7 @@
     /**///rectype;
     dupin        = RecordingDupInType(query.value(43).toInt());
     dupmethod    = RecordingDupMethodType(query.value(44).toInt());
+    seasonlimit  = query.value(45).toInt();
 
     // ancillary data -- begin
     set_flag(programflags, FL_CHANCOMMFREE,
@@ -4242,6 +4263,7 @@
 
                 RecordingDupInType(query.value(43).toInt()),
                 RecordingDupMethodType(query.value(44).toInt()),
+                query.value(45).toInt(),
 
                 query.value(42).toUInt(),
 
Index: mythtv/programs/mythfrontend/scheduleeditor.cpp
===================================================================
--- mythtv/programs/mythfrontend/scheduleeditor.cpp	(revision 24996)
+++ mythtv/programs/mythfrontend/scheduleeditor.cpp	(working copy)
@@ -453,7 +453,7 @@
             m_backButton(NULL),
             m_prioritySpin(NULL), m_inputList(NULL), m_startoffsetSpin(NULL),
             m_endoffsetSpin(NULL), m_dupmethodList(NULL), m_dupscopeList(NULL),
-            m_ruleactiveCheck(NULL)
+            m_seasonList(NULL), m_ruleactiveCheck(NULL)
 {
     if (recInfo)
         m_recInfo = new RecordingInfo(*recInfo);
@@ -476,6 +476,7 @@
     UIUtilE::Assign(this, m_endoffsetSpin, "endoffset", &err);
     UIUtilE::Assign(this, m_dupmethodList, "dupmethod", &err);
     UIUtilE::Assign(this, m_dupscopeList, "dupscope", &err);
+    UIUtilE::Assign(this, m_seasonList, "season", &err);
 
     UIUtilE::Assign(this, m_ruleactiveCheck, "ruleactive", &err);
 
@@ -596,6 +597,17 @@
     }
     m_dupscopeList->SetValueByData(ENUM_TO_QVARIANT(m_recordingRule->m_dupIn));
 
+    // Season limit
+    new MythUIButtonListItem(m_seasonList,
+                                tr("Any Season"),
+                                qVariantFromValue(0));
+    for (int i = 1; i <= 25; i++) {
+        new MythUIButtonListItem(m_seasonList,
+                                    tr("Season %1")
+                                    .arg(i), qVariantFromValue(i));
+    }
+    m_seasonList->SetValueByData(m_recordingRule->m_seasonLimit);
+
     // Active/Disabled
     m_ruleactiveCheck->SetCheckState(!m_recordingRule->m_isInactive);
 
@@ -642,6 +654,9 @@
     m_recordingRule->m_dupIn = static_cast<RecordingDupInType>
                                     (m_dupscopeList->GetDataValue().toInt());
 
+    // Season Limiting 
+    m_recordingRule->m_seasonLimit = m_seasonList->GetDataValue().toInt();
+
     // Active/Disabled
     m_recordingRule->m_isInactive = (!m_ruleactiveCheck->GetBooleanCheckState());
 }
Index: mythtv/programs/mythfrontend/scheduleeditor.h
===================================================================
--- mythtv/programs/mythfrontend/scheduleeditor.h	(revision 24996)
+++ mythtv/programs/mythfrontend/scheduleeditor.h	(working copy)
@@ -109,6 +109,7 @@
     MythUISpinBox *m_endoffsetSpin;
     MythUIButtonList *m_dupmethodList;
     MythUIButtonList *m_dupscopeList;
+    MythUIButtonList *m_seasonList;
 
     MythUICheckBox *m_ruleactiveCheck;
 };
Index: mythtv/programs/mythbackend/scheduler.cpp
===================================================================
--- mythtv/programs/mythbackend/scheduler.cpp	(revision 24996)
+++ mythtv/programs/mythbackend/scheduler.cpp	(working copy)
@@ -3324,13 +3324,20 @@
         "    p.subtitletypes+0, p.audioprop+0,   RECTABLE.storagegroup, "//39-41
         "    capturecard.hostname, recordmatch.oldrecstatus, "
         "                                           RECTABLE.avg_delay, "//42-44
+        "    RECTABLE.seasonlimit,                                      "//45
         + pwrpri + QString(
         "FROM recordmatch "
         "INNER JOIN RECTABLE ON (recordmatch.recordid = RECTABLE.recordid) "
         "INNER JOIN program AS p "
         "ON ( recordmatch.chanid    = p.chanid    AND "
         "     recordmatch.starttime = p.starttime AND "
-        "     recordmatch.manualid  = p.manualid ) "
+        "     recordmatch.manualid  = p.manualid  AND "
+        "     (RECTABLE.seasonlimit = 0 OR "
+        "       (p.syndicatedepisodenumber >= (RECTABLE.seasonlimit * 100) AND "
+        "        p.syndicatedepisodenumber < ((RECTABLE.seasonlimit + 1) * 100) "
+        "       )"
+        "     )"
+        "   )"
         "INNER JOIN channel AS c "
         "ON ( c.chanid = p.chanid ) "
         "INNER JOIN cardinput ON (c.sourceid = cardinput.sourceid) "
@@ -3411,6 +3418,7 @@
             RecordingType(result.value(16).toInt()),//rectype
             RecordingDupInType(result.value(13).toInt()),//dupin
             RecordingDupMethodType(result.value(22).toInt()),//dupmethod
+            result.value(45).toInt(), // seasonlimit
 
             result.value(1).toUInt(),//sourceid
             result.value(25).toUInt(),//inputid
@@ -3430,7 +3438,7 @@
 
         p->SetRecordingPriority(
             p->GetRecordingPriority() + recTypeRecPriorityMap[p->GetRecordingRuleType()] +
-            result.value(45).toInt() +
+            result.value(46).toInt() +
             ((autopriority) ?
              autopriority - (result.value(44).toInt() * autostrata / 200) : 0));
 
@@ -3547,7 +3555,8 @@
         "       RECTABLE.recordid,    RECTABLE.type,        " // 17,18
         "       RECTABLE.dupin,       RECTABLE.dupmethod,   " // 19,20
         "       RECTABLE.findid,                            " // 21
-        "       RECTABLE.startoffset, RECTABLE.endoffset    " // 22,23
+        "       RECTABLE.startoffset, RECTABLE.endoffset,   " // 22,23
+        "       RECTABLE.seasonlimit                        " // 24
         "FROM RECTABLE "
         "INNER JOIN channel ON (channel.chanid = RECTABLE.chanid) "
         "LEFT JOIN recordmatch on RECTABLE.recordid = recordmatch.recordid "
@@ -3656,6 +3665,7 @@
 
             RecordingDupInType(result.value(19).toInt()),
             RecordingDupMethodType(result.value(20).toInt()),
+            result.value(24).toInt(),
 
             result.value(21).toUInt());
 
@@ -3681,7 +3691,7 @@
         "       RECTABLE.enddate,     RECTABLE.endtime,     " // 15,16
         "       RECTABLE.recordid,    RECTABLE.type,        " // 17,18
         "       RECTABLE.dupin,       RECTABLE.dupmethod,   " // 19,20
-        "       RECTABLE.findid                             " // 21
+        "       RECTABLE.findid,      RECTABLE.seasonlimit  " // 21,22
         "FROM RECTABLE "
         "LEFT JOIN channel ON channel.callsign = RECTABLE.station "
         "GROUP BY recordid "
@@ -3743,6 +3753,7 @@
             result.value(17).toUInt(),   rectype,
             RecordingDupInType(result.value(19).toInt()),
             RecordingDupMethodType(result.value(20).toInt()),
+            result.value(22).toInt(),
 
             result.value(21).toUInt()));
     }
Index: mythtv/bindings/python/MythTV/MythStatic.py
===================================================================
--- mythtv/bindings/python/MythTV/MythStatic.py	(revision 24996)
+++ mythtv/bindings/python/MythTV/MythStatic.py	(working copy)
@@ -5,7 +5,7 @@
 """
 
 OWN_VERSION = (0,23,0,10)
-SCHEMA_VERSION = 1259
+SCHEMA_VERSION = 1260
 MVSCHEMA_VERSION = 1035
 NVSCHEMA_VERSION = 1007
 PROTO_VERSION = 57
Index: mythtv/bindings/python/MythTV/MythData.py
===================================================================
--- mythtv/bindings/python/MythTV/MythData.py	(revision 24996)
+++ mythtv/bindings/python/MythTV/MythData.py	(working copy)
@@ -501,13 +501,13 @@
                      'findid',       'hostname',     'sourceid',
                      'cardid',       'inputid',      'recpriority',
                      'recstatus',    'recordid',     'rectype',
-                     'dupin',        'dupmethod',    'recstartts',
-                     'recendts',     'programflags', 'recgroup',     
-                     'outputfilters','seriesid',     'programid',
-                     'lastmodified', 'stars',        'airdate',
-                     'playgroup',    'recpriority2', 'parentid',
-                     'storagegroup', 'audio_props',  'video_props',
-                     'subtitle_type','year']
+                     'dupin',        'dupmethod',    'seasonlimit',
+                     'recstartts',   'recendts',     'programflags',
+                     'recgroup',     'outputfilters','seriesid',
+                     'programid',    'lastmodified', 'stars',
+                     'airdate',      'playgroup',    'recpriority2',
+                     'parentid',     'storagegroup', 'audio_props',
+                     'video_props',  'subtitle_type','year']
     _field_type = [  3,      3,      3,
                      3,      0,      3,
                      3,      3,      3,
@@ -515,13 +515,14 @@
                      0,      3,      0,
                      0,      0,      0,
                      0,      0,      3,
-                     0,      0,      4,
-                     4,      3,      3,
-                     3,      3,      3,
-                     3,      1,      3,
-                     3,      0,      3,
-                     3,      0,      0,
-                     0,      0]
+                     0,      0,      0,
+                     4,      4,      3,      
+                     3,      3,      3,      
+                     3,      3,      1,      
+                     3,      3,      0,      
+                     3,      3,      0,      
+                     0,      0,      0]
+
     def __str__(self):
         return u"<Program '%s','%s' at %s>" % (self.title,
                  self.starttime.strftime('%Y-%m-%d %H:%M:%S'), hex(id(self)))
Index: mythtv/bindings/perl/MythTV.pm
===================================================================
--- mythtv/bindings/perl/MythTV.pm	(revision 24996)
+++ mythtv/bindings/perl/MythTV.pm	(working copy)
@@ -106,7 +106,7 @@
 # NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
 # the number of items in a ProgramInfo QStringList group used by
 # ProgramInfo::ToSringList and ProgramInfo::FromStringList.
-    our $NUMPROGRAMLINES = 41;
+    our $NUMPROGRAMLINES = 42;
 
 # Reasons a recording wouldn't be happening (from libs/libmythtv/programinfo.h)
     our %RecStatus_Types = (
Index: mythtv/bindings/perl/MythTV/Program.pm
===================================================================
--- mythtv/bindings/perl/MythTV/Program.pm	(revision 24996)
+++ mythtv/bindings/perl/MythTV/Program.pm	(working copy)
@@ -65,26 +65,27 @@
         $self->{'rectype'}         = $_[20]; # 20 rectype
         $self->{'dupin'}           = $_[21]; # 21 dupin
         $self->{'dupmethod'}       = $_[22]; # 22 dupmethod
-        $self->{'recstartts'}      = $_[23]; # 23 recstartts                ACTUAL start time (unix timestamp)
-        $self->{'recendts'}        = $_[24]; # 24 recendts                  ACTUAL end time (unix timestamp)
-        $self->{'progflags'}       = $_[25]; # 25 programflags
-        $self->{'recgroup'}        = $_[26]; # 26 recgroup
-        $self->{'outputfilters'}   = $_[27]; # 27 chanOutputFilters
-        $self->{'seriesid'}        = $_[28]; # 28 seriesid
-        $self->{'programid'}       = $_[29]; # 29 programid
+        $self->{'seasonlimit']     = $_[23]; # 23 seasonlimt
+        $self->{'recstartts'}      = $_[23]; # 24 recstartts                ACTUAL start time (unix timestamp)
+        $self->{'recendts'}        = $_[24]; # 25 recendts                  ACTUAL end time (unix timestamp)
+        $self->{'progflags'}       = $_[25]; # 26 programflags
+        $self->{'recgroup'}        = $_[26]; # 27 recgroup
+        $self->{'outputfilters'}   = $_[27]; # 28 chanOutputFilters
+        $self->{'seriesid'}        = $_[28]; # 29 seriesid
+        $self->{'programid'}       = $_[29]; # 30 programid
 
-        $self->{'lastmodified'}    = $_[30]; # 30 lastmodified
-        $self->{'stars'}           = $_[31]; # 31 stars
-        $self->{'airdate'}         = $_[32]; # 32 originalAirDate (ISO 8601 format)
-        $self->{'playgroup'}       = $_[33]; # 33 playgroup
-        $self->{'recpriority2'}    = $_[34]; # 34 recpriority2
-        $self->{'parentid'}        = $_[35]; # 35 parentid
-        $self->{'storagegroup'}    = $_[36]; # 36 storagegroup
-        $self->{'audio_props'}     = $_[37]; # 37 Audio properties
-        $self->{'video_props'}     = $_[38]; # 38 Video properties
-        $self->{'subtitle_type'}   = $_[39]; # 39 Subtitle type
+        $self->{'lastmodified'}    = $_[30]; # 31 lastmodified
+        $self->{'stars'}           = $_[31]; # 32 stars
+        $self->{'airdate'}         = $_[32]; # 33 originalAirDate (ISO 8601 format)
+        $self->{'playgroup'}       = $_[33]; # 34 playgroup
+        $self->{'recpriority2'}    = $_[34]; # 35 recpriority2
+        $self->{'parentid'}        = $_[35]; # 36 parentid
+        $self->{'storagegroup'}    = $_[36]; # 37 storagegroup
+        $self->{'audio_props'}     = $_[37]; # 38 Audio properties
+        $self->{'video_props'}     = $_[38]; # 39 Video properties
+        $self->{'subtitle_type'}   = $_[39]; # 40 Subtitle type
 
-        $self->{'year'}            = $_[40]; # 40 Production year
+        $self->{'year'}            = $_[40]; # 41 Production year
 
     # Load the channel data
         if ($self->{'chanid'}) {
@@ -156,26 +157,27 @@
                     $self->{'rectype'}        , # 20 rectype
                     $self->{'dupin'}          , # 21 dupin
                     $self->{'dupmethod'}      , # 22 dupmethod
-                    $self->{'recstartts'}     , # 23 recstartts
-                    $self->{'recendts'}       , # 24 recendts
-                    $self->{'progflags'}      , # 25 programflags
-                    $self->{'recgroup'}       , # 26 recgroup
-                    $self->{'outputfilters'}  , # 27 chanOutputFilters
-                    $self->{'seriesid'}       , # 28 seriesid
-                    $self->{'programid'}      , # 29 programid
+                    $sefl->{'seasonlimit'}    , # 23 seasonlimit
+                    $self->{'recstartts'}     , # 24 recstartts
+                    $self->{'recendts'}       , # 25 recendts
+                    $self->{'progflags'}      , # 26 programflags
+                    $self->{'recgroup'}       , # 27 recgroup
+                    $self->{'outputfilters'}  , # 28 chanOutputFilters
+                    $self->{'seriesid'}       , # 29 seriesid
+                    $self->{'programid'}      , # 30 programid
 
-                    $self->{'lastmodified'}   , # 30 lastmodified
-                    $self->{'stars'}          , # 31 stars
-                    $self->{'airdate'}        , # 32 originalAirDate
-                    $self->{'playgroup'}      , # 33 playgroup
-                    $self->{'recpriority2'}   , # 34 recpriority2
-                    $self->{'parentid'}       , # 35 parentid
-                    $self->{'storagegroup'}   , # 36 storagegroup
-                    $self->{'audio_props'}    , # 37 audio properties
-                    $self->{'video_props'}    , # 38 video properties
-                    $self->{'subtitle_type'}  , # 39 subtitle type
+                    $self->{'lastmodified'}   , # 31 lastmodified
+                    $self->{'stars'}          , # 32 stars
+                    $self->{'airdate'}        , # 33 originalAirDate
+                    $self->{'playgroup'}      , # 34 playgroup
+                    $self->{'recpriority2'}   , # 35 recpriority2
+                    $self->{'parentid'}       , # 36 parentid
+                    $self->{'storagegroup'}   , # 37 storagegroup
+                    $self->{'audio_props'}    , # 38 audio properties
+                    $self->{'video_props'}    , # 39 video properties
+                    $self->{'subtitle_type'}  , # 40 subtitle type
 
-                    $self->{'year'}           , # 40 production year
+                    $self->{'year'}           , # 41 production year
                     ''                          # trailing separator
                    );
     }
