mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Make books resumable and have duration of 1 second
This commit is contained in:
parent
6d4f3c42a2
commit
613748b45d
@ -240,7 +240,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
{
|
{
|
||||||
// Enforce MinResumeDuration
|
// Enforce MinResumeDuration
|
||||||
var durationSeconds = TimeSpan.FromTicks(runtimeTicks).TotalSeconds;
|
var durationSeconds = TimeSpan.FromTicks(runtimeTicks).TotalSeconds;
|
||||||
if (durationSeconds < _config.Configuration.MinResumeDurationSeconds)
|
if (durationSeconds < _config.Configuration.MinResumeDurationSeconds && !(item is Book))
|
||||||
{
|
{
|
||||||
positionTicks = 0;
|
positionTicks = 0;
|
||||||
data.Played = playedToCompletion = true;
|
data.Played = playedToCompletion = true;
|
||||||
|
@ -11,6 +11,10 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public override string MediaType => Model.Entities.MediaType.Book;
|
public override string MediaType => Model.Entities.MediaType.Book;
|
||||||
|
|
||||||
|
public override bool SupportsPlayedStatus => true;
|
||||||
|
|
||||||
|
public override bool SupportsPositionTicksResume => true;
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string SeriesPresentationUniqueKey { get; set; }
|
public string SeriesPresentationUniqueKey { get; set; }
|
||||||
|
|
||||||
@ -20,6 +24,11 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Guid SeriesId { get; set; }
|
public Guid SeriesId { get; set; }
|
||||||
|
|
||||||
|
public Book()
|
||||||
|
{
|
||||||
|
this.RunTimeTicks = TimeSpan.TicksPerSecond;
|
||||||
|
}
|
||||||
|
|
||||||
public string FindSeriesSortName()
|
public string FindSeriesSortName()
|
||||||
{
|
{
|
||||||
return SeriesName;
|
return SeriesName;
|
||||||
|
Loading…
Reference in New Issue
Block a user