Difference between revisions of "Recorded table"

From MythTV Official Wiki
Jump to: navigation, search
(Hacks)
(Hacks are bad. Hacks which directly modify tables are a cardinal sin)
Line 92: Line 92:
 
*'''recgroup''' is the name of the recording group this recording  belongs to.  This relates to the ''recgroup'' field of the [[recgrouppassword table]].
 
*'''recgroup''' is the name of the recording group this recording  belongs to.  This relates to the ''recgroup'' field of the [[recgrouppassword table]].
  
== Hacks ==
 
[[Category:Patches]]
 
If you want all bookmarked recordings to show up in the "Recording List" in their own category (say, '_Bookmarked'), you can use these mysql commands:
 
  
To update any shows already bookmarked:
 
 
<code><pre>UPDATE recorded
 
SET category = '_Bookmarked'
 
WHERE bookmark = 1;</pre></code>
 
 
and then, for all future bookmarks:
 
 
<code><pre>CREATE TRIGGER recorded_category BEFORE UPDATE ON recorded
 
FOR EACH ROW BEGIN
 
IF NEW.bookmark = 1 THEN
 
SET NEW.category = '_Bookmarked';
 
END IF;
 
END;</pre></code>
 
 
You then need to press M in Recording List, and Change Group View to show categories.
 
 
Or, if you dont like to use categories, then you might prefer prefixing the subtitle:
 
 
<code><pre>
 
DELIMITER //
 
 
DROP TRIGGER recorded_subtitle
 
//
 
 
--execute this step multiple times to strip of existing prefixes:
 
UPDATE recorded
 
SET subtitle = RIGHT(subtitle,LENGTH(subtitle)-1)
 
WHERE LEFT(subtitle,1)='!'
 
//
 
 
UPDATE recorded
 
SET subtitle = CONCAT('!',subtitle)
 
WHERE bookmark = 1
 
//
 
 
UPDATE recorded
 
SET subtitle = CONCAT('!',title)
 
WHERE subtitle = '!'
 
//
 
 
CREATE TRIGGER recorded_subtitle BEFORE UPDATE ON recorded
 
FOR EACH ROW BEGIN
 
IF NEW.bookmark = 1 AND LEFT(NEW.subtitle,1)<>'!' THEN
 
IF LENGTH(NEW.subtitle) = 0 THEN
 
SET NEW.subtitle = CONCAT('!',NEW.title);
 
ELSE
 
SET NEW.subtitle = CONCAT('!',NEW.subtitle);
 
END IF;
 
END IF;
 
END
 
//
 
 
DELIMITER ;</pre></code>
 
 
-- by [http://www.paulsjourney.com harvest316]
 
  
 
{{stub}}
 
{{stub}}
 
[[Category:DB Table]]
 
[[Category:DB Table]]

Revision as of 19:06, 10 October 2010

Important.png Note: The correct title of this article is recorded table. It appears incorrectly here due to technical restrictions.

The recorded table, lists programs which have already been recorded (or recorded and then transcoded) and are still available for viewing, translating the Internal Filenames into something safe for human consumption.

Table Description

Field name Type Null Key Default Extras
chanid int(10) unsigned PRI 0
starttime datetime PRI 0000-00-00 00:00:00
endtime datetime MUL 0000-00-00 00:00:00
title varchar(128) MUL
subtitle varchar(128)
description text
category varchar(64)
hostname varchar(255)
bookmark tinyint(1) 0
editing int(10) unsigned 0
cutlist tinyint(1) 0
autoexpire int(11) 0
commflagged int(10) unsigned 0
recgroup varchar(32) MUL Default
recordid int(11) YES MUL NULL
seriesid varchar(40) MUL
programid varchar(40) MUL
lastmodified timestamp MUL CURRENT_TIMESTAMP
filesize bigint(20) 0
stars float 0
previouslyshown tinyint(1) YES 0
originalairdate date YES NULL
preserve tinyint(1) 0
findid int(11) 0
deletepending tinyint(1) MUL 0
transcoder int(11) 0
timestretch float 1
recpriority int(11) 0
basename varchar(255)
progstart datetime 0000-00-00 00:00:00
progend datetime 0000-00-00 00:00:00
playgroup varchar(32) Default
profile varchar(32)
duplicate tinyint(1) 0
transcoded tinyint(1) 0
watched tinyint(4) 0
storagegroup varchar(32) Default

Fields

  • bookmark=1 indicates that there is a 'Position Saved' for this recording (ie: user pressed space during playback, or exited playback early).
  • commflagged contains status of the commercial flagging, values are defined in programinfo.h:
    • 0 = not flagged
    • 1 = flagging done
    • 2 = processing
    • 3 = commfree (channel)
  • recgroup is the name of the recording group this recording belongs to. This relates to the recgroup field of the recgrouppassword table.