├── .editorconfig
├── .gitattributes
├── .gitignore
├── README.md
├── SpotifyWPF.MSIX
├── Images
│ ├── LargeTile.scale-100.png
│ ├── LargeTile.scale-125.png
│ ├── LargeTile.scale-150.png
│ ├── LargeTile.scale-200.png
│ ├── LargeTile.scale-400.png
│ ├── LockScreenLogo.scale-200.png
│ ├── SmallTile.scale-100.png
│ ├── SmallTile.scale-125.png
│ ├── SmallTile.scale-150.png
│ ├── SmallTile.scale-200.png
│ ├── SmallTile.scale-400.png
│ ├── SplashScreen.scale-100.png
│ ├── SplashScreen.scale-125.png
│ ├── SplashScreen.scale-150.png
│ ├── SplashScreen.scale-200.png
│ ├── SplashScreen.scale-400.png
│ ├── Square150x150Logo.scale-100.png
│ ├── Square150x150Logo.scale-125.png
│ ├── Square150x150Logo.scale-150.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square150x150Logo.scale-400.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png
│ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png
│ ├── Square44x44Logo.altform-unplated_targetsize-16.png
│ ├── Square44x44Logo.altform-unplated_targetsize-256.png
│ ├── Square44x44Logo.altform-unplated_targetsize-32.png
│ ├── Square44x44Logo.altform-unplated_targetsize-48.png
│ ├── Square44x44Logo.scale-100.png
│ ├── Square44x44Logo.scale-125.png
│ ├── Square44x44Logo.scale-150.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.scale-400.png
│ ├── Square44x44Logo.targetsize-16.png
│ ├── Square44x44Logo.targetsize-24.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── Square44x44Logo.targetsize-256.png
│ ├── Square44x44Logo.targetsize-32.png
│ ├── Square44x44Logo.targetsize-48.png
│ ├── StoreLogo.backup.png
│ ├── StoreLogo.scale-100.png
│ ├── StoreLogo.scale-125.png
│ ├── StoreLogo.scale-150.png
│ ├── StoreLogo.scale-200.png
│ ├── StoreLogo.scale-400.png
│ ├── Wide310x150Logo.scale-100.png
│ ├── Wide310x150Logo.scale-125.png
│ ├── Wide310x150Logo.scale-150.png
│ ├── Wide310x150Logo.scale-200.png
│ └── Wide310x150Logo.scale-400.png
├── Package.appinstaller
├── Package.appxmanifest
└── SpotifyWPF.MSIX.wapproj
├── SpotifyWPF.sln
├── SpotifyWPF
├── App.config
├── App.xaml
├── App.xaml.cs
├── Converter
│ ├── ArtistsToStringConverter.cs
│ ├── RadioButtonStringConverter.cs
│ └── StringListToStringConverter.cs
├── Model
│ ├── AutoMapperConfiguration.cs
│ └── Track.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Service
│ ├── ISettingsProvider.cs
│ ├── ISpotify.cs
│ ├── MessageBoxes.cs
│ ├── SettingsProvider.cs
│ └── Spotify.cs
├── SpotifyWPF.csproj
├── View
│ ├── ArtistsAlbumsTracks.xaml.cs
│ ├── Component
│ │ ├── AlbumsDataGrid.xaml
│ │ ├── AlbumsDataGrid.xaml.cs
│ │ ├── ArtistsDataGrid.xaml
│ │ ├── ArtistsDataGrid.xaml.cs
│ │ ├── PlaylistsDataGrid.xaml
│ │ ├── PlaylistsDataGrid.xaml.cs
│ │ ├── TracksDataGrid.xaml
│ │ └── TracksDataGrid.xaml.cs
│ ├── Extension
│ │ ├── DataGridExtensions.cs
│ │ └── UIHelper.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ └── Page
│ │ ├── LoginPage.xaml
│ │ ├── LoginPage.xaml.cs
│ │ ├── PlaylistsPage.xaml
│ │ ├── PlaylistsPage.xaml.cs
│ │ ├── SearchPage.xaml
│ │ └── SearchPage.xaml.cs
├── ViewModel
│ ├── Component
│ │ ├── AlbumsDataGridViewModel.cs
│ │ ├── ArtistsDataGridViewModel.cs
│ │ ├── MenuItemViewModel.cs
│ │ ├── PlaylistsDataGridViewModel.cs
│ │ └── TracksDataGridViewModel.cs
│ ├── DataGridViewModelBase.cs
│ ├── MainViewModel.cs
│ ├── MessageType.cs
│ ├── Page
│ │ ├── LoginPageViewModel.cs
│ │ ├── PlaylistsPageViewModel.cs
│ │ └── SearchPageViewModel.cs
│ └── ViewModelLocator.cs
├── icon.ico
├── packages.config
└── publish
│ ├── Application Files
│ ├── SpotifyWPF_1_0_0_0
│ │ ├── AutoMapper.dll.deploy
│ │ ├── CommonServiceLocator.dll.deploy
│ │ ├── GalaSoft.MvvmLight.Extras.dll.deploy
│ │ ├── GalaSoft.MvvmLight.Platform.dll.deploy
│ │ ├── GalaSoft.MvvmLight.dll.deploy
│ │ ├── Newtonsoft.Json.dll.deploy
│ │ ├── SpotifyAPI.Web.Auth.dll.deploy
│ │ ├── SpotifyAPI.Web.dll.deploy
│ │ ├── SpotifyWPF.application
│ │ ├── SpotifyWPF.exe.config.deploy
│ │ ├── SpotifyWPF.exe.deploy
│ │ ├── SpotifyWPF.exe.manifest
│ │ ├── System.Windows.Interactivity.dll.deploy
│ │ ├── Unosquare.Labs.EmbedIO.dll.deploy
│ │ ├── Unosquare.Swan.Lite.dll.deploy
│ │ └── icon.ico.deploy
│ └── SpotifyWPF_1_0_0_1
│ │ ├── AutoMapper.dll.deploy
│ │ ├── CommonServiceLocator.dll.deploy
│ │ ├── GalaSoft.MvvmLight.Extras.dll.deploy
│ │ ├── GalaSoft.MvvmLight.Platform.dll.deploy
│ │ ├── GalaSoft.MvvmLight.dll.deploy
│ │ ├── Newtonsoft.Json.dll.deploy
│ │ ├── SpotifyAPI.Web.Auth.dll.deploy
│ │ ├── SpotifyAPI.Web.dll.deploy
│ │ ├── SpotifyWPF.application
│ │ ├── SpotifyWPF.exe.config.deploy
│ │ ├── SpotifyWPF.exe.deploy
│ │ ├── SpotifyWPF.exe.manifest
│ │ ├── System.Windows.Interactivity.dll.deploy
│ │ ├── Unosquare.Labs.EmbedIO.dll.deploy
│ │ ├── Unosquare.Swan.Lite.dll.deploy
│ │ └── icon.ico.deploy
│ ├── SpotifyWPF.application
│ └── setup.exe
└── azure-pipelines.yml
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.cs]
2 |
3 | # CS0618: Type or member is obsolete
4 | dotnet_diagnostic.CS0618.severity = none
5 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
65 | *.manifest binary
66 | *.application binary
67 | *.deploy binary
68 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Dd]ebugPublic/
19 | [Rr]elease/
20 | [Rr]eleases/
21 | x64/
22 | x86/
23 | [Aa][Rr][Mm]/
24 | [Aa][Rr][Mm]64/
25 | bld/
26 | [Bb]in/
27 | [Oo]bj/
28 | [Ll]og/
29 |
30 | # Visual Studio 2015/2017 cache/options directory
31 | .vs/
32 | # Uncomment if you have tasks that create the project's static files in wwwroot
33 | #wwwroot/
34 |
35 | # Visual Studio 2017 auto generated files
36 | Generated\ Files/
37 |
38 | # MSTest test Results
39 | [Tt]est[Rr]esult*/
40 | [Bb]uild[Ll]og.*
41 |
42 | # NUNIT
43 | *.VisualState.xml
44 | TestResult.xml
45 |
46 | # Build Results of an ATL Project
47 | [Dd]ebugPS/
48 | [Rr]eleasePS/
49 | dlldata.c
50 |
51 | # Benchmark Results
52 | BenchmarkDotNet.Artifacts/
53 |
54 | # .NET Core
55 | project.lock.json
56 | project.fragment.lock.json
57 | artifacts/
58 |
59 | # StyleCop
60 | StyleCopReport.xml
61 |
62 | # Files built by Visual Studio
63 | *_i.c
64 | *_p.c
65 | *_h.h
66 | *.ilk
67 | *.meta
68 | *.obj
69 | *.iobj
70 | *.pch
71 | *.pdb
72 | *.ipdb
73 | *.pgc
74 | *.pgd
75 | *.rsp
76 | *.sbr
77 | *.tlb
78 | *.tli
79 | *.tlh
80 | *.tmp
81 | *.tmp_proj
82 | *_wpftmp.csproj
83 | *.log
84 | *.vspscc
85 | *.vssscc
86 | .builds
87 | *.pidb
88 | *.svclog
89 | *.scc
90 |
91 | # Chutzpah Test files
92 | _Chutzpah*
93 |
94 | # Visual C++ cache files
95 | ipch/
96 | *.aps
97 | *.ncb
98 | *.opendb
99 | *.opensdf
100 | *.sdf
101 | *.cachefile
102 | *.VC.db
103 | *.VC.VC.opendb
104 |
105 | # Visual Studio profiler
106 | *.psess
107 | *.vsp
108 | *.vspx
109 | *.sap
110 |
111 | # Visual Studio Trace Files
112 | *.e2e
113 |
114 | # TFS 2012 Local Workspace
115 | $tf/
116 |
117 | # Guidance Automation Toolkit
118 | *.gpState
119 |
120 | # ReSharper is a .NET coding add-in
121 | _ReSharper*/
122 | *.[Rr]e[Ss]harper
123 | *.DotSettings.user
124 |
125 | # JustCode is a .NET coding add-in
126 | .JustCode
127 |
128 | # TeamCity is a build add-in
129 | _TeamCity*
130 |
131 | # DotCover is a Code Coverage Tool
132 | *.dotCover
133 |
134 | # AxoCover is a Code Coverage Tool
135 | .axoCover/*
136 | !.axoCover/settings.json
137 |
138 | # Visual Studio code coverage results
139 | *.coverage
140 | *.coveragexml
141 |
142 | # NCrunch
143 | _NCrunch_*
144 | .*crunch*.local.xml
145 | nCrunchTemp_*
146 |
147 | # MightyMoose
148 | *.mm.*
149 | AutoTest.Net/
150 |
151 | # Web workbench (sass)
152 | .sass-cache/
153 |
154 | # Installshield output folder
155 | [Ee]xpress/
156 |
157 | # DocProject is a documentation generator add-in
158 | DocProject/buildhelp/
159 | DocProject/Help/*.HxT
160 | DocProject/Help/*.HxC
161 | DocProject/Help/*.hhc
162 | DocProject/Help/*.hhk
163 | DocProject/Help/*.hhp
164 | DocProject/Help/Html2
165 | DocProject/Help/html
166 |
167 | # Publish Web Output
168 | *.[Pp]ublish.xml
169 | *.azurePubxml
170 | # Note: Comment the next line if you want to checkin your web deploy settings,
171 | # but database connection strings (with potential passwords) will be unencrypted
172 | *.pubxml
173 | *.publishproj
174 |
175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
176 | # checkin your Azure Web App publish settings, but sensitive information contained
177 | # in these scripts will be unencrypted
178 | PublishScripts/
179 |
180 | # NuGet Packages
181 | *.nupkg
182 | # The packages folder can be ignored because of Package Restore
183 | **/[Pp]ackages/*
184 | # except build/, which is used as an MSBuild target.
185 | !**/[Pp]ackages/build/
186 | # Uncomment if necessary however generally it will be regenerated when needed
187 | #!**/[Pp]ackages/repositories.config
188 | # NuGet v3's project.json files produces more ignorable files
189 | *.nuget.props
190 | *.nuget.targets
191 |
192 | # Microsoft Azure Build Output
193 | csx/
194 | *.build.csdef
195 |
196 | # Microsoft Azure Emulator
197 | ecf/
198 | rcf/
199 |
200 | # Windows Store app package directories and files
201 | AppPackages/
202 | BundleArtifacts/
203 | Package.StoreAssociation.xml
204 | _pkginfo.txt
205 | *.appx
206 |
207 | # Visual Studio cache files
208 | # files ending in .cache can be ignored
209 | *.[Cc]ache
210 | # but keep track of directories ending in .cache
211 | !?*.[Cc]ache/
212 |
213 | # Others
214 | ClientBin/
215 | ~$*
216 | *~
217 | *.dbmdl
218 | *.dbproj.schemaview
219 | *.jfm
220 | *.pfx
221 | *.publishsettings
222 | orleans.codegen.cs
223 |
224 | # Including strong name files can present a security risk
225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
226 | #*.snk
227 |
228 | # Since there are multiple workflows, uncomment next line to ignore bower_components
229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230 | #bower_components/
231 |
232 | # RIA/Silverlight projects
233 | Generated_Code/
234 |
235 | # Backup & report files from converting an old project file
236 | # to a newer Visual Studio version. Backup files are not needed,
237 | # because we have git ;-)
238 | _UpgradeReport_Files/
239 | Backup*/
240 | UpgradeLog*.XML
241 | UpgradeLog*.htm
242 | ServiceFabricBackup/
243 | *.rptproj.bak
244 |
245 | # SQL Server files
246 | *.mdf
247 | *.ldf
248 | *.ndf
249 |
250 | # Business Intelligence projects
251 | *.rdl.data
252 | *.bim.layout
253 | *.bim_*.settings
254 | *.rptproj.rsuser
255 | *- Backup*.rdl
256 |
257 | # Microsoft Fakes
258 | FakesAssemblies/
259 |
260 | # GhostDoc plugin setting file
261 | *.GhostDoc.xml
262 |
263 | # Node.js Tools for Visual Studio
264 | .ntvs_analysis.dat
265 | node_modules/
266 |
267 | # Visual Studio 6 build log
268 | *.plg
269 |
270 | # Visual Studio 6 workspace options file
271 | *.opt
272 |
273 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
274 | *.vbw
275 |
276 | # Visual Studio LightSwitch build output
277 | **/*.HTMLClient/GeneratedArtifacts
278 | **/*.DesktopClient/GeneratedArtifacts
279 | **/*.DesktopClient/ModelManifest.xml
280 | **/*.Server/GeneratedArtifacts
281 | **/*.Server/ModelManifest.xml
282 | _Pvt_Extensions
283 |
284 | # Paket dependency manager
285 | .paket/paket.exe
286 | paket-files/
287 |
288 | # FAKE - F# Make
289 | .fake/
290 |
291 | # JetBrains Rider
292 | .idea/
293 | *.sln.iml
294 |
295 | # CodeRush personal settings
296 | .cr/personal
297 |
298 | # Python Tools for Visual Studio (PTVS)
299 | __pycache__/
300 | *.pyc
301 |
302 | # Cake - Uncomment if you are using it
303 | # tools/**
304 | # !tools/packages.config
305 |
306 | # Tabs Studio
307 | *.tss
308 |
309 | # Telerik's JustMock configuration file
310 | *.jmconfig
311 |
312 | # BizTalk build output
313 | *.btp.cs
314 | *.btm.cs
315 | *.odx.cs
316 | *.xsd.cs
317 |
318 | # OpenCover UI analysis results
319 | OpenCover/
320 |
321 | # Azure Stream Analytics local run output
322 | ASALocalRun/
323 |
324 | # MSBuild Binary and Structured Log
325 | *.binlog
326 |
327 | # NVidia Nsight GPU debugger configuration file
328 | *.nvuser
329 |
330 | # MFractors (Xamarin productivity tool) working folder
331 | .mfractor/
332 |
333 | # Local History for Visual Studio
334 | .localhistory/
335 |
336 | # BeatPulse healthcheck temp database
337 | healthchecksdb
338 | /tags
339 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SpotifyWPF
2 | An unofficial, simple tools application for Spotify
3 |
4 | This application was born out of a community ask to delete multiple playlists at a time (they had thousands of them). With that said,
5 | that's the only feature this application supports currently.
6 |
7 | The idea is for this to be a sort of "power tools" application for Spotify. Stuff that you can't do in the app (but can with the public APIs)
8 | will be considered for addition to this app. Things that you can do in the Spotify app, but cumbersone to perform, will be considersed as
9 | well.
10 |
11 | For example:
12 | * Adding all of an artist's tracks to a playlist
13 | * Mass deletion (technically unfollow) of playlists
14 | * Displaying information from the API that the Spotify client doesn't show
15 |
16 | If you have any feature ideas, you can either add it as an issue to this repo, or post it on the Spotify Community. I'll keep a lookout
17 | for any asks I see that the official app doesn't support.
18 |
19 | # Installation
20 |
21 | If you want to use the [installer](https://mrpnut.github.io/SpotifyWPF/SpotifyWPF.appinstaller), then you need to install my self signed certificate to your computer's trusted certificate authorities.
22 | To do that easily, run the following in an Administrator PowerShell command prompt. After that, run the installer.
23 |
24 | ```
25 | Invoke-WebRequest -Uri "https://mrpnut.github.io/SpotifyWPF/SpotifyWPF.cer" -OutFile "$env:temp\SpotifyWPF.cer"; Import-Certificate -FilePath "$env:temp\SpotifyWPF.cer" -CertStoreLocation Cert:\LocalMachine\Root
26 | ```
27 |
28 | If you don't want to use the installer, you can pick one of the Github releases to extract to a folder and run.
29 | Using the installer will keep SpotifyWPF up to date.
30 |
31 | # Running
32 |
33 | After installation, you can just search for "SpotifyWPF" in your start menu if you used the installer.
34 |
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/LargeTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/LargeTile.scale-100.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/LargeTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/LargeTile.scale-125.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/LargeTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/LargeTile.scale-150.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/LargeTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/LargeTile.scale-200.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/LargeTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/LargeTile.scale-400.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SmallTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SmallTile.scale-100.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SmallTile.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SmallTile.scale-125.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SmallTile.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SmallTile.scale-150.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SmallTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SmallTile.scale-200.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SmallTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SmallTile.scale-400.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-unplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-unplated_targetsize-16.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-unplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-unplated_targetsize-256.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-unplated_targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-unplated_targetsize-32.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-unplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.altform-unplated_targetsize-48.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-125.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-150.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-16.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-24.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-256.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-32.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Square44x44Logo.targetsize-48.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/StoreLogo.backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/StoreLogo.backup.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/StoreLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/StoreLogo.scale-125.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/StoreLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/StoreLogo.scale-150.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-125.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-150.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MrPnut/SpotifyWPF/b6e812de00f4cbd49a6728203ecb6cff7c559da7/SpotifyWPF.MSIX/Images/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Package.appinstaller:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 | SpotifyWPF
16 | ncsoftworks.com
17 | Images\StoreLogo.png
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/SpotifyWPF.MSIX/SpotifyWPF.MSIX.wapproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 15.0
5 |
6 |
7 |
8 | Debug
9 | x86
10 |
11 |
12 | Release
13 | x86
14 |
15 |
16 | Debug
17 | x64
18 |
19 |
20 | Release
21 | x64
22 |
23 |
24 | Debug
25 | ARM
26 |
27 |
28 | Release
29 | ARM
30 |
31 |
32 | Debug
33 | ARM64
34 |
35 |
36 | Release
37 | ARM64
38 |
39 |
40 | Debug
41 | AnyCPU
42 |
43 |
44 | Release
45 | AnyCPU
46 |
47 |
48 |
49 | $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\
50 |
51 |
52 |
53 | fd111bce-11db-4a42-b15f-2649404098c2
54 | 10.0.19041.0
55 | 10.0.17763.0
56 | en-US
57 | false
58 | $(NoWarn);NU1702
59 | ..\SpotifyWPF\SpotifyWPF.csproj
60 |
61 |
62 |
63 | Designer
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | Always
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/SpotifyWPF.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.2.32526.322
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpotifyWPF", "SpotifyWPF\SpotifyWPF.csproj", "{580D0E07-0C8B-460A-9880-2DD090C0D3EC}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7B31F6F4-30BE-4071-87AD-D15EF894202A}"
9 | ProjectSection(SolutionItems) = preProject
10 | .editorconfig = .editorconfig
11 | EndProjectSection
12 | EndProject
13 | Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "SpotifyWPF.MSIX", "SpotifyWPF.MSIX\SpotifyWPF.MSIX.wapproj", "{FD111BCE-11DB-4A42-B15F-2649404098C2}"
14 | EndProject
15 | Global
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|Any CPU = Debug|Any CPU
18 | Debug|ARM = Debug|ARM
19 | Debug|ARM64 = Debug|ARM64
20 | Debug|x64 = Debug|x64
21 | Debug|x86 = Debug|x86
22 | Release|Any CPU = Release|Any CPU
23 | Release|ARM = Release|ARM
24 | Release|ARM64 = Release|ARM64
25 | Release|x64 = Release|x64
26 | Release|x86 = Release|x86
27 | EndGlobalSection
28 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
29 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
31 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|ARM.ActiveCfg = Debug|Any CPU
32 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|ARM.Build.0 = Debug|Any CPU
33 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|ARM64.ActiveCfg = Debug|Any CPU
34 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|ARM64.Build.0 = Debug|Any CPU
35 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|x64.ActiveCfg = Debug|Any CPU
36 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|x64.Build.0 = Debug|Any CPU
37 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|x86.ActiveCfg = Debug|Any CPU
38 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Debug|x86.Build.0 = Debug|Any CPU
39 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
40 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|Any CPU.Build.0 = Release|Any CPU
41 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|ARM.ActiveCfg = Release|Any CPU
42 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|ARM.Build.0 = Release|Any CPU
43 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|ARM64.ActiveCfg = Release|Any CPU
44 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|ARM64.Build.0 = Release|Any CPU
45 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|x64.ActiveCfg = Release|Any CPU
46 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|x64.Build.0 = Release|Any CPU
47 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|x86.ActiveCfg = Release|Any CPU
48 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}.Release|x86.Build.0 = Release|Any CPU
49 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
51 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
52 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|ARM.ActiveCfg = Debug|ARM
53 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|ARM.Build.0 = Debug|ARM
54 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|ARM.Deploy.0 = Debug|ARM
55 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|ARM64.ActiveCfg = Debug|ARM64
56 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|ARM64.Build.0 = Debug|ARM64
57 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|ARM64.Deploy.0 = Debug|ARM64
58 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|x64.ActiveCfg = Debug|x64
59 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|x64.Build.0 = Debug|x64
60 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|x64.Deploy.0 = Debug|x64
61 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|x86.ActiveCfg = Debug|x86
62 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|x86.Build.0 = Debug|x86
63 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Debug|x86.Deploy.0 = Debug|x86
64 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
65 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|Any CPU.Build.0 = Release|Any CPU
66 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|Any CPU.Deploy.0 = Release|Any CPU
67 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|ARM.ActiveCfg = Release|ARM
68 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|ARM.Build.0 = Release|ARM
69 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|ARM.Deploy.0 = Release|ARM
70 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|ARM64.ActiveCfg = Release|ARM64
71 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|ARM64.Build.0 = Release|ARM64
72 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|ARM64.Deploy.0 = Release|ARM64
73 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|x64.ActiveCfg = Release|x64
74 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|x64.Build.0 = Release|x64
75 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|x64.Deploy.0 = Release|x64
76 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|x86.ActiveCfg = Release|x86
77 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|x86.Build.0 = Release|x86
78 | {FD111BCE-11DB-4A42-B15F-2649404098C2}.Release|x86.Deploy.0 = Release|x86
79 | EndGlobalSection
80 | GlobalSection(SolutionProperties) = preSolution
81 | HideSolutionNode = FALSE
82 | EndGlobalSection
83 | GlobalSection(ExtensibilityGlobals) = postSolution
84 | SolutionGuid = {784BA770-A9D2-4049-9312-203E69FF6547}
85 | EndGlobalSection
86 | EndGlobal
87 |
--------------------------------------------------------------------------------
/SpotifyWPF/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | 137da97fe5de4e8c839d69d41c637364
27 |
28 |
29 | 4002
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/SpotifyWPF/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/SpotifyWPF/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace SpotifyWPF
4 | {
5 | ///
6 | /// Interaction logic for App.xaml
7 | ///
8 | public partial class App : Application
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/SpotifyWPF/Converter/ArtistsToStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Windows.Data;
6 | using SpotifyAPI.Web;
7 |
8 |
9 | namespace SpotifyWPF.Converter
10 | {
11 | public class ArtistsToStringConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | return !(value is IList) ? null :
16 | string.Join(",", ((IList) value).Select(a => a.Name).ToList());
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | throw new NotImplementedException();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/SpotifyWPF/Converter/RadioButtonStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace SpotifyWPF.Converter
6 | {
7 | public class RadioButtonStringConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
10 | {
11 | return (string)parameter == (string)value;
12 | }
13 |
14 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | return value != null && (bool) value ? parameter : null;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/SpotifyWPF/Converter/StringListToStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Windows.Data;
5 |
6 | namespace SpotifyWPF.Converter
7 | {
8 | public class StringListToStringConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | return !(value is IList) ? null : string.Join("\n", ((IList) value));
13 | }
14 |
15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | throw new NotImplementedException();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/SpotifyWPF/Model/AutoMapperConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using AutoMapper;
4 | using SpotifyAPI.Web;
5 |
6 | namespace SpotifyWPF.Model
7 | {
8 | // ReSharper disable once ClassNeverInstantiated.Global
9 | public class AutoMapperConfiguration
10 | {
11 | public static MapperConfiguration Configure()
12 | {
13 | var config = new MapperConfiguration(cfg =>
14 | {
15 | cfg.CreateMap, Track>()
16 | .ForMember(dest => dest.TrackName,
17 | act => act.MapFrom((src, dest) => (src.Track as FullTrack)?.Name))
18 | .ForMember(dest => dest.Artists, act => act.MapFrom((src, dest) =>
19 | {
20 | var fullTrack = src.Track as FullTrack;
21 |
22 | var artists = string.Join(", ",
23 | (fullTrack?.Artists ?? new List()).Select(sa => sa.Name));
24 |
25 | return $"{artists}";
26 | }));
27 | });
28 |
29 | config.AssertConfigurationIsValid();
30 |
31 | return config;
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/SpotifyWPF/Model/Track.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.Model
2 | {
3 | public class Track
4 | {
5 | public string TrackName { get; set; }
6 |
7 | public string Artists { get; set; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/SpotifyWPF/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | using System.Windows;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SpotifyWPF")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SpotifyWPF")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | //In order to begin building localizable applications, set
23 | //CultureYouAreCodingWith in your .csproj file
24 | //inside a . For example, if you are using US english
25 | //in your source files, set the to en-US. Then uncomment
26 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
27 | //the line below to match the UICulture setting in the project file.
28 |
29 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
30 |
31 |
32 | [assembly: ThemeInfo(
33 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
34 | //(used if a resource is not found in the page,
35 | // or application resource dictionaries)
36 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
37 | //(used if a resource is not found in the page,
38 | // app, or any theme specific resource dictionaries)
39 | )]
40 |
41 |
42 | // Version information for an assembly consists of the following four values:
43 | //
44 | // Major Version
45 | // Minor Version
46 | // Build Number
47 | // Revision
48 | //
49 | // You can specify all the values or you can default the Build and Revision Numbers
50 | // by using the '*' as shown below:
51 | // [assembly: AssemblyVersion("1.0.*")]
52 | [assembly: AssemblyVersion("1.0.0.0")]
53 | [assembly: AssemblyFileVersion("1.0.0.0")]
54 |
--------------------------------------------------------------------------------
/SpotifyWPF/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SpotifyWPF.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SpotifyWPF.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/SpotifyWPF/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/SpotifyWPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SpotifyWPF.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("137da97fe5de4e8c839d69d41c637364")]
29 | public string SpotifyClientId {
30 | get {
31 | return ((string)(this["SpotifyClientId"]));
32 | }
33 | }
34 |
35 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
36 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
37 | [global::System.Configuration.DefaultSettingValueAttribute("4002")]
38 | public string SpotifyRedirectPort {
39 | get {
40 | return ((string)(this["SpotifyRedirectPort"]));
41 | }
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/SpotifyWPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 137da97fe5de4e8c839d69d41c637364
7 |
8 |
9 | 4002
10 |
11 |
12 |
--------------------------------------------------------------------------------
/SpotifyWPF/Service/ISettingsProvider.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.Service
2 | {
3 | public interface ISettingsProvider
4 | {
5 | string SpotifyClientId { get; }
6 |
7 | string SpotifyRedirectPort { get; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/SpotifyWPF/Service/ISpotify.cs:
--------------------------------------------------------------------------------
1 | using SpotifyAPI.Web;
2 | using System;
3 | using System.Threading.Tasks;
4 |
5 | namespace SpotifyWPF.Service
6 | {
7 | public interface ISpotify
8 | {
9 | Task LoginAsync(Action onSuccess);
10 |
11 | Task GetPrivateProfileAsync();
12 |
13 | ISpotifyClient Api { get; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/SpotifyWPF/Service/MessageBoxes.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.Service.MessageBoxes
2 | {
3 | public enum MessageBoxButton
4 | {
5 | OK = 0,
6 | OkCancel = 1,
7 | YesNoCancel = 3,
8 | YesNo = 4
9 | }
10 |
11 | public enum MessageBoxResult
12 | {
13 | None = 0,
14 | Ok = 1,
15 | Cancel = 2,
16 | Yes = 6,
17 | No = 7
18 | }
19 |
20 | public enum MessageBoxIcon
21 | {
22 | None = 0,
23 | Error = 16,
24 | Hand = 16,
25 | Stop = 16,
26 | Question = 32,
27 | Exclamation = 48,
28 | Warning = 48,
29 | Information = 64,
30 | Asterisk = 64
31 | }
32 |
33 | public interface IMessageBoxService
34 | {
35 | MessageBoxResult ShowMessageBox(string message, string caption, MessageBoxButton buttons, MessageBoxIcon icon);
36 | }
37 |
38 | public class MessageBoxService : IMessageBoxService
39 | {
40 | public MessageBoxResult ShowMessageBox(string message, string caption, MessageBoxButton buttons, MessageBoxIcon icon)
41 | {
42 | return (MessageBoxResult)System.Windows.MessageBox.Show(message, caption,
43 | (System.Windows.MessageBoxButton)buttons, (System.Windows.MessageBoxImage)icon);
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/SpotifyWPF/Service/SettingsProvider.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.Service
2 | {
3 | public class SettingsProvider : ISettingsProvider
4 | {
5 | public string SpotifyClientId => Properties.Settings.Default.SpotifyClientId;
6 |
7 | public string SpotifyRedirectPort => Properties.Settings.Default.SpotifyRedirectPort;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/SpotifyWPF/Service/Spotify.cs:
--------------------------------------------------------------------------------
1 | using SpotifyAPI.Web;
2 | using SpotifyAPI.Web.Auth;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 |
8 | namespace SpotifyWPF.Service
9 | {
10 | public class Spotify : ISpotify
11 | {
12 | private readonly ISettingsProvider _settingsProvider;
13 |
14 | private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1);
15 |
16 | private readonly EmbedIOAuthServer _server;
17 |
18 | private PrivateUser _privateProfile;
19 |
20 | private Action _loginSuccessAction;
21 |
22 | public ISpotifyClient Api { get; private set; }
23 |
24 | public Spotify(ISettingsProvider settingsProvider)
25 | {
26 | _settingsProvider = settingsProvider;
27 |
28 | _server = new EmbedIOAuthServer(
29 | new Uri($"http://localhost:{_settingsProvider.SpotifyRedirectPort}"),
30 | int.Parse(_settingsProvider.SpotifyRedirectPort));
31 |
32 | _server.ImplictGrantReceived += OnImplicitGrantReceived;
33 | _server.ErrorReceived += OnErrorReceived;
34 | }
35 |
36 | public async Task LoginAsync(Action onSuccess)
37 | {
38 | await _server.Start();
39 |
40 | _loginSuccessAction = onSuccess;
41 |
42 | var request = new LoginRequest(_server.BaseUri, _settingsProvider.SpotifyClientId,
43 | LoginRequest.ResponseType.Token)
44 | {
45 | Scope = new List
46 | {
47 | Scopes.UserReadPrivate, Scopes.PlaylistModifyPrivate, Scopes.PlaylistModifyPublic,
48 | Scopes.PlaylistReadCollaborative, Scopes.PlaylistReadPrivate
49 | }
50 | };
51 |
52 | BrowserUtil.Open(request.ToUri());
53 | }
54 |
55 | private async Task OnErrorReceived(object sender, string error, string state)
56 | {
57 | await _server.Stop();
58 | }
59 |
60 | private async Task OnImplicitGrantReceived(object arg1, ImplictGrantResponse arg2)
61 | {
62 | await _server.Stop();
63 |
64 | Api = new SpotifyClient(arg2.AccessToken);
65 |
66 | _loginSuccessAction?.Invoke();
67 | }
68 |
69 | public async Task GetPrivateProfileAsync()
70 | {
71 | if (_privateProfile != null)
72 | {
73 | return _privateProfile;
74 | }
75 |
76 | await _semaphore.WaitAsync();
77 |
78 | try
79 | {
80 | if (Api == null)
81 | {
82 | return null;
83 | }
84 |
85 | if (_privateProfile != null)
86 | {
87 | return _privateProfile;
88 | }
89 |
90 | _privateProfile = await Api.UserProfile.Current();
91 |
92 | return _privateProfile;
93 | }
94 |
95 | finally
96 | {
97 | _semaphore.Release();
98 | }
99 | }
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/SpotifyWPF/SpotifyWPF.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {580D0E07-0C8B-460A-9880-2DD090C0D3EC}
8 | WinExe
9 | SpotifyWPF
10 | SpotifyWPF
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 | true
17 | true
18 | publish\
19 | true
20 | Web
21 | true
22 | Foreground
23 | 7
24 | Days
25 | false
26 | false
27 | true
28 | https://raw.githubusercontent.com/MrPnut/SpotifyWPF/master/SpotifyWPF/publish/
29 | https://raw.githubusercontent.com/MrPnut/SpotifyWPF/master/SpotifyWPF/publish/
30 | 1
31 | 1.0.0.%2a
32 | false
33 | true
34 | true
35 |
36 |
37 | AnyCPU
38 | true
39 | full
40 | false
41 | bin\Debug\
42 | DEBUG;TRACE
43 | prompt
44 | 4
45 |
46 |
47 | AnyCPU
48 | pdbonly
49 | true
50 | bin\Release\
51 | TRACE
52 | prompt
53 | 4
54 |
55 |
56 | icon.ico
57 |
58 |
59 | 4E51729801B3245F36C1E7604695838CF751AAAF
60 |
61 |
62 | SpotifyWPF_1_TemporaryKey.pfx
63 |
64 |
65 | true
66 |
67 |
68 | false
69 |
70 |
71 |
72 | ..\packages\AutoMapper.9.0.0\lib\net461\AutoMapper.dll
73 |
74 |
75 | ..\packages\CommonServiceLocator.2.0.2\lib\net47\CommonServiceLocator.dll
76 |
77 |
78 | ..\packages\EmbedIO.3.4.3\lib\netstandard2.0\EmbedIO.dll
79 |
80 |
81 | ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll
82 |
83 |
84 | ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll
85 |
86 |
87 | ..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll
88 |
89 |
90 | ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll
91 |
92 |
93 | ..\packages\Nito.AsyncEx.Context.5.0.0\lib\netstandard2.0\Nito.AsyncEx.Context.dll
94 |
95 |
96 | ..\packages\Nito.AsyncEx.Coordination.5.0.0\lib\netstandard2.0\Nito.AsyncEx.Coordination.dll
97 |
98 |
99 | ..\packages\Nito.AsyncEx.Interop.WaitHandles.5.0.0\lib\netstandard2.0\Nito.AsyncEx.Interop.WaitHandles.dll
100 |
101 |
102 | ..\packages\Nito.AsyncEx.Oop.5.0.0\lib\netstandard2.0\Nito.AsyncEx.Oop.dll
103 |
104 |
105 | ..\packages\Nito.AsyncEx.Tasks.5.0.0\lib\netstandard2.0\Nito.AsyncEx.Tasks.dll
106 |
107 |
108 | ..\packages\Nito.Cancellation.1.0.5\lib\netstandard2.0\Nito.Cancellation.dll
109 |
110 |
111 | ..\packages\Nito.Collections.Deque.1.0.4\lib\netstandard2.0\Nito.Collections.Deque.dll
112 |
113 |
114 | ..\packages\Nito.Disposables.2.0.0\lib\netstandard2.0\Nito.Disposables.dll
115 |
116 |
117 | ..\packages\SpotifyAPI.Web.6.2.2\lib\netstandard2.0\SpotifyAPI.Web.dll
118 |
119 |
120 | ..\packages\SpotifyAPI.Web.Auth.6.2.2\lib\netstandard2.0\SpotifyAPI.Web.Auth.dll
121 |
122 |
123 | ..\packages\Unosquare.Swan.Lite.3.0.0\lib\net461\Swan.Lite.dll
124 |
125 |
126 |
127 | ..\packages\System.Collections.Immutable.1.4.0\lib\netstandard2.0\System.Collections.Immutable.dll
128 |
129 |
130 |
131 | ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
132 |
133 |
134 | ..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 | 4.0
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 | MSBuild:Compile
152 | Designer
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 | AlbumsDataGrid.xaml
178 |
179 |
180 | ArtistsDataGrid.xaml
181 |
182 |
183 |
184 | PlaylistsDataGrid.xaml
185 |
186 |
187 | SearchPage.xaml
188 |
189 |
190 | LoginPage.xaml
191 |
192 |
193 | PlaylistsPage.xaml
194 |
195 |
196 | TracksDataGrid.xaml
197 |
198 |
199 |
200 | Designer
201 | MSBuild:Compile
202 |
203 |
204 | Designer
205 | MSBuild:Compile
206 |
207 |
208 | Designer
209 | MSBuild:Compile
210 |
211 |
212 | Designer
213 | MSBuild:Compile
214 |
215 |
216 | MSBuild:Compile
217 | Designer
218 |
219 |
220 | App.xaml
221 | Code
222 |
223 |
224 | MainWindow.xaml
225 | Code
226 |
227 |
228 | Designer
229 | MSBuild:Compile
230 |
231 |
232 | Designer
233 | MSBuild:Compile
234 |
235 |
236 | Designer
237 | MSBuild:Compile
238 |
239 |
240 |
241 |
242 | Code
243 |
244 |
245 | True
246 | True
247 | Resources.resx
248 |
249 |
250 | True
251 | Settings.settings
252 | True
253 |
254 |
255 | ResXFileCodeGenerator
256 | Resources.Designer.cs
257 |
258 |
259 | .editorconfig
260 |
261 |
262 |
263 | SettingsSingleFileGenerator
264 | Settings.Designer.cs
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 | False
278 | Microsoft .NET Framework 4.7.2 %28x86 and x64%29
279 | true
280 |
281 |
282 | False
283 | .NET Framework 3.5 SP1
284 | false
285 |
286 |
287 |
288 |
289 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/ArtistsAlbumsTracks.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace SpotifyWPF.View
4 | {
5 | ///
6 | /// Interaction logic for Search.xaml
7 | ///
8 | public partial class ArtistsAlbumsTracks : UserControl
9 | {
10 | public ArtistsAlbumsTracks()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Component/AlbumsDataGrid.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
20 |
21 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Component/AlbumsDataGrid.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.View.Component
2 | {
3 | ///
4 | /// Interaction logic for AlbumsDataGrid.xaml
5 | ///
6 | public partial class AlbumsDataGrid
7 | {
8 | public AlbumsDataGrid()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/SpotifyWPF/View/Component/ArtistsDataGrid.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
20 |
21 |
33 |
34 |
35 |
36 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Component/ArtistsDataGrid.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.View.Component
2 | {
3 | ///
4 | /// Interaction logic for ArtistsDataGrid.xaml
5 | ///
6 | public partial class ArtistsDataGrid
7 | {
8 | public ArtistsDataGrid()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/SpotifyWPF/View/Component/PlaylistsDataGrid.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
14 |
15 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Component/PlaylistsDataGrid.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.View.Component
2 | {
3 | ///
4 | /// Interaction logic for PlaylistsDataGrid.xaml
5 | ///
6 | public partial class PlaylistsDataGrid
7 | {
8 | public PlaylistsDataGrid()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/SpotifyWPF/View/Component/TracksDataGrid.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
20 |
21 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Component/TracksDataGrid.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.View.Component
2 | {
3 | ///
4 | /// Interaction logic for TracksDataGrid.xaml
5 | ///
6 | public partial class TracksDataGrid
7 | {
8 | public TracksDataGrid()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Extension/DataGridExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Input;
6 |
7 | namespace SpotifyWPF.View.Extension
8 | {
9 | public class DataGridExtensions
10 | {
11 | public static readonly DependencyProperty VisibleChangedCommandProperty =
12 | DependencyProperty.RegisterAttached("VisibleChangedCommand", typeof(ICommand), typeof(DataGridExtensions),
13 | new PropertyMetadata(default(ICommand), OnVisibleCommandChanged));
14 |
15 | public static readonly DependencyProperty ScrollChangedCommandProperty =
16 | DependencyProperty.RegisterAttached("ScrollChangedCommand", typeof(ICommand), typeof(DataGridExtensions),
17 | new PropertyMetadata(default(ICommand), OnScrollChangedCommandChanged));
18 |
19 | private static readonly HashSet
20 | AppliedToDataGrids = new HashSet();
21 |
22 | private static void OnVisibleCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
23 | {
24 | Init(d, e);
25 | }
26 |
27 | private static void OnScrollChangedCommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
28 | {
29 | Init(d, e);
30 | }
31 |
32 | private static void Init(DependencyObject d, DependencyPropertyChangedEventArgs e)
33 | {
34 | if (!(d is DataGrid dataGrid)) return;
35 |
36 | if (AppliedToDataGrids.Contains(dataGrid)) return;
37 |
38 | if (e.NewValue != null)
39 | {
40 | AppliedToDataGrids.Add(dataGrid);
41 | dataGrid.Loaded += DataGridOnLoaded;
42 | }
43 |
44 | else if (e.OldValue != null)
45 | {
46 | AppliedToDataGrids.Remove(dataGrid);
47 | dataGrid.Loaded -= DataGridOnLoaded;
48 | }
49 | }
50 |
51 | private static void DataGridOnLoaded(object sender, RoutedEventArgs routedEventArgs)
52 | {
53 | if (!(sender is DataGrid dataGrid)) return;
54 |
55 | var scrollViewer = UiHelper.FindChildren(dataGrid).FirstOrDefault();
56 |
57 | if (scrollViewer == null) return;
58 |
59 | scrollViewer.ScrollChanged += ScrollViewerOnScrollChanged;
60 | dataGrid.IsVisibleChanged += DataGridIsVisibleChanged;
61 |
62 | // Kinda hacky, but visibilty doesn't fire when it's first loaded
63 | GetVisibleChangedCommand(dataGrid)?.Execute(true);
64 | }
65 |
66 | private static void DataGridIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
67 | {
68 | if (!(sender is DataGrid dataGrid)) return;
69 |
70 | GetVisibleChangedCommand(dataGrid)?.Execute(dataGrid.IsVisible);
71 | }
72 |
73 | private static void ScrollViewerOnScrollChanged(object sender, ScrollChangedEventArgs e)
74 | {
75 | if (!(sender is ScrollViewer scrollViewer)) return;
76 |
77 | var dataGrid = UiHelper.FindParent(scrollViewer);
78 | if (dataGrid == null) return;
79 |
80 | GetScrollChangedCommand(dataGrid).Execute(new ScrollInfo(scrollViewer, e));
81 | }
82 |
83 | public static void SetVisibleChangedCommand(DependencyObject element, ICommand value)
84 | {
85 | element.SetValue(VisibleChangedCommandProperty, value);
86 | }
87 |
88 | public static ICommand GetVisibleChangedCommand(DependencyObject element)
89 | {
90 | return (ICommand) element.GetValue(VisibleChangedCommandProperty);
91 | }
92 |
93 | public static void SetScrollChangedCommand(DependencyObject element, ICommand value)
94 | {
95 | element.SetValue(ScrollChangedCommandProperty, value);
96 | }
97 |
98 | public static ICommand GetScrollChangedCommand(DependencyObject element)
99 | {
100 | return (ICommand) element.GetValue(ScrollChangedCommandProperty);
101 | }
102 | }
103 |
104 | public class ScrollInfo
105 | {
106 | public bool IsScrollable { get; }
107 |
108 | public double ScrollPercentage { get; }
109 |
110 | public ScrollInfo(ScrollViewer scrollViewer, ScrollChangedEventArgs args)
111 | {
112 | if (scrollViewer.ScrollableHeight > 0)
113 | {
114 | IsScrollable = true;
115 | }
116 |
117 | if (args.VerticalChange > 0 && IsScrollable)
118 | {
119 | ScrollPercentage = args.VerticalOffset / scrollViewer.ScrollableHeight;
120 | }
121 | }
122 | }
123 | }
--------------------------------------------------------------------------------
/SpotifyWPF/View/Extension/UIHelper.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Windows;
3 | using System.Windows.Media;
4 |
5 | namespace SpotifyWPF.View.Extension
6 | {
7 | public static class UiHelper
8 | {
9 | public static IList FindChildren(DependencyObject element) where T : FrameworkElement
10 | {
11 | var retval = new List();
12 |
13 | for (var counter = 0; counter < VisualTreeHelper.GetChildrenCount(element); counter++)
14 | {
15 | if (!(VisualTreeHelper.GetChild(element, counter) is FrameworkElement toAdd)) continue;
16 |
17 | if (toAdd is T correctlyTyped)
18 | retval.Add(correctlyTyped);
19 |
20 | else
21 | retval.AddRange(FindChildren(toAdd));
22 | }
23 |
24 | return retval;
25 | }
26 |
27 | public static T FindParent(DependencyObject element) where T : FrameworkElement
28 | {
29 | var parent = VisualTreeHelper.GetParent(element) as FrameworkElement;
30 |
31 | while (parent != null)
32 | {
33 | if (parent is T correctlyTyped) return correctlyTyped;
34 |
35 | return FindParent(parent);
36 | }
37 |
38 | return null;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.View
2 | {
3 | ///
4 | /// Interaction logic for MainWindow.xaml
5 | ///
6 | public partial class MainWindow
7 | {
8 | public MainWindow()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Page/LoginPage.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Page/LoginPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.View.Page
2 | {
3 | ///
4 | /// Interaction logic for LoginPage.xaml
5 | ///
6 | public partial class LoginPage
7 | {
8 | public LoginPage()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Page/PlaylistsPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
49 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Page/PlaylistsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.View.Page
2 | {
3 | ///
4 | /// Interaction logic for PlaylistsPage.xaml
5 | ///
6 | public partial class PlaylistsPage
7 | {
8 | public PlaylistsPage()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Page/SearchPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/SpotifyWPF/View/Page/SearchPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace SpotifyWPF.View.Page
2 | {
3 | ///
4 | /// Interaction logic for SearchPage.xaml
5 | ///
6 | public partial class SearchPage
7 | {
8 | public SearchPage()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/SpotifyWPF/ViewModel/Component/AlbumsDataGridViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using SpotifyAPI.Web;
3 | using SpotifyWPF.Service;
4 |
5 | namespace SpotifyWPF.ViewModel.Component
6 | {
7 | public class AlbumsDataGridViewModel : DataGridViewModelBase
8 | {
9 | private readonly ISpotify _spotify;
10 |
11 | public AlbumsDataGridViewModel(ISpotify spotify)
12 | {
13 | _spotify = spotify;
14 | }
15 |
16 | private protected override async Task> FetchPageInternalAsync()
17 | {
18 | var req = new SearchRequest(SearchRequest.Types.Album, Query)
19 | {
20 | Limit = 20,
21 | Offset = Items.Count
22 | };
23 |
24 | var resp = await _spotify.Api.Search.Item(req);
25 |
26 | return resp.Albums;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/SpotifyWPF/ViewModel/Component/ArtistsDataGridViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using SpotifyAPI.Web;
3 | using SpotifyWPF.Service;
4 |
5 | namespace SpotifyWPF.ViewModel.Component
6 | {
7 | public class ArtistsDataGridViewModel : DataGridViewModelBase
8 | {
9 | private readonly ISpotify _spotify;
10 |
11 | public ArtistsDataGridViewModel(ISpotify spotify)
12 | {
13 | _spotify = spotify;
14 | }
15 |
16 | private protected override async Task> FetchPageInternalAsync()
17 | {
18 | var req = new SearchRequest(SearchRequest.Types.Artist, Query)
19 | {
20 | Limit = 20,
21 | Offset = Items.Count
22 | };
23 |
24 | var resp = await _spotify.Api.Search.Item(req);
25 |
26 | return resp.Artists;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/SpotifyWPF/ViewModel/Component/MenuItemViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.ObjectModel;
2 | using System.Windows.Input;
3 | using GalaSoft.MvvmLight;
4 | using GalaSoft.MvvmLight.CommandWpf;
5 |
6 | namespace SpotifyWPF.ViewModel.Component
7 | {
8 | public class MenuItemViewModel : ViewModelBase
9 | {
10 | private string _header;
11 | private bool _isChecked;
12 |
13 | public MenuItemViewModel(string header) : this(header, null) { }
14 |
15 | public MenuItemViewModel(string header, ICommand command)
16 | {
17 | _header = header;
18 | Command = command ?? new RelayCommand(() => {});
19 | }
20 |
21 | public string Header
22 | {
23 | get => _header;
24 |
25 | set
26 | {
27 | _header = value;
28 | RaisePropertyChanged();
29 | }
30 | }
31 |
32 | public ObservableCollection MenuItems { get; set; }
33 |
34 | public bool IsChecked
35 | {
36 | get => _isChecked;
37 |
38 | set
39 | {
40 | _isChecked = value;
41 | RaisePropertyChanged();
42 | }
43 | }
44 |
45 | public ICommand Command { get; }
46 | }
47 | }
--------------------------------------------------------------------------------
/SpotifyWPF/ViewModel/Component/PlaylistsDataGridViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using SpotifyAPI.Web;
3 | using SpotifyWPF.Service;
4 |
5 | namespace SpotifyWPF.ViewModel.Component
6 | {
7 | public class PlaylistsDataGridViewModel : DataGridViewModelBase
8 | {
9 | private readonly ISpotify _spotify;
10 |
11 | public PlaylistsDataGridViewModel(ISpotify spotify)
12 | {
13 | _spotify = spotify;
14 | }
15 |
16 | private protected override async Task> FetchPageInternalAsync()
17 | {
18 | var req = new SearchRequest(SearchRequest.Types.Playlist, Query)
19 | {
20 | Limit = 20,
21 | Offset = Items.Count
22 | };
23 |
24 | var resp = await _spotify.Api.Search.Item(req);
25 |
26 | return resp.Playlists;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/SpotifyWPF/ViewModel/Component/TracksDataGridViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using SpotifyAPI.Web;
3 | using SpotifyWPF.Service;
4 |
5 | namespace SpotifyWPF.ViewModel.Component
6 | {
7 | public class TracksDataGridViewModel : DataGridViewModelBase
8 | {
9 | private readonly ISpotify _spotify;
10 |
11 | public TracksDataGridViewModel(ISpotify spotify)
12 | {
13 | _spotify = spotify;
14 | }
15 |
16 | private protected override async Task> FetchPageInternalAsync()
17 | {
18 | var req = new SearchRequest(SearchRequest.Types.Track, Query)
19 | {
20 | Limit = 20,
21 | Offset = Items.Count
22 | };
23 |
24 | var resp = await _spotify.Api.Search.Item(req);
25 |
26 | return resp.Tracks;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/SpotifyWPF/ViewModel/DataGridViewModelBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.ObjectModel;
3 | using System.Threading.Tasks;
4 | using System.Windows;
5 | using GalaSoft.MvvmLight;
6 | using GalaSoft.MvvmLight.Command;
7 | using Nito.AsyncEx;
8 | using SpotifyAPI.Web;
9 | using SpotifyWPF.View.Extension;
10 |
11 | namespace SpotifyWPF.ViewModel
12 | {
13 | public abstract class DataGridViewModelBase : ViewModelBase, IDataGridViewModel
14 | {
15 | private readonly AsyncLock _mutex = new AsyncLock();
16 |
17 | ///
18 | /// True if we're completed an initial load (MaybeLoadUntilScrollable)
19 | ///
20 | private volatile bool _loadedInitially;
21 |
22 | ///
23 | /// If we're currently loading the DataGrid
24 | ///
25 | private volatile bool _loading;
26 |
27 | protected DataGridViewModelBase()
28 | {
29 | UpdateVisibilityCommand = new RelayCommand(async isVisible =>
30 | {
31 | // If we're visible try to load if we can
32 | if (isVisible) await MaybeLoadUntilScrollable();
33 |
34 | // Else stop loading if we're during the initial load
35 | else if (!_loadedInitially) _loadedInitially = true;
36 | });
37 |
38 | UpdateScrollCommand = new RelayCommand(async scrollInfo =>
39 | {
40 | // If we haven't loaded the first set yet and we can scroll, then stop loading
41 | if (!_loadedInitially && scrollInfo.IsScrollable) _loadedInitially = true;
42 |
43 | // Otherwise load the next page
44 | else if (_loadedInitially && scrollInfo.ScrollPercentage >= 0.85) await FetchAndLoadPageAsync();
45 | });
46 | }
47 |
48 | ///
49 | /// The initial query used for this DataGrid
50 | ///
51 | protected string Query { get; private set; }
52 |
53 | ///
54 | /// The items in the DataGrid
55 | ///
56 | public ObservableCollection Items { get; } = new ObservableCollection();
57 |
58 | ///
59 | /// Command to execute when our visibility is updated
60 | ///
61 | public RelayCommand UpdateVisibilityCommand { get; }
62 |
63 | ///
64 | /// Command to execute when our ScrollInfo is updated
65 | ///
66 | public RelayCommand UpdateScrollCommand { get; }
67 |
68 | ///
69 | /// The total items in the results set (includes not fetched/displayed)
70 | ///
71 | public int? Total { get; private set; }
72 |
73 | public bool Loading
74 | {
75 | get => _loading;
76 |
77 | set
78 | {
79 | _loading = value;
80 | RaisePropertyChanged();
81 | }
82 | }
83 |
84 | ///
85 | /// Try to do an initial load if we need to (until the scrollbar show up).
86 | /// If the scrollbar is shown, this method exits. It can also only run once from the time
87 | /// the viewmodel is initialized (if a query is present)
88 | ///
89 | ///
90 | public async Task MaybeLoadUntilScrollable()
91 | {
92 | if (string.IsNullOrWhiteSpace(Query)) return;
93 |
94 | await Task.Run(async () =>
95 | {
96 | while (!_loadedInitially)
97 | {
98 | if (Items.Count >= Total) break;
99 |
100 | await FetchAndLoadPageAsync();
101 | }
102 | });
103 |
104 | _loadedInitially = true;
105 | }
106 |
107 | ///
108 | /// Reinitialize with a starting page and query to be able to retrieve more.
109 | /// Locked because it could be called multiple times from visibility commands
110 | ///
111 | ///
112 | ///
113 | ///
114 | public async Task InitializeAsync(string query, Paging paging)
115 | {
116 | using (await _mutex.LockAsync())
117 | {
118 | Loading = false;
119 | _loadedInitially = false;
120 | Items.Clear();
121 | Query = query;
122 | Total = 0;
123 |
124 | await LoadPageAsync(paging);
125 | }
126 | }
127 |
128 | ///
129 | /// Loads a page into the DataGrid and notifies those interested that the items changed
130 | ///
131 | ///
132 | ///
133 | private async Task LoadPageAsync(Paging paging)
134 | {
135 | // ReSharper disable once PossibleNullReferenceException
136 | await Application.Current.Dispatcher?.BeginInvoke((Action) (() =>
137 | {
138 | foreach (var item in paging.Items) Items.Add(item);
139 |
140 | Total = paging.Total;
141 |
142 | PageLoaded?.Invoke(this, EventArgs.Empty);
143 | }));
144 | }
145 |
146 | ///
147 | /// Fetches the next page from a subclass and loads it into the DataGrid
148 | /// Locked because it can be invoked from multiple UI commands
149 | ///
150 | ///
151 | private async Task FetchAndLoadPageAsync()
152 | {
153 | using (await _mutex.LockAsync())
154 | {
155 | Loading = true;
156 |
157 | if (Items.Count >= Total)
158 | {
159 | Loading = false;
160 |
161 | return;
162 | }
163 |
164 | var page = await FetchPageInternalAsync();
165 | await LoadPageAsync(page);
166 |
167 | Loading = false;
168 | }
169 | }
170 |
171 | ///
172 | /// Subclass specific implementation to retrieve the next page
173 | ///
174 | ///
175 | private protected abstract Task> FetchPageInternalAsync();
176 |
177 | ///
178 | /// When a new page has been loaded
179 | ///
180 | public event EventHandler PageLoaded;
181 | }
182 |
183 | public interface IDataGridViewModel
184 | {
185 | bool Loading { get; }
186 | Task MaybeLoadUntilScrollable();
187 | }
188 | }
--------------------------------------------------------------------------------
/SpotifyWPF/ViewModel/MainViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.ObjectModel;
2 | using System.Linq;
3 | using System.Threading.Tasks;
4 | using System.Windows;
5 | using GalaSoft.MvvmLight;
6 | using GalaSoft.MvvmLight.Command;
7 | using SpotifyWPF.ViewModel.Component;
8 | using SpotifyWPF.ViewModel.Page;
9 |
10 | namespace SpotifyWPF.ViewModel
11 | {
12 | public class MainViewModel : ViewModelBase
13 | {
14 | private readonly SearchPageViewModel _searchPageViewModel;
15 | private readonly PlaylistsPageViewModel _playlistsPageViewModel;
16 |
17 | private ViewModelBase _currentPage;
18 |
19 | public MainViewModel(LoginPageViewModel loginPageViewModel,
20 | PlaylistsPageViewModel playlistsPageViewModel,
21 | SearchPageViewModel searchPageViewModel)
22 | {
23 | _playlistsPageViewModel = playlistsPageViewModel;
24 | _searchPageViewModel = searchPageViewModel;
25 |
26 | CurrentPage = loginPageViewModel;
27 |
28 | MessengerInstance.Register