private void AddMediaHeader(StringBuilder sb, M3uItem item) { string formatedDuration; string formatedTitle = null; formatedDuration = item.Duration.ToString(CultureInfo.InvariantCulture); if (!string.IsNullOrWhiteSpace(item.Title)) { formatedTitle = $", {item.Title}"; } sb.Append("#EXTINF:"); sb.Append(formatedDuration); sb.Append(formatedTitle); sb.Append(_newLine); }
private void AddMediaBody(StringBuilder sb, M3uItem item) { sb.Append(item.Path); sb.Append(_newLine); }
private void AddMedia(StringBuilder sb, M3uItem item) { AddMediaHeader(sb, item); AddMediaBody(sb, item); }