commit bb9ea8d059cfc0bffae95bf11a1aad87221cd3e6 Author: limil Date: Sat Apr 19 12:21:13 2025 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5f06570 --- /dev/null +++ b/.gitignore @@ -0,0 +1,135 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.svclog +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml +*.azurePubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +packages/ +## TODO: If the tool you use requires repositories.config, also uncomment the next line +!packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +![Ss]tyle[Cc]op.targets +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml + +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +_NCrunch* + +.idea \ No newline at end of file diff --git a/BangumiRenamer.sln b/BangumiRenamer.sln new file mode 100644 index 0000000..431aa04 --- /dev/null +++ b/BangumiRenamer.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BangumiRenamer", "BangumiRenamer\BangumiRenamer.csproj", "{46889D6D-165B-4984-A4A6-D2589EE3BE27}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {46889D6D-165B-4984-A4A6-D2589EE3BE27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46889D6D-165B-4984-A4A6-D2589EE3BE27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46889D6D-165B-4984-A4A6-D2589EE3BE27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46889D6D-165B-4984-A4A6-D2589EE3BE27}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/BangumiRenamer/BangumiRenamer.csproj b/BangumiRenamer/BangumiRenamer.csproj new file mode 100644 index 0000000..dc36739 --- /dev/null +++ b/BangumiRenamer/BangumiRenamer.csproj @@ -0,0 +1,14 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + diff --git a/BangumiRenamer/Program.cs b/BangumiRenamer/Program.cs new file mode 100644 index 0000000..aff375d --- /dev/null +++ b/BangumiRenamer/Program.cs @@ -0,0 +1,7 @@ +using BangumiRenamer; + +var workspace = "C:/Users/15401/Proj/BangumiRenamer/PlayGround"; +Directory.SetCurrentDirectory(workspace); + +var tmdbHelper = new TMDbHelper(); +await tmdbHelper.SendRequest(); \ No newline at end of file diff --git a/BangumiRenamer/TMDbHelper.cs b/BangumiRenamer/TMDbHelper.cs new file mode 100644 index 0000000..9a9453d --- /dev/null +++ b/BangumiRenamer/TMDbHelper.cs @@ -0,0 +1,26 @@ +using System.Net; +using RestSharp; + +namespace BangumiRenamer; + +public class TMDbHelper +{ + private const string URL = "https://api.themoviedb.org/3/authentication"; + private const string APIKEY = "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI5OTExMDdhZjI1OTEzNTYyY2ZhMDY2MjJhNTI4NzNlMSIsIm5iZiI6MTcyMjY1MzY4My4xNjUsInN1YiI6IjY2YWQ5YmYzNTYzOGJjYmZmMWMwNWUzNiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.BWFxLMJoAPl3wXNi_Gszx97WIPhbca3K33ASwjx_EPk"; + + public async Task SendRequest() + { + var options = new RestClientOptions(URL) + { + Proxy = new WebProxy("http://127.0.0.1:7897") + }; + var client = new RestClient(options); + + var request = new RestRequest(""); + request.AddHeader("accept", "application/json"); + request.AddHeader("Authorization",$"Bearer {APIKEY}"); + var response = await client.GetAsync(request); + + Console.WriteLine("{0}", response.Content); + } +} \ No newline at end of file