diff --git a/www/index.php b/www/index.php
index ca6febb..a2fac36 100755
--- a/www/index.php
+++ b/www/index.php
@@ -208,7 +208,7 @@ function get_permissions($settings)
}
# Print one row given the video details
-function print_video($video,$settings,$mobile)
+function print_video($video,$settings,$mobile,$show_seen)
{
$html = '
';
+ }
+ $html .= '
' . $default .'
@@ -300,9 +312,17 @@ function print_video($video,$settings,$mobile)
$html .= '
-
+ ';
+ if (isset($show_seen) && $show_seen && isset($video['seen']) && $video['seen']) {
+ $html .= '
+
+ *
';
+ } else {
+ $html .= '
- X
+ X
';
+ }
+ $html .= '
';
}
return $html;
@@ -560,6 +580,16 @@ if ( !$no_db && $reload && $permissions['writable'] ) {
$target = remove_arg($target,'rm');
}
+ # Mark one or all videos as played.
+ if (isset($args['unrm'])) {
+ if (preg_match("/^([^']{11})$/",urldecode($args['unrm']))) {
+ $debug_text .= "Restoring " . urldecode($args['unrm']) . "
";
+ $unrm = sql_escape(urldecode($args['unrm']));
+ $handle->query("UPDATE videos SET seen = 0 WHERE videoId = '$unrm'");
+ }
+ $target = remove_arg($target,'unrm');
+ }
+
# Update the refresh interval
if (isset($args['refresh'])) {
$interval = urldecode($args['refresh']);
@@ -911,7 +941,7 @@ if (isset($permissions['readable']) && $permissions['readable']) {
}
$header .= '
-
+
';
}
@@ -1128,7 +1158,7 @@ if (isset($permissions['readable']) && $permissions['readable']) {
';
if (isset($chan_filter)) {
@@ -1232,7 +1262,7 @@ if (isset($permissions['readable']) && $permissions['readable']) {
continue;
} else {
$row['channelThumbnail'] = $thumbnails[$row['channelId']];
- $body .= print_video($row,$settings,$mobile);
+ $body .= print_video($row,$settings,$mobile,$show_seen);
$x++;
}
}