From 9230c5859b938f0deca59f075535cbebf1c534d8 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Wed, 7 Mar 2018 21:59:41 +0000 Subject: [PATCH 1/4] Added GA --- client/package-lock.json | 8 ++++++++ client/src/app/app.component.ts | 5 ++--- client/src/app/app.module.ts | 7 ++++++- client/src/index.html | 13 +++++++++++++ server/PodNoms.Api.csproj | 4 ++-- 5 files changed, 31 insertions(+), 6 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 7280639..f86236d 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -522,6 +522,14 @@ "moment": "2.21.0" } }, + "angulartics2": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/angulartics2/-/angulartics2-5.1.2.tgz", + "integrity": "sha512-ZTmSXH6t7Set8TT4oY6HcCLr7bIbK56oJnUVlDJNXSnCTS2DeZW0lP/4pcGpdELCTAF5xfosjar+DM+7kqWiPQ==", + "requires": { + "tslib": "1.9.0" + } + }, "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 8f7060b..0a23796 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -2,6 +2,7 @@ import { GlobalsService } from './services/globals.service'; import { Component, HostBinding } from '@angular/core'; import { Store } from '@ngrx/store'; import { AuthService } from 'app/services/auth.service'; +import { Angulartics2GoogleAnalytics } from 'angulartics2/ga'; @Component({ selector: 'app-root', @@ -9,12 +10,10 @@ import { AuthService } from 'app/services/auth.service'; styleUrls: ['./app.component.css'] }) export class AppComponent { - - constructor(private _authService: AuthService, _globals: GlobalsService) { + constructor(private _authService: AuthService) { _authService.handleAuthentication(); _authService.scheduleRenewal(); } - loggedIn() { return this._authService.isAuthenticated(); } diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index c7c74ad..8d9fa91 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -97,9 +97,14 @@ export function authHttpServiceFactory(http: Http, options: RequestOptions) { ToastyModule.forRoot(), DropzoneModule, ClipboardModule, + StoreModule.forRoot(reducers), - EffectsModule.forRoot([PodcastsEffects, EntriesEffects, ProfileEffects]), + EffectsModule.forRoot([ + PodcastsEffects, + EntriesEffects, + ProfileEffects + ]), StoreDevtoolsModule.instrument({ maxAge: 25 // Retains last 25 states }) diff --git a/client/src/index.html b/client/src/index.html index 742a9b2..66ce69e 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -2,6 +2,19 @@ + + + PodNoms.Web diff --git a/server/PodNoms.Api.csproj b/server/PodNoms.Api.csproj index b009fd7..3e0f9de 100644 --- a/server/PodNoms.Api.csproj +++ b/server/PodNoms.Api.csproj @@ -10,12 +10,12 @@ + + - - From 34a5e070da672fa2a63c3b53e2c0ddc32c7a0fc5 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Thu, 8 Mar 2018 19:08:36 +0000 Subject: [PATCH 2/4] Removed some redundant processor calls --- .gitmodules | 3 +++ server/NYoutubeDL | 1 + server/PodNoms.Api.csproj | 3 +-- server/Services/Downloader/AudioDownloader.cs | 4 ++-- server/Services/Processor/AudioUploadProcessService.cs | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 server/NYoutubeDL diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1aa7335 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "server/NYoutubeDL"] + path = server/NYoutubeDL + url = https://github.com/BrianAllred/NYoutubeDL.git diff --git a/server/NYoutubeDL b/server/NYoutubeDL new file mode 160000 index 0000000..bdeadcd --- /dev/null +++ b/server/NYoutubeDL @@ -0,0 +1 @@ +Subproject commit bdeadcda768ec2b6b6b08cb7b8833f23250779c8 diff --git a/server/PodNoms.Api.csproj b/server/PodNoms.Api.csproj index 3e0f9de..202b1c8 100644 --- a/server/PodNoms.Api.csproj +++ b/server/PodNoms.Api.csproj @@ -16,10 +16,9 @@ - - + diff --git a/server/Services/Downloader/AudioDownloader.cs b/server/Services/Downloader/AudioDownloader.cs index b0e96c0..370f5ed 100644 --- a/server/Services/Downloader/AudioDownloader.cs +++ b/server/Services/Downloader/AudioDownloader.cs @@ -54,12 +54,12 @@ namespace PodNoms.Api.Services.Downloader { await Task.Run(() => { var youtubeDl = new YoutubeDL(); youtubeDl.VideoUrl = this._url; - this.Properties = youtubeDl.GetDownloadInfo() as VideoDownloadInfo; - var info = youtubeDl.GetDownloadInfo(); + var info = youtubeDl.GetDownloadInfo() as VideoDownloadInfo; ret = ( info != null && info is VideoDownloadInfo && //make sure it's not a playlist (info.Errors.Count == 0 || info.VideoSize != null)); + if (ret) this.Properties = info; }); return ret; } diff --git a/server/Services/Processor/AudioUploadProcessService.cs b/server/Services/Processor/AudioUploadProcessService.cs index db230f8..ef131ed 100644 --- a/server/Services/Processor/AudioUploadProcessService.cs +++ b/server/Services/Processor/AudioUploadProcessService.cs @@ -36,7 +36,7 @@ namespace PodNoms.Api.Services.Processor { entry.ProcessingStatus = ProcessingStatus.Uploading; await _unitOfWork.CompleteAsync (); try { - // bit messy but can't figure how to p ass youtube-dl job result to this job + // bit messy but can't figure how to pass youtube-dl job result to this job // so using AudioUrl as a proxy if (string.IsNullOrEmpty (localFile)) localFile = entry.AudioUrl; From 9dba78ccfc8bd4c3d77a0a7e3a39804939e9139d Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Thu, 8 Mar 2018 19:15:47 +0000 Subject: [PATCH 3/4] Undid local src tree --- .gitmodules | 3 --- server/NYoutubeDL | 1 - server/PodNoms.Api.csproj | 1 + 3 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 .gitmodules delete mode 160000 server/NYoutubeDL diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 1aa7335..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "server/NYoutubeDL"] - path = server/NYoutubeDL - url = https://github.com/BrianAllred/NYoutubeDL.git diff --git a/server/NYoutubeDL b/server/NYoutubeDL deleted file mode 160000 index bdeadcd..0000000 --- a/server/NYoutubeDL +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bdeadcda768ec2b6b6b08cb7b8833f23250779c8 diff --git a/server/PodNoms.Api.csproj b/server/PodNoms.Api.csproj index 202b1c8..3c1a0cd 100644 --- a/server/PodNoms.Api.csproj +++ b/server/PodNoms.Api.csproj @@ -16,6 +16,7 @@ + From 493c45ca0451a32bfc927f6d5bdff93f635f276c Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Thu, 8 Mar 2018 19:17:39 +0000 Subject: [PATCH 4/4] update versions --- client/package.json | 2 +- server/appsettings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/package.json b/client/package.json index 356b4e5..b9cc52e 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "pod-noms.web", - "version": "0.13.0", + "version": "0.14.0", "license": "MIT", "scripts": { "ng": "ng", diff --git a/server/appsettings.json b/server/appsettings.json index aba23b2..983c476 100644 --- a/server/appsettings.json +++ b/server/appsettings.json @@ -8,7 +8,7 @@ } }, "App": { - "Version": "0.13.0" + "Version": "0.14.0" }, "ConnectionStrings": { "DefaultConnection": "server=localhost;database=PodNoms;user id=sa;password=cTXu1nJLCpC/c"