Reworked the newsletter for Emby! Need to rework it for Plex and use the new way to do it.

Fixed collections for Emby #435
This commit is contained in:
tidusjar 2017-02-03 20:26:28 +00:00
commit 8393a31a48
17 changed files with 631 additions and 134 deletions

View file

@ -39,5 +39,6 @@ namespace Ombi.Store.Models.Emby
public DateTime PremierDate { get; set; }
public string ProviderId { get; set; }
public EmbyMediaType Type { get; set; }
public DateTime AddedAt { get; set; }
}
}

View file

@ -25,6 +25,7 @@
// ************************************************************************/
#endregion
using System;
using Dapper.Contrib.Extensions;
namespace Ombi.Store.Models.Emby
@ -39,5 +40,6 @@ namespace Ombi.Store.Models.Emby
public int SeasonNumber { get; set; }
public string ParentId { get; set; }
public string ProviderId { get; set; }
public DateTime AddedAt { get; set; }
}
}

View file

@ -0,0 +1,40 @@
#region Copyright
// /************************************************************************
// Copyright (c) 2016 Jamie Rees
// File: LogEntity.cs
// Created By: Jamie Rees
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// ************************************************************************/
#endregion
using System;
using Dapper.Contrib.Extensions;
using Newtonsoft.Json;
namespace Ombi.Store.Models
{
[Table("RecentlyAddedLog")]
public class RecentlyAddedLog : Entity
{
public string ProviderId { get; set; }
public DateTime AddedAt { get; set; }
}
}

View file

@ -68,6 +68,7 @@
<Compile Include="Models\Emby\EmbyContent.cs" />
<Compile Include="Models\Emby\EmbyEpisodes.cs" />
<Compile Include="Models\IssueBlobs.cs" />
<Compile Include="Models\RecenetlyAddedLog.cs" />
<Compile Include="Models\Plex\PlexEpisodes.cs" />
<Compile Include="Models\Emby\EmbyUsers.cs" />
<Compile Include="Models\Plex\PlexUsers.cs" />

View file

@ -187,7 +187,8 @@ CREATE TABLE IF NOT EXISTS EmbyEpisodes
SeasonNumber INTEGER NOT NULL,
EpisodeNumber INTEGER NOT NULL,
ParentId VARCHAR(100) NOT NULL,
ProviderId VARCHAR(100) NOT NULL
ProviderId VARCHAR(100) NOT NULL,
AddedAt VARCHAR(100) NOT NULL
);
CREATE UNIQUE INDEX IF NOT EXISTS EmbyEpisodes_Id ON EmbyEpisodes (Id);
@ -198,9 +199,21 @@ CREATE TABLE IF NOT EXISTS EmbyContent
PremierDate VARCHAR(100) NOT NULL,
EmbyId VARCHAR(100) NOT NULL,
ProviderId VARCHAR(100) NOT NULL,
Type INTEGER NOT NULL
Type INTEGER NOT NULL,
AddedAt VARCHAR(100) NOT NULL
);
CREATE UNIQUE INDEX IF NOT EXISTS EmbyEpisodes_Id ON EmbyEpisodes (Id);
CREATE TABLE IF NOT EXISTS RecentlyAddedLog
(
Id INTEGER PRIMARY KEY AUTOINCREMENT,
ProviderId VARCHAR(100) NOT NULL,
AddedAt VARCHAR(100) NOT NULL
);
CREATE UNIQUE INDEX IF NOT EXISTS RecentlyAddedLog_Id ON RecentlyAddedLog (Id);
CREATE INDEX IF NOT EXISTS RecentlyAddedLog_ProviderId ON RecentlyAddedLog (ProviderId);
COMMIT;