Skip to content
Permalink
Browse files

Master: Added a switch to force disable mediaInfo.

Needed to add an xml value in mediaportal.xml under general section: <entry name="mediainfoforcedisable">no</entry> if "yes" is set, MediaInfo will not be loaded only if DRR is disabled too.
  • Loading branch information...
Sebastiii committed Mar 1, 2019
1 parent a09565e commit 44775130cb5fff5ab0036ea02b6954e327e1ec35
Showing with 5 additions and 1 deletion.
  1. +5 −1 mediaportal/Core/Player/MediaInfoWrapper.cs
@@ -52,6 +52,8 @@ public class MediaInfoWrapper
private int _videoDuration = 0;
private bool _DVDenabled = false;
private bool _BDenabled = false;
private bool _mediaInfoForceDisable = false;
private bool _enabledDRR = false;
private string _ParseSpeed;

//Audio
@@ -107,6 +109,8 @@ public MediaInfoWrapper(string strFile)
{
_DVDenabled = xmlreader.GetValueAsBool("dvdplayer", "mediainfoused", false);
_BDenabled = xmlreader.GetValueAsBool("bdplayer", "mediainfoused", false);
_mediaInfoForceDisable = xmlreader.GetValueAsBool("general", "mediainfoforcedisable", false);
_enabledDRR = xmlreader.GetValueAsBool("general", "autochangerefreshrate", false);
_ParseSpeed = xmlreader.GetValueAsString("debug", "MediaInfoParsespeed", "0.3");
// fix delay introduced after 0.7.26: http://sourceforge.net/tracker/?func=detail&aid=3013548&group_id=86862&atid=581181
}
@@ -145,7 +149,7 @@ public MediaInfoWrapper(string strFile)
isDVD = false;

//currently mediainfo is only used for local video related material (if enabled)
if ((!isVideo && !isDVD) || (isDVD && !_DVDenabled) || (isDVD && _BDenabled))
if ((!isVideo && !isDVD) || (isDVD && !_DVDenabled) || (isDVD && _BDenabled) || (_mediaInfoForceDisable && !_enabledDRR))
{
Log.Debug("MediaInfoWrapper: isVideo:{0}, isDVD:{1}[enabled:{2}]", isVideo, isDVD, _DVDenabled);
Log.Debug("MediaInfoWrapper: disabled for this content");

0 comments on commit 4477513

Please sign in to comment.
You can’t perform that action at this time.