Skip to content

Commit

Permalink
Format code using latest CSharpier
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry08 committed Aug 20, 2024
1 parent 42f4a77 commit 659ba3f
Show file tree
Hide file tree
Showing 41 changed files with 102 additions and 109 deletions.
2 changes: 1 addition & 1 deletion Juro.Core/Models/Anime/AnimeSites.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ public enum AnimeSites
/// <summary>
/// Parses anime and information from Kaido.
/// </summary>
Kaido
Kaido,
}
2 changes: 1 addition & 1 deletion Juro.Core/Models/Anime/SubDub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ public enum SubDub
/// <summary>
/// Selects dub.
/// </summary>
Dub
Dub,
}
2 changes: 1 addition & 1 deletion Juro.Core/Models/AssemblyPluginType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ public enum AssemblyPluginType
Movie,
Manga,
Anime,
Novel
Novel,
}
2 changes: 1 addition & 1 deletion Juro.Core/Models/Manga/MediaStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public enum MediaStatus
Completed,
Ongoing,
Hiatus,
Cancelled
Cancelled,
}
2 changes: 1 addition & 1 deletion Juro.Core/Models/Movie/TvType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
public enum TvType
{
Movie,
TvSeries
TvSeries,
}
2 changes: 1 addition & 1 deletion Juro.Core/Models/SubtitleType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ public enum SubtitleType
{
VTT,
ASS,
SRT
SRT,
}
2 changes: 1 addition & 1 deletion Juro.Core/Models/Videos/StreamingServers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public enum StreamingServers
// same as vizcloud
MyCloud,
Filemoon,
VidStreaming
VidStreaming,
}
2 changes: 1 addition & 1 deletion Juro.Core/Models/Videos/VideoType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ public enum VideoType
Container,
M3u8,
Hls,
Dash
Dash,
}
2 changes: 1 addition & 1 deletion Juro.Core/Utils/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ internal static class StringExtensions
32,
33,
34,
35
35,
];

internal static int DigitOf(char c, int radix)
Expand Down
4 changes: 2 additions & 2 deletions Juro.Core/Utils/Unbaser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal class Unbaser(int @base)
[54] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR",
[62] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
[95] =
" !\\\"#\\$%&\\\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
" !\\\"#\\$%&\\\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",
};

public int Unbase(string value)
Expand All @@ -29,7 +29,7 @@ public int Unbase(string value)
> 62 => 95,
> 54 => 62,
> 52 => 54,
_ => 52
_ => 52,
};

var dict = _alphabet[selector]?.ToCharArray();
Expand Down
4 changes: 2 additions & 2 deletions Juro.Extractors/ALionsExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
{
Format = VideoType.M3u8,
VideoUrl = mediaUrl!,
Title = ServerName
}
Title = ServerName,
},
];
}
}
4 changes: 2 additions & 2 deletions Juro.Extractors/AWishExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
{
Format = VideoType.M3u8,
VideoUrl = mediaUrl,
Title = ServerName
}
Title = ServerName,
},
];
}
}
4 changes: 2 additions & 2 deletions Juro.Extractors/DoodExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Headers = new()
{
["User-Agent"] = "Juro",
["Referer"] = $"https://dood.{doodTld}"
}
["Referer"] = $"https://dood.{doodTld}",
},
}
);
}
Expand Down
2 changes: 1 addition & 1 deletion Juro.Extractors/FilemoonExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Format = VideoType.M3u8,
VideoUrl = masterUrl,
Resolution = "Multi Quality",
}
},
];
}
}
4 changes: 2 additions & 2 deletions Juro.Extractors/GogoCDNExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void AddSources(JsonArray array, bool backup)
Format = VideoType.M3u8,
VideoUrl = fileURL,
Resolution = "Multi Quality" + (backup ? " (Backup)" : ""),
Headers = new() { ["Referer"] = url, }
Headers = new() { ["Referer"] = url },
}
);
}
Expand All @@ -132,7 +132,7 @@ void AddSources(JsonArray array, bool backup)
Format = VideoType.Container,
VideoUrl = fileURL,
Resolution = label,
Headers = new() { ["Referer"] = url, }
Headers = new() { ["Referer"] = url },
}
);
}
Expand Down
6 changes: 3 additions & 3 deletions Juro.Extractors/KwikExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
headers = new Dictionary<string, string>()
{
{ "Referer", kwikLink },
{ "Cookie", cookies }
{ "Cookie", cookies },
};

var formContent = new FormUrlEncodedContent(
Expand Down Expand Up @@ -126,8 +126,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
{
VideoUrl = mp4Url,
Format = VideoType.Container,
FileType = "mp4"
}
FileType = "mp4",
},
];
}

Expand Down
4 changes: 2 additions & 2 deletions Juro.Extractors/MegaCloudExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Headers = headers,
Format = VideoType.M3u8,
Resolution = "Multi Quality",
Subtitles = subtitles
}
Subtitles = subtitles,
},
];
}

Expand Down
8 changes: 4 additions & 4 deletions Juro.Extractors/Mp4uploadExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Format = VideoType.Container,
VideoUrl = link!,
Resolution = "Default Quality",
Headers = headers
}
Headers = headers,
},
];
}

Expand All @@ -100,8 +100,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Format = VideoType.Container,
VideoUrl = videoUrl,
Resolution = "Default Quality",
Headers = headers
}
Headers = headers,
},
];
}
}
6 changes: 3 additions & 3 deletions Juro.Extractors/OkRuExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
{
Format = VideoType.M3u8,
VideoUrl = mediaUrl.Value,
Title = ServerName
Title = ServerName,
},
new()
{
Format = VideoType.Dash,
VideoUrl = mediaUrl.NextMatch().Value,
Title = ServerName
}
Title = ServerName,
},
];
}
}
4 changes: 2 additions & 2 deletions Juro.Extractors/RapidCloudExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Headers = headers,
Format = VideoType.M3u8,
Resolution = "Multi Quality",
Subtitles = subtitles
}
Subtitles = subtitles,
},
];
}

