public static void addLivestreamerOptions(ContextMenu m){
  if (enableLivestreamer) {
    String livestreamerMenu="Livestreamer";
    m.setSubMenuIcon(livestreamerMenu,ICON_COMMANDLINE);
    Matcher matcher=LIVESTREAMER_PATTERN.matcher(livestreamerQualities);
    boolean sep=false;
    while (matcher.find()) {
      String match=matcher.group();
      if (match.equals("|")) {
        sep=true;
      }
 else {
        if (sep) {
          m.addSeparator(livestreamerMenu);
        }
        m.addSubItem("livestreamerQ" + match,match,livestreamerMenu);
        sep=false;
      }
    }
  }
}

public static void addLivestreamerOptions ( ContextMenu m ) { if ( enableLivestreamer ) { String livestreamerMenu = "Livestreamer" ; m . setSubMenuIcon ( livestreamerMenu , ICON_COMMANDLINE ) ; Matcher matcher = LIVESTREAMER_PATTERN . matcher ( livestreamerQualities ) ; boolean sep = false ; while ( matcher . find ( ) ) { String match = matcher . group ( ) ; if ( match . equals ( "|" ) ) { sep = true ; } else { if ( sep ) { m . addSeparator ( livestreamerMenu ) ; } m . addSubItem ( "livestreamerQ" + match , match , livestreamerMenu ) ; sep = false ; } } } }
parses the livestreamer qualities setting and adds the defined qualities as menu items .
