Skip to content

Commit

Permalink
Adds Sukkot '23 ad announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
JudahGabriel committed Aug 18, 2023
1 parent 51a33fa commit ae70b91
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Chavah.NetCore/Common/SwaggerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static IServiceCollection AddCustomAddSwagger(this IServiceCollection ser
options.OperationFilter<SwaggerDefaultValues>();
// integrate xml comments
options.IncludeXmlComments(XmlCommentsFilePath);
// options.IncludeXmlComments(XmlCommentsFilePath);
});

services.Configure<ApiBehaviorOptions>(options =>
Expand Down
3 changes: 3 additions & 0 deletions Chavah.NetCore/wwwroot/js/Controllers/EditAlbumController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace BitShuva.Chavah {

declare var Vibrant;

export class EditAlbumController {

static $inject = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

namespace BitShuva.Chavah {
declare var Vibrant;
export class UploadAlbumController {
albumName = "";
artistName = "";
Expand Down Expand Up @@ -141,9 +142,9 @@ namespace BitShuva.Chavah {
}
}

fetchAlbumColorSwatches(imageUrl: string): ng.IPromise<ISwatchList> {
fetchAlbumColorSwatches(imageUrl: string): ng.IPromise<any /*ISwatchList*/> {
const img = document.createElement("img");
const deferred = this.$q.defer<ISwatchList>();
const deferred = this.$q.defer<any /*ISwatchList*/>();
img.crossOrigin = "Anonymous";
//img.src = imageUrl;
img.src = "/api/albums/imageOnDomain?imageUrl=" + encodeURIComponent(imageUrl);
Expand Down Expand Up @@ -269,11 +270,11 @@ namespace BitShuva.Chavah {
};
}

static getFriendlySwatches(rawSwatches: ISwatchList): IAlbumSwatch[] {
static getFriendlySwatches(rawSwatches: any /*ISwatchList*/): IAlbumSwatch[] {
return Object.getOwnPropertyNames(rawSwatches)
.filter(p => !!rawSwatches[p])
.map(p => {
let swatch: ISwatch = rawSwatches[p];
let swatch = rawSwatches[p];
let friendlySwatch: IAlbumSwatch = {
name: p,
color: swatch.getHex(),
Expand Down
2 changes: 1 addition & 1 deletion Chavah.NetCore/wwwroot/js/Models/Song.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace BitShuva.Chavah {
private _reasonPlayedText: string | null;

// tslint:disable-next-line:member-ordering
static readonly defaultSwatch: ISwatch = {
static readonly defaultSwatch = {
getBodyTextColor: () => "black",
getHex: () => "white",
getHsl: () => "black",
Expand Down
11 changes: 9 additions & 2 deletions Chavah.NetCore/wwwroot/js/Services/AdAnnouncerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@
}

playAdAnnouncement() {
const announcementNumbers = [1,2,3,4,5];
const fileName = "ad" + announcementNumbers[Math.floor(Math.random() * announcementNumbers.length)] + "x.mp3";
// Sukkot 2023 ad: play it every even hour;
let fileName: string;
if (new Date().getHours() % 2 === 0) {
fileName = "ad6x.mp3";
} else {
const announcementNumbers = [1, 2, 3, 4, 5,6];
fileName = "ad" + announcementNumbers[Math.floor(Math.random() * announcementNumbers.length)] + "x.mp3";
}

const songUrl = `${this.homeViewModel.soundEffects}/${fileName}`;
this.audioPlayer.playNewUri(songUrl);
}
Expand Down
Binary file modified MessiahsMusicFundDisbursement.xlsx
Binary file not shown.

0 comments on commit ae70b91

Please sign in to comment.