From 242401a915eb2600f242af92c98cc9dc7190735c Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 9 Mar 2009 00:59:44 +0000 Subject: fix the update/add filters in the api and add them into artist and album --- lib/class/api.class.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'lib/class/api.class.php') diff --git a/lib/class/api.class.php b/lib/class/api.class.php index da4592e9..36c1c80c 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -53,13 +53,24 @@ class Api { // Check for a range, if no range default to gt if (strpos('/',$value)) { $elements = explode('/',$value); - Browse::set_filter('add_lt',$elements['1']); - Browse::set_filter('add_gt',$elements['0']); + Browse::set_filter('add_lt',strtotime($elements['1'])); + Browse::set_filter('add_gt',strtotime($elements['0'])); } else { - Browse::set_filter('add',strtotime($value)); + Browse::set_filter('add_gt',strtotime($value)); } break; + case 'update': + // Check for a range, if no range default to gt + if (strpos('/',$value)) { + $elements = explode('/',$value); + Browse::set_filter('update_lt',strtotime($elements['1'])); + Browse::set_filter('update_gt',strtotime($elements['0'])); + } + else { + Browse::set_filter('update_gt',strtotime($value)); + } + break; case 'alpha_match': Browse::set_filter('alpha_match',$value); break; -- cgit