private String getValue(BaseItemDto baseItemDto) {

    String val = baseItemDto.getSortName();

    if (tangible.DotNetToJavaStringHelper.isNullOrEmpty(val)) {
      val = baseItemDto.getName();
    }

    if (tangible.DotNetToJavaStringHelper.isNullOrEmpty(val)) {
      val = "";
    }

    return val;
  }
  private static boolean ValidateParameters() {
    // Validating CacheId

    AssemblyUsage.PrintLogo(cParam.getIsLogo());

    if (tangible.DotNetToJavaStringHelper.isNullOrEmpty(cParam.getCacheId())) {
      System.err.println("Error: Cache Name not specified");
      return false;
    }

    if (tangible.DotNetToJavaStringHelper.isNullOrEmpty(cParam.getClientNode())) {
      System.err.println("Error: Client Node not specified");
      return false;
    }

    return true;
  }
 public final java.util.ArrayList<String> GetAudioCodecs() {
   java.util.ArrayList<String> list = new java.util.ArrayList<String>();
   for (String i : ((getAudioCodec() != null) ? getAudioCodec() : "").split("[,]", -1)) {
     if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(i)) {
       list.add(i);
     }
   }
   return list;
 }
  private void handleIntent(Intent intent) {

    String json = intent.getStringExtra(SearchManager.EXTRA_DATA_KEY);

    if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(json)) {
      handleSearchSuggestionIntent(json);
    } else {
      handleStandardQueryIntent(intent);
    }
  }
  public final boolean getIsTextSubtitleStream() {
    if (getType() != MediaStreamType.Subtitle) {
      return false;
    }

    if (tangible.DotNetToJavaStringHelper.isNullOrEmpty(getCodec()) && !getIsExternal()) {
      return false;
    }

    return IsTextFormat(getCodec());
  }
  private void handleStandardQueryIntent(Intent intent) {
    String query = intent.getStringExtra(SearchManager.QUERY);

    if (tangible.DotNetToJavaStringHelper.isNullOrEmpty(query)) {
      return;
    }

    if (mActionBar != null) {
      mActionBar.setTitle("Search results for '" + query + "'");
    }

    SearchQuery searchQuery = new SearchQuery();
    searchQuery.setUserId(MainApplication.getInstance().API.getCurrentUserId());
    searchQuery.setSearchTerm(query);

    MainApplication.getInstance().API.GetSearchHintsAsync(searchQuery, new SearchResultsResponse());
  }
  public final String getDisplayTitle() {
    if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(getTitle())) {
      return getTitle();
    }

    if (getType() == MediaStreamType.Audio) {
      java.util.ArrayList<String> attributes = new java.util.ArrayList<String>();

      if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(getLanguage())) {
        attributes.add(StringHelper.FirstToUpper(getLanguage()));
      }
      if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(getCodec())
          && !StringHelper.EqualsIgnoreCase(getCodec(), "dca")) {
        attributes.add(AudioCodec.GetFriendlyName(getCodec()));
      } else if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(getProfile())
          && !StringHelper.EqualsIgnoreCase(getProfile(), "lc")) {
        attributes.add(getProfile());
      }

      if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(getChannelLayout())) {
        attributes.add(getChannelLayout());
      } else if (getChannels() != null) {
        attributes.add(StringHelper.ToStringCultureInvariant(getChannels()) + " ch");
      }

      String name = tangible.DotNetToJavaStringHelper.join(" ", attributes.toArray(new String[0]));

      if (getIsDefault()) {
        name += " (D)";
      }

      return name;
    }

    if (getType() == MediaStreamType.Subtitle) {
      java.util.ArrayList<String> attributes = new java.util.ArrayList<String>();

      if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(getLanguage())) {
        attributes.add(getLanguage());
      }
      if (!tangible.DotNetToJavaStringHelper.isNullOrEmpty(getCodec())) {
        attributes.add(getCodec());
      }

      String name = tangible.DotNetToJavaStringHelper.join(" ", attributes.toArray(new String[0]));

      if (getIsDefault()) {
        name += " (D)";
      }

      if (getIsForced()) {
        name += " (F)";
      }

      if (getIsExternal()) {
        name += " (EXT)";
      }

      return name;
    }

    if (getType() == MediaStreamType.Video) {}

    return null;
  }