Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Microsoft.EntityFrameworkCore.Tools from 6.0.9 to 6.0.10 #171

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Joshua must review all changes to deployment and build.sh
.ci/* @joshuaboniface
deployment/* @joshuaboniface
build.sh @joshuaboniface
.ci/* @dannymichel
deployment/* @dannymichel
build.sh @dannymichel
4 changes: 2 additions & 2 deletions .github/workflows/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
label:
name: Labeling
runs-on: ubuntu-latest
if: ${{ github.repository == 'jellyfin/jellyfin' }}
if: ${{ github.repository == 'vesoapp/veso' }}
steps:
- name: Apply label
uses: eps1lon/actions-label-merge-conflict@v2.0.1
Expand All @@ -23,7 +23,7 @@ jobs:
project:
name: Project board
runs-on: ubuntu-latest
if: ${{ github.repository == 'jellyfin/jellyfin' }}
if: ${{ github.repository == 'vesoapp/veso' }}
steps:
- name: Remove from 'Current Release' project
uses: alex-page/github-project-automation-plus@v0.8.1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,4 @@ apiclient/generated

# Omnisharp crash logs
mono_crash.*.json
.DS_Store
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ARG DOTNET_VERSION=6.0
FROM node:lts-alpine as web-builder
ARG JELLYFIN_WEB_VERSION=master
RUN apk add curl git zlib zlib-dev autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool make gcc musl-dev nasm python3 \
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd jellyfin-web-* \
&& curl -L https://github.com/vesoapp/veso-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd veso-web-* \
&& npm ci --no-audit --unsafe-perm \
&& mv dist /dist

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.arm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ARG DOTNET_VERSION=6.0
FROM node:lts-alpine as web-builder
ARG JELLYFIN_WEB_VERSION=master
RUN apk add curl git zlib zlib-dev autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool make gcc musl-dev nasm python3 \
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd jellyfin-web-* \
&& curl -L https://github.com/vesoapp/veso-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd veso-web-* \
&& npm ci --no-audit --unsafe-perm \
&& mv dist /dist

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ARG DOTNET_VERSION=6.0
FROM node:lts-alpine as web-builder
ARG JELLYFIN_WEB_VERSION=master
RUN apk add curl git zlib zlib-dev autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool make gcc musl-dev nasm python3 \
&& curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd jellyfin-web-* \
&& curl -L https://github.com/vesoapp/veso-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \
&& cd veso-web-* \
&& npm ci --no-audit --unsafe-perm \
&& mv dist /dist

Expand Down
4 changes: 1 addition & 3 deletions Emby.Server.Implementations/ApplicationHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
using MediaBrowser.Controller.TV;
using MediaBrowser.LocalMetadata.Savers;
using MediaBrowser.MediaEncoding.BdInfo;
using MediaBrowser.MediaEncoding.Subtitles;
using MediaBrowser.Model.Cryptography;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Globalization;
Expand Down Expand Up @@ -633,8 +632,7 @@ protected virtual void RegisterServices(IServiceCollection serviceCollection)
serviceCollection.AddSingleton<IAuthService, AuthService>();
serviceCollection.AddSingleton<IQuickConnect, QuickConnectManager>();

serviceCollection.AddSingleton<ISubtitleParser, SubtitleEditParser>();
serviceCollection.AddSingleton<ISubtitleEncoder, SubtitleEncoder>();
serviceCollection.AddSingleton<ISubtitleEncoder, MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder>();

serviceCollection.AddSingleton<IAttachmentExtractor, MediaBrowser.MediaEncoding.Attachments.AttachmentExtractor>();

Expand Down
29 changes: 24 additions & 5 deletions Emby.Server.Implementations/Session/SessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Authentication;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Dto;
Expand Down Expand Up @@ -56,6 +57,7 @@ public class SessionManager : ISessionManager, IDisposable
private readonly IMediaSourceManager _mediaSourceManager;
private readonly IServerApplicationHost _appHost;
private readonly IDeviceManager _deviceManager;
private readonly IServerConfigurationManager _config;

/// <summary>
/// The active connections.
Expand All @@ -78,7 +80,8 @@ public class SessionManager : ISessionManager, IDisposable
IImageProcessor imageProcessor,
IServerApplicationHost appHost,
IDeviceManager deviceManager,
IMediaSourceManager mediaSourceManager)
IMediaSourceManager mediaSourceManager,
IServerConfigurationManager config)
{
_logger = logger;
_eventManager = eventManager;
Expand All @@ -91,6 +94,7 @@ public class SessionManager : ISessionManager, IDisposable
_appHost = appHost;
_deviceManager = deviceManager;
_mediaSourceManager = mediaSourceManager;
_config = config;

_deviceManager.DeviceOptionsUpdated += OnDeviceManagerDeviceOptionsUpdated;
}
Expand Down Expand Up @@ -728,12 +732,22 @@ private void OnPlaybackStart(User user, BaseItem item)
{
var data = _userDataManager.GetUserData(user, item);

data.PlayCount++;
data.LastPlayedDate = DateTime.UtcNow;
if (!_config.Configuration.UpdateLastPlayedAndPlayCountOnPlayCompletion)
{
data.PlayCount++;
data.LastPlayedDate = DateTime.UtcNow;
}

if (item.SupportsPlayedStatus && !item.SupportsPositionTicksResume)
if (item.SupportsPlayedStatus)
{
data.Played = true;
if (!item.SupportsPositionTicksResume)
{
data.Played = true;
}
else if (_config.Configuration.MarkResumableItemUnplayedOnPlay)
{
data.Played = false;
}
}
else
{
Expand Down Expand Up @@ -1008,6 +1022,11 @@ private bool OnPlaybackStopped(User user, BaseItem item, long? positionTicks, bo
if (positionTicks.HasValue)
{
playedToCompletion = _userDataManager.UpdatePlayState(item, data, positionTicks.Value);
if (playedToCompletion && _config.Configuration.UpdateLastPlayedAndPlayCountOnPlayCompletion)
{
data.PlayCount++;
data.LastPlayedDate = DateTime.UtcNow;
}
}
else
{
Expand Down
24 changes: 24 additions & 0 deletions Emby.Server.Implementations/TV/TVSeriesManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,30 @@ Episode GetEpisode()
consideredEpisodes.Add(lastWatchedEpisode);
}

if (rewatching)
{
lastQuery.ParentIndexNumberNotEquals = null;
lastQuery.ParentIndexNumber = 0;
Episode lastWatchedSpecialEpisode = _libraryManager.GetItemList(lastQuery).Cast<Episode>().FirstOrDefault();

if (lastWatchedEpisode != null && lastWatchedSpecialEpisode != null)
{
// both regular and special episodes have been watched
// compare viewing dates to find latest watched
// if special was more recently watched, replace lastWatchedEpisode with special
var userDataRegular = _userDataManager.GetUserData(user, lastWatchedEpisode);
var userDataSpecial = _userDataManager.GetUserData(user, lastWatchedSpecialEpisode);
if (userDataSpecial.LastPlayedDate > userDataRegular.LastPlayedDate)
{
lastWatchedEpisode = lastWatchedSpecialEpisode;
// get next regular episode based on recently watched special
nextQuery.MinSortName = null;
nextQuery.MinPremiereDate = lastWatchedEpisode.PremiereDate;
nextEpisode = _libraryManager.GetItemList(nextQuery).Cast<Episode>().FirstOrDefault();
}
}
}

if (nextEpisode != null)
{
consideredEpisodes.Add(nextEpisode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.9">
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.Controller/Entities/UserViewBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public QueryResult<BaseItem> GetUserItems(Folder queryParent, Folder displayPare

private int GetSpecialItemsLimit()
{
return 50;
return 100;
}

private QueryResult<BaseItem> GetMovieFolders(Folder parent, User user, InternalItemsQuery query)
Expand Down
19 changes: 19 additions & 0 deletions MediaBrowser.MediaEncoding/Subtitles/AssParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.Extensions.Logging;
using Nikse.SubtitleEdit.Core.SubtitleFormats;

namespace MediaBrowser.MediaEncoding.Subtitles
{
/// <summary>
/// Advanced SubStation Alpha subtitle parser.
/// </summary>
public class AssParser : SubtitleEditParser<AdvancedSubStationAlpha>
{
/// <summary>
/// Initializes a new instance of the <see cref="AssParser"/> class.
/// </summary>
/// <param name="logger">The logger.</param>
public AssParser(ILogger logger) : base(logger)
{
}
}
}
12 changes: 3 additions & 9 deletions MediaBrowser.MediaEncoding/Subtitles/ISubtitleParser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma warning disable CS1591

using System.IO;
using System.Threading;
using MediaBrowser.Model.MediaInfo;

namespace MediaBrowser.MediaEncoding.Subtitles
Expand All @@ -11,15 +12,8 @@ public interface ISubtitleParser
/// Parses the specified stream.
/// </summary>
/// <param name="stream">The stream.</param>
/// <param name="fileExtension">The file extension.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>SubtitleTrackInfo.</returns>
SubtitleTrackInfo Parse(Stream stream, string fileExtension);

/// <summary>
/// Determines whether the file extension is supported by the parser.
/// </summary>
/// <param name="fileExtension">The file extension.</param>
/// <returns>A value indicating whether the file extension is supported.</returns>
bool SupportsFileExtension(string fileExtension);
SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken);
}
}
19 changes: 19 additions & 0 deletions MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.Extensions.Logging;
using Nikse.SubtitleEdit.Core.SubtitleFormats;

namespace MediaBrowser.MediaEncoding.Subtitles
{
/// <summary>
/// SubRip subtitle parser.
/// </summary>
public class SrtParser : SubtitleEditParser<SubRip>
{
/// <summary>
/// Initializes a new instance of the <see cref="SrtParser"/> class.
/// </summary>
/// <param name="logger">The logger.</param>
public SrtParser(ILogger logger) : base(logger)
{
}
}
}
19 changes: 19 additions & 0 deletions MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.Extensions.Logging;
using Nikse.SubtitleEdit.Core.SubtitleFormats;

namespace MediaBrowser.MediaEncoding.Subtitles
{
/// <summary>
/// SubStation Alpha subtitle parser.
/// </summary>
public class SsaParser : SubtitleEditParser<SubStationAlpha>
{
/// <summary>
/// Initializes a new instance of the <see cref="SsaParser"/> class.
/// </summary>
/// <param name="logger">The logger.</param>
public SsaParser(ILogger logger) : base(logger)
{
}
}
}