- Thread starter
- #231
New build in first post.
In your log some scraper has issues with its database and is running amok.After the mentioned crash, I did a log collection (after crash)
I think that behaviour with the top bar is there since a log time. Can someone confirm?I found something new i think
If setting "Minimize to tray on GUI exit" is enabled, exiting MP is not working anymore from within the GUI (TOP-Bar or Shutdown Menu from Titan). If this setting is disabled, you can exit MP.
Regarding TV-Series:
DBOptions.cs
Code:private static readonly Object thisLock = new Object(); // put this where the rest of the private fields in the class are public static void LogOptions() { lock(thisLock) { foreach (string key in optionsCache.Keys) { // dont log private options if (!key.Equals(DBOption.cTraktPassword) && !key.Equals(DBOption.cOnlineUserID)) { MPTVSeriesLog.Write(string.Format("Option {0}: {1}", key, optionsCache[key].ToString()), MPTVSeriesLog.LogLevel.Debug); } } } }
publicstaticDBValueGetOptions(String property)
...
if(optionsCache.ContainsKey(convertedProperty))return optionsCache[convertedProperty];
public static DBValue GetOptions(String property)
{
try
{
// UpdateTable();
String convertedProperty = property;
DatabaseUtility.RemoveInvalidChars(ref convertedProperty);
if (optionsCache.ContainsKey(convertedProperty)) return optionsCache[convertedProperty];
string sqlQuery = "select value from options where property = '" + convertedProperty + "'";
SQLiteResultSet results = DBTVSeries.Execute(sqlQuery);
if (results.Rows.Count > 0)
{
string res = DatabaseUtility.Get(results, 0, "value");
lock(thisLock)
{
if(!optionsCache.ContainsKey(property))
optionsCache.Add(property, res);
}
return res;
}
}
catch (Exception ex)
{
MPTVSeriesLog.Write("An Error Occurred (" + ex.Message + ").");
}
return null;
}
public static bool SetOptions(String property, DBValue value)
{
try
{
// UpdateTable();
lock(thisLock)
{
if (!optionsCache.ContainsKey(property) || optionsCache[property] != value)
{
String convertedProperty = property;
String convertedvalue = value.ToString().Replace("'", "''");
String sqlQuery;
if (GetOptions(convertedProperty) == null)
sqlQuery = "insert into options (option_id, property, value) values(NULL, '" + convertedProperty + "', '" + convertedvalue + "')";
else
sqlQuery = "update options set value = '" + convertedvalue + "' where property = '" + convertedProperty + "'";
optionsCache[property] = value;
DBTVSeries.Execute(sqlQuery);
}
}
return true;
}
catch (Exception ex)
{
MPTVSeriesLog.Write("An Error Occurred (" + ex.Message + ").");
return false;
}
}
I think that behaviour with the top bar is there since a log time. Can someone confirm?I found something new i think
If setting "Minimize to tray on GUI exit" is enabled, exiting MP is not working anymore from within the GUI (TOP-Bar or Shutdown Menu from Titan). If this setting is disabled, you can exit MP.