private string getFieldValue(IMJFileAutomation file, string field, bool formatted = true) { try { return(file.Get(field, formatted)); } catch (Exception ex) { Logger.Log(ex, "JRiverAPI.getFieldValue()"); } return("[JRiver Exception!]"); }
public string getFieldValue(int key, string field, bool formatted = true) { try { IMJFileAutomation file = jr.GetFileByKey(key); string value = file.Get(field, formatted); return(value); } catch (Exception ex) { Logger.Log(ex, "JRiverAPI.getFieldValue()"); } return("[JRiver Exception!]"); }
public Dictionary <string, string> getFieldValues(int key, List <string> fields, bool formatted = true) { Dictionary <string, string> values = new Dictionary <string, string>(); try { IMJFileAutomation file = jr.GetFileByKey(key); foreach (var f in fields) { values[f] = file.Get(f, formatted); } } catch (Exception ex) { Logger.Log(ex, "JRiverAPI.getFieldValue()"); } return(values); }
private bool setFieldValue(IMJFileAutomation file, string jrField, string value, bool isDisplayName = false) { try { if (isDisplayName) { FieldMap.TryGetValue(jrField.ToLower(), out jrField); } bool ok = file.Set(jrField, value); if (!ok) { if (file.Get(jrField, false) == value) { ok = true; } } return(ok); } catch { } return(false); }