Exemple #1
0
        private static string BuildExtraText(Include inc, int[]?toc, bool allMediaFormats, bool noStubs)
        {
            var sb = new StringBuilder();

            if (toc != null)
            {
                sb.Append((sb.Length == 0) ? '?' : '&').Append("toc=");
                for (var i = 0; i < toc.Length; ++i)
                {
                    if (i > 0)
                    {
                        sb.Append('+');
                    }
                    sb.Append(toc[i]);
                }
            }
            if (allMediaFormats)
            {
                sb.Append((sb.Length == 0) ? '?' : '&').Append("media-format=all");
            }
            if (noStubs)
            {
                sb.Append((sb.Length == 0) ? '?' : '&').Append("cdstubs=no");
            }
            Query.AddIncludeText(sb, inc);
            return(sb.ToString());
        }
Exemple #2
0
        private static string BuildExtraText(Include inc)
        {
            var sb = new StringBuilder();

            Query.AddIncludeText(sb, inc);
            return(sb.ToString());
        }
Exemple #3
0
        private static string BuildExtraText(Include inc, ReleaseStatus?status, ReleaseType?type = null)
        {
            var sb = new StringBuilder();

            Query.AddIncludeText(sb, inc);
            Query.AddReleaseFilter(sb, type, status);
            return(sb.ToString());
        }
Exemple #4
0
        private static string BuildExtraText(Include inc, Uri resource)
        {
            var sb = new StringBuilder();

            sb.Append("?resource=").Append(Uri.EscapeDataString(resource.ToString()));
            Query.AddIncludeText(sb, inc);
            return(sb.ToString());
        }
Exemple #5
0
        private static string BuildExtraText(Include inc, string query, ReleaseType?type = null, ReleaseStatus?status = null)
        {
            if (string.IsNullOrWhiteSpace(query))
            {
                throw new ArgumentException("A browse or search query must not be blank.", nameof(query));
            }
            var sb = new StringBuilder();

            sb.Append('?').Append(query);
            Query.AddIncludeText(sb, inc);
            Query.AddReleaseFilter(sb, type, status);
            return(sb.ToString());
        }