2015-01-28 00:08:09 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
2015-05-19 22:38:18 +00:00
|
|
|
if {[lindex $argv 0] ne "-stop"} exit
|
|
|
|
|
2015-01-28 00:08:09 +00:00
|
|
|
source /mod/webif/lib/setup
|
|
|
|
require ts.class system.class
|
|
|
|
|
2015-05-19 22:38:18 +00:00
|
|
|
set file [lindex $argv 1]
|
2015-01-28 00:08:09 +00:00
|
|
|
set ts [ts fetch "$file.ts"]
|
|
|
|
set root [system mediaroot]
|
|
|
|
|
|
|
|
set dir [file dirname $file]
|
|
|
|
if {[string match "$root*" $dir]} {
|
|
|
|
set dir [string range $dir $([string length $root] + 1) end]
|
|
|
|
}
|
|
|
|
set ch [$ts get channel_name]
|
|
|
|
set dur [$ts duration]
|
|
|
|
set title [$ts get title]
|
|
|
|
|
2015-02-17 20:44:16 +00:00
|
|
|
system plog activity "Recorded: $dir/$title ($dur minutes - $ch)"
|
2015-01-28 00:08:09 +00:00
|
|
|
|