? libs/rec.itcl.save
Index: libs/rec.itcl
===================================================================
RCS file: /cvsroot/tivowebplus/TivoWebPlus/libs/rec.itcl,v
retrieving revision 1.16.2.38
diff -u -r1.16.2.38 rec.itcl
--- libs/rec.itcl 1 Apr 2009 00:55:33 -0000 1.16.2.38
+++ libs/rec.itcl 12 Jan 2013 05:57:33 -0000
@@ -265,31 +265,26 @@
return [join $ret ", "]
}
-proc recForm_EpTitle {{link 1}} {
- getRec {rec -Showing}
- if {![info exists ::rec(Episodic)]} {
- #~ getRec {Program Series Series Episodic}
- getRec {Series Episodic}
- }
- if { $::rec(Episodic)==0 } {
- set eptitle "Not an Episode"
- } else {
- #~ getRec {Program {EpisodeTitle EpisodeNum TmsId} Showing {PartIndex PartCount}}
- getRec {Program {EpisodeTitle EpisodeNum}}
- set eptitle $::rec(EpisodeTitle)
- if { $eptitle == "" } {
- set epnum [recForm_EpNum]
- if { $epnum != "" } {
- set eptitle "Episode $epnum"
+proc recForm_EpTitle {{link 1}} { ;# eliminate "not an episode" designation. DJL 6/10
+ getRec {Program EpisodeTitle}
+ set eptitle $::rec(EpisodeTitle)
+ if {$eptitle == ""} {
+ getRec {Program MovieYear}
+ if {$::rec(MovieYear) != ""} {
+ set eptitle "Movie"
+ } else {
+ getRec {Program Genre}
+ if {[regexp "125" $::rec(Genre)] } {
+ set eptitle "Special"
+ } elseif {[regexp "124" $::rec(Genre)] } {
+ set eptitle "Series"
} else {
- set eptitle "No Episode Title"
+ set eptitle "Single Episode"
}
}
- #~ if { $::rec(PartIndex) != "" } {
- #~ append eptitle " ($::rec(PartIndex)/$::rec(PartCount))"
- #~ }
}
if {$link} {
+ getRec {rec -Showing}
set eptitle [html_link /showing/$::rec(-Showing) $eptitle ""]
}
return $eptitle
@@ -302,14 +297,19 @@
return $s
}
-proc recForm_EpNum {{opt 0}} {
- if {![info exists ::rec(TmsId)]} {
- getRec {Program {EpisodeNum TmsId}}
- }
- set epnum ""
- if { [set epnum $::rec(EpisodeNum)] == "" } {
- if {[set tmsid $::rec(TmsId)] != ""} {
- regsub -all {^0+} [string range $tmsid [expr [string length $tmsid]-3] end] {} epnum
+proc recForm_EpNum {{opt 0}} { ;# added x\xx for episodic series. DJL 6/10
+ getRec {Series Episodic Showing {PartIndex PartCount}}
+ if {$::rec(Episodic) != "" && $::rec(PartIndex) != ""} {
+ set epnum "$::rec(PartIndex)\\$::rec(PartCount)"
+ } else {
+ if {![info exists ::rec(TmsId)]} {
+ getRec {Program {EpisodeNum TmsId}}
+ }
+ set epnum ""
+ if { [set epnum $::rec(EpisodeNum)] == "" } {
+ if {[set tmsid $::rec(TmsId)] != ""} {
+ regsub -all {^0+} [string range $tmsid [expr [string length $tmsid]-3] end] {} epnum
+ }
}
}
return $epnum
@@ -344,6 +344,27 @@
}
}
+proc recForm_Thumb {{link 1}} {
+ global images
+ getRec {Program -Series Series {ThumbData}}
+ set sid [lindex [split $::rec(-Series) /] 0]
+ set link "/thumbs/$sid"
+ set title [html_link $link "(No thumbs)"]
+ if { $::rec(ThumbData) != "" } {
+ set imagenum [get_thumbimage $::rec(ThumbData) 1]
+ if { [lindex $imagenum 0] >= 0} {
+ set imagef [lindex $images [lindex $imagenum 0]]
+ set thconf [lindex $imagenum 1]
+ if { $thconf > 0 } {
+ set title [html_link $link [img $imagef "Confidence: $thconf"]]
+ #set title "$imagef $thconf"
+ }
+ }
+ }
+
+ return $title
+}
+
proc recForm_TodoImage {{opt 0}} {
getRec {rec State}
if { $::rec(State)!=6} {
Index: modules/higuide.itcl
===================================================================
RCS file: /cvsroot/tivowebplus/TivoWebPlus/modules/higuide.itcl,v
retrieving revision 1.12.2.14
diff -u -r1.12.2.14 higuide.itcl
--- modules/higuide.itcl 24 Dec 2008 17:32:47 -0000 1.12.2.14
+++ modules/higuide.itcl 12 Jan 2013 05:57:33 -0000
@@ -409,7 +409,7 @@
if { $guide(op_showdes) == "on" } {
if { $description != "" } {
if { [string range $tmsid 0 1] == "EP" } {
- regsub -all {^0+} [string range $tmsid 8 11] {} shownumber
+ regsub -all {^0+} [string range $tmsid [expr [string length $tmsid]-3] end] {} shownumber
set des " - $description (ep#$shownumber)"
} else {
set des " - $description"
Index: modules/norerecord.itcl
===================================================================
RCS file: /cvsroot/tivowebplus/TivoWebPlus/modules/Attic/norerecord.itcl,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 norerecord.itcl
--- modules/norerecord.itcl 8 Dec 2009 01:59:16 -0000 1.1.2.5
+++ modules/norerecord.itcl 12 Jan 2013 05:57:33 -0000
@@ -161,7 +161,7 @@
# get episode number from tmsid if needed
if { $epnum == "" } {
if {[set tmsid [dbobj $prog get TmsId]] != ""} {
- regsub -all {^0+} [string range $tmsid 8 11] {} epnum
+ regsub -all {^0+} [string range $tmsid [expr [string length $tmsid]-3] end] {} epnum
}
}
}
Index: modules/rowformat.itcl
===================================================================
RCS file: /cvsroot/tivowebplus/TivoWebPlus/modules/rowformat.itcl,v
retrieving revision 1.4.2.16
diff -u -r1.4.2.16 rowformat.itcl
--- modules/rowformat.itcl 9 Mar 2008 02:22:49 -0000 1.4.2.16
+++ modules/rowformat.itcl 12 Jan 2013 05:57:33 -0000
@@ -88,6 +88,7 @@
puts $chan [tr "" [td "CallSign"][td "channel name"]]
puts $chan [tr "" [td "CallSign 1"][td "channel logo (if available)"]]
puts $chan [tr "" [td "TodoImage"][td "graphic showing availability w/link (slow)"]]
+ puts $chan [tr "" [td "Thumb"][td "Link to Thumbs for this series"]]
puts $chan [tr "" [td "NpImage"][td "graphic showing expiration info"]]
puts $chan [tr "" [td "EpTitle"][td "episode name w/link to showing"]]
puts $chan [tr "" [td "EpTitle 0"][td "episode name w/out link"]]
Index: modules/todofeed.itcl
===================================================================
RCS file: /cvsroot/tivowebplus/TivoWebPlus/modules/Attic/todofeed.itcl,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 todofeed.itcl
--- modules/todofeed.itcl 22 Nov 2008 09:12:24 -0000 1.1.2.1
+++ modules/todofeed.itcl 12 Jan 2013 05:57:33 -0000
@@ -38,7 +38,7 @@
}
set state [dbobj $rec get State]
set series [dbobj $program get Series]
- set desc [strim [dbobj $program get Description]]; if {$desc == ""} {set desc "No Description"}
+ set desc [string trim [strim [dbobj $program get Description]]]; if {$desc == ""} {set desc "No Description"}
if {$series != ""} {
set episodic [defaultval 1 [dbobj $series get Episodic]]
} else {
@@ -48,7 +48,7 @@
set episode [strim [dbobj $program get EpisodeTitle]]
} else {set episode ""}
if {$episode != ""} {set desc "Episode: \"$episode\"\\n$desc"}
- set start [expr [dbobj $showing get Date] * 86400 + [dbobj $showing get Time] + $::tzoffset]
+ set start [expr [dbobj $showing get Date] * 86400 + [dbobj $showing get Time]]
set end [expr [dbobj $showing get Duration] + $start]
append todo [list $title $desc $start $end $fsid] \n
}
@@ -61,15 +61,10 @@
foreach {rec} [split $todo \n] {
foreach {title desc start end fsid} $rec break
set link "http\://$::HTTP_HOST/showing/$fsid/12"
- lappend out "BEGIN:VEVENT\nUID:$fsid\nSUMMARY:$title\nLOCATION:$::hostname\nCATEGORIES:Recording\nDESCRIPTION:$desc\nDTSTART:[clock format $start -format "%Y%m%dT%H%M00"]\nDTEND:[clock format $end -format "%Y%m%dT%H%M00"]\nDTSTAMP:[clock format [clock seconds] -format "%Y%m%dT%H%M00"]\nURL:$link\nEND:VEVENT"
+ lappend out "BEGIN:VEVENT\nUID:$fsid\nSUMMARY:$title\nLOCATION:$::hostname\nCATEGORIES:Recording\nDESCRIPTION:$desc\nDTSTART:[clock format $start -format "%Y%m%dT%H%M00Z"]\nDTEND:[clock format $end -format "%Y%m%dT%H%M00Z"]\nDTSTAMP:[clock format [clock seconds] -format "%Y%m%dT%H%M00Z"]\nURL:$link\nEND:VEVENT"
}
- puts $chan "HTTP/1.1 200 OK"
- puts $chan "Last-Modified: [format "Date: %s GMT" [clock format [clock seconds] -format "%a, %d %b %Y %T" -gmt true]]"
- puts $chan "Content-Type:text/calendar"
- puts $chan "Accept-Ranges: bytes"
- puts $chan "Content-Length:[expr {[string length $out] + 2000}]"
- puts $chan "Connection:close"
- puts $chan ""
+
+ print_html_header_200 $chan "text/calendar" [clock seconds]
puts $chan "BEGIN:VCALENDAR\nMETHOD:PUBLISH\nVERSION:2.0\nPRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN"
puts $chan [join $out "\n"]
puts $chan "END:VCALENDAR"
@@ -80,4 +75,4 @@
puts $chan [html_start]
puts $chan [tag h3 "ToDo Feed"]
puts $chan "This module provides an iCal-formatted list of your scheduled recordings.
[html_link "/todofeed.ics" "You can save it as a file"] or, more usefully, add it as a subscribed calendar in Thunderbird or Outlook 2007.
To subscribe, point your calendar to: http\://$::HTTP_HOST/todofeed.ics"
-}
+}
Index: modules/ui_todo.itcl
===================================================================
RCS file: /cvsroot/tivowebplus/TivoWebPlus/modules/ui_todo.itcl,v
retrieving revision 1.12.2.21
diff -u -r1.12.2.21 ui_todo.itcl
--- modules/ui_todo.itcl 8 Jun 2009 20:07:52 -0000 1.12.2.21
+++ modules/ui_todo.itcl 12 Jan 2013 05:57:33 -0000
@@ -43,7 +43,7 @@
aproc preselect {
if {$path==""} {return 404}
- if {$path!="todo"} {throw "Insupported PreSelect page: $path"}
+ if {$path!="todo"} {throw "Unsupported PreSelect page: $path"}
#~ set rem 0
eval_env
set l $::dyncfg(PS_$path)