[mythtv] 0.25 Parental controls, Trac #10388

Bill Meek keemllib at gmail.com
Sat Mar 3 22:18:14 UTC 2012


Commenting here since its not my ticket.

If the debug below is used, and the video screen is entered for the 1st time,
m_parental_level will = 0 and the video showlevels won't be tested. VideoPasswordLevel
is set to 1 in my DB.

videofilter.cpp:381 (matches_filter) - VideoFilterSettings. matches = 1, m_parental_level=0
... repeating for each video

After entering a new level (3), m_parental_level is set and videos above that level
aren't displayed.

videofilter.cpp:381 (matches_filter) - VideoFilterSettings. matches = 1, m_parental_level=3
videofilter.cpp:388 (matches_filter) - VideoFilterSettings. showlevel = 1
...

-- 
Bill

============================================================================

mythtv/programs/mythfrontend/videofilter.cpp
@@ -376,10 +376,16 @@ bool VideoFilterSettings::matches_filter(const VideoMetadata &mdata) const
          matches = (IsDefaultCoverFile(mdata.GetCoverFile()));
      }

+    LOG(VB_GENERAL, LOG_ERR, QString("VideoFilterSettings. matches = %1, m_parental_level=%2")
+                .arg(matches)
+                .arg(m_parental_level));
+
      if (matches && m_parental_level)
      {
          matches = ((mdata.GetShowLevel() != ParentalLevel::plNone) &&
                  (mdata.GetShowLevel() <= m_parental_level));
+        LOG(VB_GENERAL, LOG_ERR, QString("VideoFilterSettings. showlevel = %1")
+            .arg(mdata.GetShowLevel()));
      }


More information about the mythtv-dev mailing list