forked from nilaoda/BBDown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,144 additions
and
950 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using static BBDown.Core.Entity.Entity; | ||
|
||
namespace BBDown.Core.Entity | ||
{ | ||
public class ParsedResult | ||
{ | ||
public string WebJsonString { get; set; } | ||
public List<Video> VideoTracks { get; set; } = new(); | ||
public List<Audio> AudioTracks { get; set; } = new(); | ||
public List<Audio> BackgroundAudioTracks { get; set; } = new(); | ||
public List<AudioMaterialInfo> RoleAudioList { get; set; } = new(); | ||
public List<ViewPoint> ExtraPoints { get; set; } = new(); | ||
// ⬇⬇⬇⬇⬇ FOR FLV ⬇⬇⬇⬇⬇ | ||
public List<string> Clips { get; set; } = new(); | ||
public List<string> Dfns { get; set; } = new(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using BBDown.Core.Fetcher; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace BBDown.Core | ||
{ | ||
public sealed class FetcherFactory | ||
{ | ||
private FetcherFactory() { } | ||
|
||
/// <summary> | ||
/// 根据不同场景获取不同的Info解析器 | ||
/// </summary> | ||
/// <param name="aidOri"></param> | ||
/// <returns>IFetcher</returns> | ||
public static IFetcher CreateFetcher(string aidOri, bool useIntlApi) | ||
{ | ||
IFetcher fetcher = new NormalInfoFetcher(); | ||
if (aidOri.StartsWith("cheese")) | ||
{ | ||
fetcher = new CheeseInfoFetcher(); | ||
} | ||
else if (aidOri.StartsWith("ep")) | ||
{ | ||
fetcher = useIntlApi ? new IntlBangumiInfoFetcher() : new BangumiInfoFetcher(); | ||
} | ||
else if (aidOri.StartsWith("mid")) | ||
{ | ||
fetcher = new SpaceVideoFetcher(); | ||
} | ||
else if (aidOri.StartsWith("listBizId")) | ||
{ | ||
fetcher = new MediaListFetcher(); | ||
} | ||
else if (aidOri.StartsWith("seriesBizId")) | ||
{ | ||
fetcher = new SeriesListFetcher(); | ||
} | ||
else if (aidOri.StartsWith("favId")) | ||
{ | ||
fetcher = new FavListFetcher(); | ||
} | ||
return fetcher; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.