Hi,
I have pvr function usage scenario where user having 2000+ recordings and hasn't daily time to watch i.e. full recorded movie from week ago.
By this, movie is watched in multiple shorter sessions and for every session user has to find in his 2000+ recordings list this desired movie.
It will be good to have another entry in recording filters called i.e. "Recently watched", where MythTV will present list of recently watched recordings.
It will be nice to have possibility to define sort order: start with newest, start with oldest, start with mostly progressed, start with least progressed.
br
"Recently watched" recordings playback filter
Forum rules
Please be reasonable and positive with your feature requests, remember that all contributions to MythTV are by volunteers in their spare time. MythTV won't support piracy in any form, including torrents and use of soft cams, so to avoid embarrassment please do not ask.
* One suggestion per thread please. Do not post new suggestions in replies. *
Please be reasonable and positive with your feature requests, remember that all contributions to MythTV are by volunteers in their spare time. MythTV won't support piracy in any form, including torrents and use of soft cams, so to avoid embarrassment please do not ask.
* One suggestion per thread please. Do not post new suggestions in replies. *
Re: "Recently watched" recordings playback filter
Is there no filter to show recordings with bookmarks?
Re: "Recently watched" recordings playback filter
No there isn't, but it wouldn't be hard to add. I make no promises, but I'll try to keep this one in mind.
- dizygotheca
- Developer
- Posts: 267
- Joined: Wed Sep 03, 2014 9:02 am
Re: "Recently watched" recordings playback filter
I have a rather crude and dirty system which shows the last three recordings viewed when I press a key on the remote, but it isn't integrated with the menu system.
The system events are used to log things viewed, expired or deleted:
Playback started is set to: /use/bin/logwatched.sh P %FILE% %TITLE%
and Recording Expired to: /use/bin/logwatched.sh E %FILE% %TITLE%
I also have Recording deleted set to: /use/bin/logwatched.sh D %FILE% %TITLE%
but that's a development hangover!
logwatched.sh is this:
That creates a flat file with all three events in chronological order.
I then have the 'audio' key on my remote programmed in ~/.lirc/mythtv
That triggers a script notify.pl which puts a display on the screen.
Unfortunately, only the first three get shown!
Have fun
Phil
The system events are used to log things viewed, expired or deleted:
Playback started is set to: /use/bin/logwatched.sh P %FILE% %TITLE%
and Recording Expired to: /use/bin/logwatched.sh E %FILE% %TITLE%
I also have Recording deleted set to: /use/bin/logwatched.sh D %FILE% %TITLE%
but that's a development hangover!
logwatched.sh is this:
Code: Select all
#!/bin/bash
#log watched and delete system events
echo "$(date +%F" "%T);$1;$2;$3 $4 $5 $6 $7 $8 $9">>/var/log/mythtv/watch.log
I then have the 'audio' key on my remote programmed in ~/.lirc/mythtv
Code: Select all
begin
remote = mceusb
prog = irexec
button = KEY_AUDIO
config = /usr/bin/notify.pl 192.168.1.67
repeat = 0
delay = 0
end
Code: Select all
#!/usr/bin/perl -w
use strict;
#
# put message on frontend screen showing recently watched recordings.
# call with FE address
#
my %watched;
my $count=1;
open FH, "</var/log/mythtv/watch.log" or die;
while (<FH>){
chomp;
my ($date, $action, $file, @title)=split /;/, $_;
my $title=join (';', @title);
$title =~ s/\s+$//; #chop trailing spaces
($action eq 'E') || ($action eq 'P') || next;
$watched{$file}{date}=$date;
$watched{$file}{title}=$title;
$watched{$file}{sort}=$count++;
($action eq 'E') &&($watched{$file}{sort}=-1);
}
close FH;
my @sorted= sort {$watched{$b}{sort} <=> $watched{$a}{sort}} keys %watched;
#now pick out most recent
$count=0;
my @final;
while ($count<10){
$_=$sorted[$count++];
($watched{$_}{sort}<0) && last;
/_(\d{4})(\d{2})(\d{2})/;
push @final, "$1_$2_$3 $watched{$_}{title}";
}
#now print/display them
if (&interactive){
$_=join "\n", @final;
print "$_\n";
}else{
#only 3 get shown. ??
$_= "'" . join ("\n", @final) . "'";
system "mythutil --message --message_text $_ --timeout 5 --bcastaddr $1";
}
exit 0;
sub interactive {
return -t STDIN && -t STDOUT;
}
Have fun
Phil