Class: FbTitleFormat | Spider Monkey Panel

## FbTitleFormat(expression)

#### new FbTitleFormat(expression)
`js/foo_spider_monkey_panel.js`, `line 2613`

  Performance note: if you use the same query frequently, try caching FbTitleFormat object (by storing it somewhere), instead of creating it every time.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `expression` | string |

### Methods

#### Eval(forceopt) → {string}
`js/foo_spider_monkey_panel.js`, `line 2627`

  Always use Eval when you want dynamic info such as %playback_time%, %bitrate% etc.
  FbTitleFormat#EvalWithMetadb(fb.GetNowplaying()) will not give the results you want.

  ##### Parameters:

  Name | Type | Attributes | Default | Description
  --- | --- | --- | --- | ---
  `force` | boolean | <optional> | false | If true, you can process text that doesn't contain title formatting even when foobar2000 isn't playing. When playing, you should always get a result.

  ##### Returns:

  string

  ##### Example

      let tfo = fb.TitleFormat("%artist%");
      console.log(tfo.Eval());

#### EvalWithMetadb(handle) → {string}
`js/foo_spider_monkey_panel.js`, `line 2637`

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `handle` | FbMetadbHandle |

  ##### Returns:

  string

  ##### Example

      let tfo = fb.TitleFormat("%artist%");
      console.log(tfo.EvalWithMetadb(fb.GetFocusItem()));

#### EvalWithMetadbs(handle_list) → {Array.<string>}
`js/foo_spider_monkey_panel.js`, `line 2649`

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `handle_list` | FbMetadbHandleList |

  ##### Returns:

  Array.<string>

  ##### Example

      let tfo = fb.TitleFormat("%artist%");
      let handle_list = fb.GetLibraryItems();
      let artists = tfo.EvalWithMetadbs(handle_list);
      console.log(handle_list.Count === artists.length); // should always be true!