[mythtv] Re: [mythtv-commits] mythtv commits

Xavier Hervy maxpower44 at tiscali.fr
Tue May 25 04:39:15 EDT 2004


Dan Morphis wrote:
> thor wrote:
> 
>>  On Mon, 2004-05-24 at 17:44, Xavier Hervy wrote:
>>
>> > i'm not exacty aggree with this change. let me explain : Personnaly
>> > i use the browse flag to show/hide movie taht i already shown. But
>> > sometimes, sometimes i would show all the list of movie, sometimes
>> > only those i already shown and often only those i never shown.
>>
>>
>>  The browse-able flag predates your filter modifications. I noticed a
>>  few complaints from people saying, "I have flagged a file as not
>>  browsable, but it's still showing up in Browse mode".
>>
>>  I can change it back, but would be interested in other's opinions
>>  before doing so.
>>
>>  Anyone?
>>
>>  - thor
> 
> 
> I'm in favor if it sets the filter to by default exclude files marked as 
> not browseable.  When Xavier's patch went in, I spent a while hacking 
> and whacking to make it not show vidoes I had set as not browseable, 
> until someone mentioned pressing the menu key and setting the filter.
> 
> -dan

Thx to raply thor and dan
I agree whith you, when i make my patch i should set filter->browse to 
yes by default but i forget it.
I will explain exactly how i think it should work
By default filter->browse is now set to yes
if set to yes(1) only movie with browse flag to 1 is shown
if set to no(0) only movie with browse flag to 0 is shown
if set to all(-1) all movies are shown

then in the SQL query the good where clause is browse = %1 instead of 
browse >= %1

i send the patch to correct this, tell me what you think about that.

Xavier
-------------- next part --------------
? mythvideo/mythvideo/.globalsettings.cpp.swp
? mythvideo/mythvideo/.videobrowser.cpp.swp
Index: mythvideo/mythvideo/videobrowser.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/videobrowser.cpp,v
retrieving revision 1.31
diff -u -r1.31 videobrowser.cpp
--- mythvideo/mythvideo/videobrowser.cpp	22 May 2004 19:31:42 -0000	1.31
+++ mythvideo/mythvideo/videobrowser.cpp	25 May 2004 08:31:01 -0000
@@ -347,18 +347,14 @@
         while (query.next())
         {
             unsigned int idnum = query.value(0).toUInt();
-            bool is_browsable = query.value(1).toBool();
-            if(is_browsable)
+            myData = new Metadata();
+            myData->setID(idnum);
+            myData->fillDataFromID(db);
+            if (myData->ShowLevel() <= currentParentalLevel && myData->ShowLevel() != 0)
             {
-                myData = new Metadata();
-                myData->setID(idnum);
-                myData->fillDataFromID(db);
-                if (myData->ShowLevel() <= currentParentalLevel && myData->ShowLevel() != 0)
-                {
-                    m_list.append(*myData);
-                }
-                delete myData;
+                m_list.append(*myData);
             }
+            delete myData;
         }
     }
     updateML = false;
Index: mythvideo/mythvideo/videofilter.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/videofilter.cpp,v
retrieving revision 1.2
diff -u -r1.2 videofilter.cpp
--- mythvideo/mythvideo/videofilter.cpp	24 May 2004 01:19:11 -0000	1.2
+++ mythvideo/mythvideo/videofilter.cpp	25 May 2004 08:31:05 -0000
@@ -22,7 +22,7 @@
 		year = gContext->GetNumSetting("VideoDefaultYear",-1);
 		runtime = gContext->GetNumSetting("VideoDefaultRuntime",-2);
 		userrating = gContext->GetNumSetting("VideoDefaultUserrating",-1);
-		browse = gContext->GetNumSetting("VideoDefaultBrowse",-1);
+		browse = gContext->GetNumSetting("VideoDefaultBrowse",1);
 		orderby = gContext->GetNumSetting("VideoDefaultOrderby",0);
 	}else{
 		category = -1;
@@ -31,7 +31,7 @@
 		year = -1;
 		runtime = -2;
 		userrating = -1;
-		browse = -1;
+		browse = 1;
 		orderby = 0;
 
 	}
@@ -169,9 +169,9 @@
 			where = QString(" WHERE userrating >= %1").arg(userrating);
 	if (browse !=-1)
 		if (where)
-			where += QString(" AND browse >= %1").arg(browse);
+			where += QString(" AND browse = %1").arg(browse);
 		else 
-			where = QString(" WHERE browse >= %1").arg(browse);
+			where = QString(" WHERE browse = %1").arg(browse);
 return where;
 }
 


More information about the mythtv-dev mailing list