예제 #1
0
        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);
        }
예제 #2
0
 private void AddMediaBody(StringBuilder sb, M3uItem item)
 {
     sb.Append(item.Path);
     sb.Append(_newLine);
 }
예제 #3
0
 private void AddMedia(StringBuilder sb, M3uItem item)
 {
     AddMediaHeader(sb, item);
     AddMediaBody(sb, item);
 }