Expand Down
4 changes: 2 additions & 2 deletions Juro.Extractors/StreamSBExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Format = VideoType.M3u8,
VideoUrl = masterUrl,
Headers = headers,
Resolution = "Multi Quality"
}
Resolution = "Multi Quality",
},
];
}

Expand Down
4 changes: 2 additions & 2 deletions Juro.Extractors/StreamSBProExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Format = VideoType.M3u8,
VideoUrl = masterUrl,
Headers = headers,
Resolution = "Multi Quality"
}
Resolution = "Multi Quality",
},
];
}

Expand Down
2 changes: 1 addition & 1 deletion Juro.Extractors/StreamTapeExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
Format = VideoType.M3u8,
VideoUrl = vidUrl,
Resolution = "Multi Quality",
}
},
];
}
}
8 changes: 4 additions & 4 deletions Juro.Extractors/VidCloudExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
{
{ "X-Requested-With", "XMLHttpRequest" },
{ "Referer", url },
{ "User-Agent", Http.ChromeUserAgent() }
{ "User-Agent", Http.ChromeUserAgent() },
};

var response = await http.ExecuteAsync(
Expand Down Expand Up @@ -95,7 +95,7 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
.Select(track => new Subtitle()
{
Url = track!["file"]!.ToString(),
Language = track["label"]!.ToString()
Language = track["label"]!.ToString(),
})
.ToList();

Expand All @@ -110,9 +110,9 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
: source["type"]!.ToString().ToLower() switch
{
"hls" => VideoType.Hls,
_ => VideoType.Container
_ => VideoType.Container,
},
Subtitles = subtitles
Subtitles = subtitles,
})
.ToList();

Expand Down
4 changes: 2 additions & 2 deletions Juro.Extractors/VidStreamExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
{
Format = VideoType.M3u8,
VideoUrl = link,
Title = ServerName
}
Title = ServerName,
},
];
}

Expand Down
6 changes: 3 additions & 3 deletions Juro.Extractors/YourUploadExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async ValueTask<List<VideoSource>> ExtractAsync(

var headers = new Dictionary<string, string>()
{
["Referer"] = "https://www.yourupload.com/"
["Referer"] = "https://www.yourupload.com/",
};

var response = await http.ExecuteAsync(url, headers, cancellationToken);
Expand All @@ -86,8 +86,8 @@ public async ValueTask<List<VideoSource>> ExtractAsync(
VideoUrl = basicUrl,
Resolution = quality,
Headers = headers,
Title = $"{quality} - {ServerName}"
}
Title = $"{quality} - {ServerName}",
},
];
}
}
2 changes: 1 addition & 1 deletion Juro.Providers.Adult/Anime/AnimeBaseProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class AnimeBaseProvider(IHttpClientFactory httpClientFactory) : IVideoExt
"dood.wf" => new DoodExtractor(_httpClientFactory),
"ok.ru" => new OkRuExtractor(_httpClientFactory),
"streamlare.com" => null,
_ => null
_ => null,
};
}

Expand Down
10 changes: 5 additions & 5 deletions Juro.Providers.Adult/Anime/HentaiFF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public ValueTask<List<VideoSource>> ExtractAsync(

headers = new Dictionary<string, string>()
{
["Referer"] = "https://hentaistream.moe/"
["Referer"] = "https://hentaistream.moe/",
};

var list = new List<VideoSource>()
Expand All @@ -245,24 +245,24 @@ public ValueTask<List<VideoSource>> ExtractAsync(
VideoUrl = $"{link}x264.720p.mp4",
Resolution = "720p",
FileType = "MP4",
Headers = headers
Headers = headers,
},
new()
{
Format = VideoType.Container,
VideoUrl = $"{link}av1.1080p.webm",
Resolution = "1080p",
FileType = "WEBM",
Headers = headers
Headers = headers,
},
new()
{
Format = VideoType.Container,
VideoUrl = $"{link}av1.2160p.webm",
Resolution = "2160p",
FileType = "WEBM",
Headers = headers
}
Headers = headers,
},
};

return new ValueTask<List<VideoSource>>(list);
Expand Down
10 changes: 3 additions & 7 deletions Juro.Providers/Anime/AnimeBaseProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@ public class AnimeBaseProvider(IHttpClientFactory httpClientFactory) : IVideoExt
"streamtape.com" => new StreamTapeExtractor(_httpClientFactory),
"vidstream.pro" => new VidStreamExtractor(_httpClientFactory),
"mp4upload.com" => new Mp4uploadExtractor(_httpClientFactory),
"playtaku.net"
or "goone.pro"
or "embtaku.pro"
or "embtaku.com"
or "s3taku.com"
=> new GogoCDNExtractor(_httpClientFactory),
"playtaku.net" or "goone.pro" or "embtaku.pro" or "embtaku.com" or "s3taku.com" =>
new GogoCDNExtractor(_httpClientFactory),
"alions.pro" => new ALionsExtractor(_httpClientFactory),
"awish.pro" => new AWishExtractor(_httpClientFactory),
"dood.wf" => new DoodExtractor(_httpClientFactory),
"ok.ru" => new OkRuExtractor(_httpClientFactory),
"streamlare.com" => null,
_ => null
_ => null,
};
}

Expand Down
Loading

0 comments on commit 659ba3f

Please sign in to comment.