mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Added the calendar!
This commit is contained in:
parent
f748ea9db6
commit
9a267465a7
19 changed files with 326 additions and 11 deletions
53
src/Ombi.Core/Engine/V2/CalendarEngine.cs
Normal file
53
src/Ombi.Core/Engine/V2/CalendarEngine.cs
Normal file
|
@ -0,0 +1,53 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Principal;
|
||||
using System.Threading.Tasks;
|
||||
using Ombi.Core.Authentication;
|
||||
using Ombi.Core.Engine.Interfaces;
|
||||
using Ombi.Core.Models.Search.V2;
|
||||
using Ombi.Core.Rule.Interfaces;
|
||||
using Ombi.Store.Repository.Requests;
|
||||
|
||||
namespace Ombi.Core.Engine.V2
|
||||
{
|
||||
public class CalendarEngine : BaseEngine, ICalendarEngine
|
||||
{
|
||||
public CalendarEngine(IPrincipal user, OmbiUserManager um, IRuleEvaluator rules, IMovieRequestRepository movieRepo,
|
||||
ITvRequestRepository tvRequestRepo) : base(user, um, rules)
|
||||
{
|
||||
_movieRepo = movieRepo;
|
||||
_tvRepo = tvRequestRepo;
|
||||
}
|
||||
|
||||
private readonly IMovieRequestRepository _movieRepo;
|
||||
private readonly ITvRequestRepository _tvRepo;
|
||||
|
||||
public async Task<List<CalendarViewModel>> GetCalendarData()
|
||||
{
|
||||
var viewModel = new List<CalendarViewModel>();
|
||||
var movies = _movieRepo.GetAll().Where(x =>
|
||||
x.ReleaseDate > DateTime.Now.AddDays(-30) && x.ReleaseDate < DateTime.Now.AddDays(30));
|
||||
var episodes = _tvRepo.GetChild().SelectMany(x => x.SeasonRequests.SelectMany(e => e.Episodes)).ToList();
|
||||
foreach (var e in episodes)
|
||||
{
|
||||
viewModel.Add(new CalendarViewModel
|
||||
{
|
||||
Title = e.Title,
|
||||
Start = e.AirDate.Date
|
||||
});
|
||||
}
|
||||
|
||||
foreach (var m in movies)
|
||||
{
|
||||
viewModel.Add(new CalendarViewModel
|
||||
{
|
||||
Title = m.Title,
|
||||
Start = m.ReleaseDate.Date
|
||||
});
|
||||
}
|
||||
|
||||
return viewModel;
|
||||
}
|
||||
}
|
||||
}
|
11
src/Ombi.Core/Engine/V2/ICalendarEngine.cs
Normal file
11
src/Ombi.Core/Engine/V2/ICalendarEngine.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using Ombi.Core.Models.Search.V2;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ombi.Core.Engine.V2
|
||||
{
|
||||
public interface ICalendarEngine
|
||||
{
|
||||
Task<List<CalendarViewModel>> GetCalendarData();
|
||||
}
|
||||
}
|
10
src/Ombi.Core/Models/Search/V2/CalendarViewModel.cs
Normal file
10
src/Ombi.Core/Models/Search/V2/CalendarViewModel.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
|
||||
namespace Ombi.Core.Models.Search.V2
|
||||
{
|
||||
public class CalendarViewModel
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public DateTime Start { get; set; }
|
||||
}
|
||||
}
|
|
@ -103,6 +103,7 @@ namespace Ombi.DependencyInjection
|
|||
services.AddTransient<IMultiSearchEngine, MultiSearchEngine>();
|
||||
services.AddTransient<IMovieEngineV2, MovieSearchEngineV2>();
|
||||
services.AddTransient<ITVSearchEngineV2, TvSearchEngineV2>();
|
||||
services.AddTransient<ICalendarEngine, CalendarEngine>();
|
||||
}
|
||||
|
||||
public static void RegisterHttp(this IServiceCollection services)
|
||||
|
|
|
@ -31,12 +31,14 @@
|
|||
"node_modules/font-awesome/scss/font-awesome.scss",
|
||||
"node_modules/primeng/resources/primeng.min.css",
|
||||
"node_modules/primeng/resources/themes/nova-light/theme.css",
|
||||
"node_modules/primeicons/primeicons.css"
|
||||
"node_modules/primeicons/primeicons.css",
|
||||
"node_modules/fullcalendar/dist/fullcalendar.min.css"
|
||||
],
|
||||
"scripts": [
|
||||
"node_modules/jquery/dist/jquery.min.js",
|
||||
"node_modules/chart.js/dist/Chart.js",
|
||||
"node_modules/hammerjs/hammer.min.js"
|
||||
"node_modules/hammerjs/hammer.min.js",
|
||||
"node_modules/fullcalendar/dist/fullcalendar.min.js"
|
||||
]
|
||||
},
|
||||
"configurations": {
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
"core-js": "^2.5.4",
|
||||
"eventemitter2": "^5.0.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
"fullcalendar": "4.0.0-alpha.2",
|
||||
"hammerjs": "^2.0.8",
|
||||
"jquery": "3.3.1",
|
||||
"moment": "^2.23.0",
|
||||
|
@ -53,8 +54,8 @@
|
|||
"ngx-page-scroll": "^5.0.1",
|
||||
"pace": "github:HubSpot/pace#v1.0.2",
|
||||
"popper.js": "^1.14.3",
|
||||
"primeng": "^7.0.3",
|
||||
"primeicons": "^1.0.0",
|
||||
"primeng": "^7.0.3",
|
||||
"rxjs": "^6.0.0",
|
||||
"socket.io-client": "^2.2.0",
|
||||
"store": "^2.0.12",
|
||||
|
|
|
@ -64,6 +64,7 @@ const routes: Routes = [
|
|||
{ path: "token", component: TokenResetPasswordComponent },
|
||||
{ path: "landingpage", component: LandingPageComponent },
|
||||
{ path: "auth/cookie", component: CookieComponent },
|
||||
{ loadChildren: "./calendar/calendar.module#CalendarModule", path: "calendar" },
|
||||
{ loadChildren: "./discover/discover.module#DiscoverModule", path: "discover" },
|
||||
{ loadChildren: "./issues/issues.module#IssuesModule", path: "issues" },
|
||||
{ loadChildren: "./settings/settings.module#SettingsModule", path: "Settings" },
|
||||
|
|
39
src/Ombi/ClientApp/src/app/calendar/calendar.module.ts
Normal file
39
src/Ombi/ClientApp/src/app/calendar/calendar.module.ts
Normal file
|
@ -0,0 +1,39 @@
|
|||
import { NgModule } from "@angular/core";
|
||||
import { RouterModule, Routes } from "@angular/router";
|
||||
|
||||
import { RequestService } from "../services";
|
||||
|
||||
import { SharedModule } from "../shared/shared.module";
|
||||
import { PipeModule } from "../pipes/pipe.module";
|
||||
|
||||
import * as fromComponents from './components';
|
||||
import { AuthGuard } from "../auth/auth.guard";
|
||||
import { CalendarComponent } from "./components/calendar.component";
|
||||
|
||||
import { FullCalendarModule } from 'primeng/fullcalendar';
|
||||
import { CalendarService } from "../services/calendar.service";
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: "", component: CalendarComponent, canActivate: [AuthGuard] },
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild(routes),
|
||||
SharedModule,
|
||||
PipeModule,
|
||||
FullCalendarModule,
|
||||
],
|
||||
declarations: [
|
||||
...fromComponents.components
|
||||
],
|
||||
exports: [
|
||||
RouterModule,
|
||||
],
|
||||
providers: [
|
||||
RequestService,
|
||||
CalendarService
|
||||
],
|
||||
|
||||
})
|
||||
export class CalendarModule { }
|
|
@ -0,0 +1,3 @@
|
|||
<div class="small-middle-container">
|
||||
<p-fullCalendar [events]="entries" [options]="options"></p-fullCalendar>
|
||||
</div>
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
.small-middle-container{
|
||||
margin: auto;
|
||||
width: 80%;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
import { Component, OnInit } from "@angular/core";
|
||||
import { CalendarService } from "../../services/calendar.service";
|
||||
import { ICalendarModel } from "../../interfaces/ICalendar";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./calendar.component.html",
|
||||
styleUrls: ["./calendar.component.scss"],
|
||||
})
|
||||
export class CalendarComponent implements OnInit {
|
||||
|
||||
public loadingFlag: boolean;
|
||||
events: any[];
|
||||
options: any;
|
||||
entries: ICalendarModel[];
|
||||
|
||||
constructor(private calendarService: CalendarService) { }
|
||||
|
||||
public async ngOnInit() {
|
||||
debugger;
|
||||
this.loading()
|
||||
this.entries = await this.calendarService.getCalendarEntries();
|
||||
this.events = [
|
||||
{
|
||||
"title": "All Day Event",
|
||||
"start": new Date(),
|
||||
"eventColor":"black"
|
||||
},
|
||||
{
|
||||
"title": "Long Event",
|
||||
"start": "2016-01-07",
|
||||
"end": "2016-01-10"
|
||||
},
|
||||
{
|
||||
"title": "Repeating Event",
|
||||
"start": "2016-01-09T16:00:00"
|
||||
},
|
||||
{
|
||||
"title": "Repeating Event",
|
||||
"start": "2016-01-16T16:00:00"
|
||||
},
|
||||
{
|
||||
"title": "Conference",
|
||||
"start": "2016-01-11",
|
||||
"end": "2016-01-13"
|
||||
}
|
||||
];
|
||||
|
||||
this.options = {
|
||||
defaultDate: new Date(),
|
||||
header: {
|
||||
left: 'prev,next',
|
||||
center: 'title',
|
||||
right: 'month,agendaWeek'
|
||||
},
|
||||
};
|
||||
this.finishLoading();
|
||||
}
|
||||
|
||||
private loading() {
|
||||
this.loadingFlag = true;
|
||||
}
|
||||
|
||||
private finishLoading() {
|
||||
this.loadingFlag = false;
|
||||
}
|
||||
}
|
5
src/Ombi/ClientApp/src/app/calendar/components/index.ts
Normal file
5
src/Ombi/ClientApp/src/app/calendar/components/index.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { CalendarComponent } from "./calendar.component";
|
||||
|
||||
export const components: any[] = [
|
||||
CalendarComponent,
|
||||
];
|
5
src/Ombi/ClientApp/src/app/interfaces/ICalendar.ts
Normal file
5
src/Ombi/ClientApp/src/app/interfaces/ICalendar.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
export interface ICalendarModel {
|
||||
title: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
}
|
|
@ -38,6 +38,7 @@ export class MyNavComponent implements OnInit {
|
|||
{ name: "NavigationBar.Discover", icon: "find_replace", link: "/discover", requiresAdmin: false },
|
||||
{ name: "NavigationBar.Requests", icon: "list", link: "/requests-list", requiresAdmin: false },
|
||||
{ name: "NavigationBar.UserManagement", icon: "account_circle", link: "/usermanagement", requiresAdmin: true },
|
||||
{ name: "NavigationBar.Calendar", icon: "calendar", link: "/calendar", requiresAdmin: false },
|
||||
{ name: "NavigationBar.Settings", icon: "settings", link: "/Settings/About", requiresAdmin: true },
|
||||
]
|
||||
|
||||
|
|
18
src/Ombi/ClientApp/src/app/services/calendar.service.ts
Normal file
18
src/Ombi/ClientApp/src/app/services/calendar.service.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { PlatformLocation, APP_BASE_HREF } from "@angular/common";
|
||||
import { Injectable, Inject } from "@angular/core";
|
||||
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { ServiceHelpers } from "./service.helpers";
|
||||
import { ICalendarModel } from "../interfaces/ICalendar";
|
||||
|
||||
@Injectable()
|
||||
export class CalendarService extends ServiceHelpers {
|
||||
constructor(http: HttpClient, @Inject(APP_BASE_HREF) href:string) {
|
||||
super(http, "/api/v2/Calendar/", href);
|
||||
}
|
||||
public getCalendarEntries(): Promise<ICalendarModel[]> {
|
||||
return this.http.get<ICalendarModel[]>(`${this.url}`, {headers: this.headers}).toPromise();
|
||||
}
|
||||
}
|
|
@ -23,5 +23,6 @@ const invalidProxies: string[] = [
|
|||
'RESET',
|
||||
'CUSTOM',
|
||||
'AUTH',
|
||||
'WIZARD'
|
||||
'WIZARD',
|
||||
"CALENDAR"
|
||||
]
|
|
@ -1425,7 +1425,7 @@ component-bind@1.0.0:
|
|||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1"
|
||||
|
||||
component-emitter@1.2.1, component-emitter@^1.2.1:
|
||||
component-emitter@1.2.1, component-emitter@^1.2.0, component-emitter@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
|
||||
|
||||
|
@ -1504,6 +1504,11 @@ cookie@0.3.1:
|
|||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
|
||||
|
||||
cookiejar@^2.1.0:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c"
|
||||
integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==
|
||||
|
||||
copy-concurrently@^1.0.0:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0"
|
||||
|
@ -2207,7 +2212,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2:
|
|||
assign-symbols "^1.0.0"
|
||||
is-extendable "^1.0.1"
|
||||
|
||||
extend@~3.0.2:
|
||||
extend@^3.0.0, extend@~3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
|
||||
|
||||
|
@ -2414,7 +2419,7 @@ forever-agent@~0.6.1:
|
|||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
|
||||
|
||||
form-data@~2.3.2:
|
||||
form-data@^2.3.1, form-data@~2.3.2:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
|
||||
dependencies:
|
||||
|
@ -2422,6 +2427,11 @@ form-data@~2.3.2:
|
|||
combined-stream "^1.0.6"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
formidable@^1.2.0:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.1.tgz#70fb7ca0290ee6ff961090415f4b3df3d2082659"
|
||||
integrity sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==
|
||||
|
||||
forwarded@~0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
|
||||
|
@ -2478,6 +2488,17 @@ fstream@^1.0.0, fstream@^1.0.2:
|
|||
mkdirp ">=0.5 0"
|
||||
rimraf "2"
|
||||
|
||||
fullcalendar@4.0.0-alpha.2:
|
||||
version "4.0.0-alpha.2"
|
||||
resolved "https://registry.yarnpkg.com/fullcalendar/-/fullcalendar-4.0.0-alpha.2.tgz#af5219bd955ee3c3549a39777808dd1dda645111"
|
||||
integrity sha512-2trFzbvQWHijyt+u8Zv98PPfDkFH5bU5Yoqvn2ot5PTwIkLK95xrNat5jTHfpBMwh+KqHQSnux/BcGXARYgwcw==
|
||||
dependencies:
|
||||
luxon "^1.4.2"
|
||||
moment "^2.22.2"
|
||||
moment-timezone "^0.5.21"
|
||||
rrule "^2.5.6"
|
||||
superagent "^3.8.3"
|
||||
|
||||
function-bind@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||
|
@ -3599,6 +3620,11 @@ lru-cache@^5.1.1:
|
|||
dependencies:
|
||||
yallist "^3.0.2"
|
||||
|
||||
luxon@^1.3.3, luxon@^1.4.2:
|
||||
version "1.12.0"
|
||||
resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.12.0.tgz#d02d53c8d8aaebe6b4c00ba1ce1be3913546b2e7"
|
||||
integrity sha512-enPnPIHd5ZnZT0vpj9Xv8aq4j0yueAkhnh4xUKUHpqlgSm1r/8s6xTMjfyp2ugOWP7zivqJqgVTkW+rpHed61w==
|
||||
|
||||
magic-string@^0.25.0:
|
||||
version "0.25.1"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.1.tgz#b1c248b399cd7485da0fe7385c2fc7011843266e"
|
||||
|
@ -3707,7 +3733,7 @@ merge-descriptors@1.0.1:
|
|||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
|
||||
|
||||
methods@~1.1.2:
|
||||
methods@^1.1.1, methods@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
||||
|
||||
|
@ -3877,7 +3903,14 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0:
|
|||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
moment@^2.10.6, moment@^2.23.0:
|
||||
moment-timezone@^0.5.21:
|
||||
version "0.5.23"
|
||||
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.23.tgz#7cbb00db2c14c71b19303cb47b0fb0a6d8651463"
|
||||
integrity sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w==
|
||||
dependencies:
|
||||
moment ">= 2.9.0"
|
||||
|
||||
"moment@>= 2.9.0", moment@^2.10.6, moment@^2.22.2, moment@^2.23.0:
|
||||
version "2.24.0"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
|
||||
|
||||
|
@ -4889,6 +4922,11 @@ qs@6.5.2, qs@~6.5.2:
|
|||
version "6.5.2"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
|
||||
|
||||
qs@^6.5.1:
|
||||
version "6.7.0"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
|
||||
integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
|
||||
|
||||
querystring-es3@^0.2.0:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
|
||||
|
@ -4984,7 +5022,7 @@ read-pkg@^2.0.0:
|
|||
normalize-package-data "^2.3.2"
|
||||
path-type "^2.0.0"
|
||||
|
||||
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6:
|
||||
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6:
|
||||
version "2.3.6"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
|
||||
dependencies:
|
||||
|
@ -5186,6 +5224,13 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
|
|||
hash-base "^3.0.0"
|
||||
inherits "^2.0.1"
|
||||
|
||||
rrule@^2.5.6:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/rrule/-/rrule-2.6.0.tgz#7aeefe89273e4796d1fabf03051d5e1d68169502"
|
||||
integrity sha512-TRigkTJtG7Y1yOjNSKvFvVmvj/PzRZLR8lLcPW9GASOlaoqoL1J0kNuUV9I3LuZc7qFT+QB2NbxSLL9d33/ylg==
|
||||
optionalDependencies:
|
||||
luxon "^1.3.3"
|
||||
|
||||
run-async@^2.2.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
|
||||
|
@ -5861,6 +5906,22 @@ stylus@0.54.5:
|
|||
sax "0.5.x"
|
||||
source-map "0.1.x"
|
||||
|
||||
superagent@^3.8.3:
|
||||
version "3.8.3"
|
||||
resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.8.3.tgz#460ea0dbdb7d5b11bc4f78deba565f86a178e128"
|
||||
integrity sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==
|
||||
dependencies:
|
||||
component-emitter "^1.2.0"
|
||||
cookiejar "^2.1.0"
|
||||
debug "^3.1.0"
|
||||
extend "^3.0.0"
|
||||
form-data "^2.3.1"
|
||||
formidable "^1.2.0"
|
||||
methods "^1.1.1"
|
||||
mime "^1.4.1"
|
||||
qs "^6.5.1"
|
||||
readable-stream "^2.3.5"
|
||||
|
||||
supports-color@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
||||
|
|
31
src/Ombi/Controllers/V2/CallendarController.cs
Normal file
31
src/Ombi/Controllers/V2/CallendarController.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Ombi.Core.Engine.V2;
|
||||
using Ombi.Core.Models.Search.V2;
|
||||
|
||||
namespace Ombi.Controllers.V2
|
||||
{
|
||||
[ApiV2]
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
public class CalendarController : ControllerBase
|
||||
{
|
||||
public CalendarController(ICalendarEngine calendarEngine)
|
||||
{
|
||||
_calendarEngine = calendarEngine;
|
||||
}
|
||||
|
||||
private readonly ICalendarEngine _calendarEngine;
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public async Task<List<CalendarViewModel>> GetCalendarEntried()
|
||||
{
|
||||
return await _calendarEngine.GetCalendarData();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -61,7 +61,8 @@
|
|||
"Logout": "Logout",
|
||||
"OpenMobileApp": "Open Mobile App",
|
||||
"RecentlyAdded": "Recently Added",
|
||||
"ChangeTheme":"Change Theme"
|
||||
"ChangeTheme":"Change Theme",
|
||||
"Calendar":"Calendar"
|
||||
},
|
||||
"Search": {
|
||||
"Title": "Search",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue