From fadd9174b7f492c8b11fad979a513625b203e2d4 Mon Sep 17 00:00:00 2001
From: Luke Pulverenti
Date: Thu, 19 Mar 2015 13:34:53 -0400
Subject: [PATCH 01/29] update movie guide
---
.../dashboard-ui/scripts/librarybrowser.js | 34 +++++++++++++++----
.../dashboard-ui/scripts/livetvitems.js | 5 +--
2 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/scripts/librarybrowser.js b/MediaBrowser.WebDashboard/dashboard-ui/scripts/librarybrowser.js
index b149d3b12d..c035766018 100644
--- a/MediaBrowser.WebDashboard/dashboard-ui/scripts/librarybrowser.js
+++ b/MediaBrowser.WebDashboard/dashboard-ui/scripts/librarybrowser.js
@@ -986,19 +986,41 @@
primaryImageAspectRatio = LibraryBrowser.getAveragePrimaryImageAspectRatio([item]);
- var futureDateText;
+ if (options.showPremiereDateIndex) {
- if (item.PremiereDate) {
- try {
+ var futureDateText;
+
+ if (item.PremiereDate) {
+ try {
+
+ futureDateText = LibraryBrowser.getFutureDateText(parseISO8601Date(item.PremiereDate, { toLocal: true }), true);
- futureDateText = LibraryBrowser.getFutureDateText(parseISO8601Date(item.PremiereDate, { toLocal: true }), true);
+ } catch (err) {
+
+ }
+ }
+
+ var val = futureDateText || Globalize.translate('HeaderUnknownDate');
- } catch (err) {
+ if (val != currentIndexValue) {
+ html += '';
+ currentIndexValue = val;
}
}
+ else if (options.showStartDateIndex) {
+
+ var futureDateText;
+
+ if (item.StartDate) {
+ try {
+
+ futureDateText = LibraryBrowser.getFutureDateText(parseISO8601Date(item.StartDate, { toLocal: true }), true);
+
+ } catch (err) {
- if (options.showPremiereDateIndex && futureDateText) {
+ }
+ }
var val = futureDateText || Globalize.translate('HeaderUnknownDate');
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/scripts/livetvitems.js b/MediaBrowser.WebDashboard/dashboard-ui/scripts/livetvitems.js
index e9632048fa..4dfbec2033 100644
--- a/MediaBrowser.WebDashboard/dashboard-ui/scripts/livetvitems.js
+++ b/MediaBrowser.WebDashboard/dashboard-ui/scripts/livetvitems.js
@@ -52,8 +52,7 @@
limit: query.Limit,
totalRecordCount: result.TotalRecordCount,
viewButton: true,
- showLimit: false,
- addSelectionButton: true
+ showLimit: false
});
$('.listTopPaging', page).html(pagingHtml).trigger('create');
@@ -69,6 +68,7 @@
showTitle: false,
centerText: true,
lazy: true,
+ showStartDateIndex: true,
overlayText: false,
showProgramAirInfo: true
});
@@ -79,6 +79,7 @@
shape: "portrait",
context: 'livetv',
showTitle: true,
+ showStartDateIndex: true,
lazy: true,
cardLayout: true,
showProgramAirInfo: true
From 88547e470369e27dc11514cbe076cfcfdefece6e Mon Sep 17 00:00:00 2001
From: Luke Pulverenti
Date: Fri, 20 Mar 2015 01:40:51 -0400
Subject: [PATCH 02/29] update ILiveTvService
---
.../Playback/BaseStreamingService.cs | 4 +-
.../LiveTv/ILiveTvManager.cs | 4 +-
.../LiveTv/ILiveTvService.cs | 23 +++-
.../Encoder/BaseEncoder.cs | 5 +-
.../LiveTv/LiveTvManager.cs | 110 ++++++++++++------
.../dashboard-ui/dashboard.html | 4 -
.../dashboard-ui/scripts/dashboardpage.js | 1 -
.../dashboard-ui/scripts/mediaplayer.js | 2 +-
Nuget/MediaBrowser.Common.Internal.nuspec | 4 +-
Nuget/MediaBrowser.Common.nuspec | 2 +-
Nuget/MediaBrowser.Model.Signed.nuspec | 2 +-
Nuget/MediaBrowser.Server.Core.nuspec | 4 +-
12 files changed, 105 insertions(+), 60 deletions(-)
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 7115ddffdb..5c857aa379 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1816,12 +1816,10 @@ protected async Task GetState(StreamRequest request, CancellationTo
}
private void AttachMediaStreamInfo(StreamState state,
- ChannelMediaInfo mediaInfo,
+ MediaSourceInfo mediaSource,
VideoStreamRequest videoRequest,
string requestedUrl)
{
- var mediaSource = mediaInfo.ToMediaSource();
-
state.InputProtocol = mediaSource.Protocol;
state.MediaPath = mediaSource.Path;
state.RunTimeTicks = mediaSource.RunTimeTicks;
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index 9b36454d2a..0b58a92328 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -149,7 +149,7 @@ public interface ILiveTvManager
/// The identifier.
/// The cancellation token.
/// Task{Stream}.
- Task GetRecordingStream(string id, CancellationToken cancellationToken);
+ Task GetRecordingStream(string id, CancellationToken cancellationToken);
///
/// Gets the channel stream.
@@ -157,7 +157,7 @@ public interface ILiveTvManager
/// The identifier.
/// The cancellation token.
/// Task{StreamResponseInfo}.
- Task GetChannelStream(string id, CancellationToken cancellationToken);
+ Task GetChannelStream(string id, CancellationToken cancellationToken);
///
/// Gets the program.
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs
index 993db00043..d7e3df4e23 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs
@@ -4,6 +4,7 @@
using System.Threading.Tasks;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Drawing;
+using MediaBrowser.Model.Dto;
namespace MediaBrowser.Controller.LiveTv
{
@@ -172,18 +173,36 @@ public interface ILiveTvService
/// Gets the recording stream.
///
/// The recording identifier.
+ /// The stream identifier.
/// The cancellation token.
/// Task{Stream}.
- Task GetRecordingStream(string recordingId, CancellationToken cancellationToken);
+ Task GetRecordingStream(string recordingId, string streamId, CancellationToken cancellationToken);
///
/// Gets the channel stream.
///
/// The channel identifier.
+ /// The stream identifier.
/// The cancellation token.
/// Task{Stream}.
- Task GetChannelStream(string channelId, CancellationToken cancellationToken);
+ Task GetChannelStream(string channelId, string streamId, CancellationToken cancellationToken);
+ ///
+ /// Gets the channel stream media sources.
+ ///
+ /// The channel identifier.
+ /// The cancellation token.
+ /// Task<List<MediaSourceInfo>>.
+ Task> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken);
+
+ ///
+ /// Gets the recording stream media sources.
+ ///
+ /// The recording identifier.
+ /// The cancellation token.
+ /// Task<List<MediaSourceInfo>>.
+ Task> GetRecordingStreamMediaSources(string recordingId, CancellationToken cancellationToken);
+
///
/// Closes the live stream.
///
diff --git a/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
index 6ddc3487de..44e0d15173 100644
--- a/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
+++ b/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs
@@ -10,6 +10,7 @@
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Drawing;
+using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
@@ -527,11 +528,9 @@ private async Task AcquireResources(EncodingJob state, CancellationToken cancell
}
private void AttachMediaStreamInfo(EncodingJob state,
- ChannelMediaInfo mediaInfo,
+ MediaSourceInfo mediaSource,
EncodingJobOptions videoRequest)
{
- var mediaSource = mediaInfo.ToMediaSource();
-
state.InputProtocol = mediaSource.Protocol;
state.MediaPath = mediaSource.Path;
state.RunTimeTicks = mediaSource.RunTimeTicks;
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index 777a8936b9..075451146d 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Common;
+using System.Globalization;
+using MediaBrowser.Common;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Progress;
@@ -14,6 +15,7 @@
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Sorting;
+using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.LiveTv;
@@ -304,12 +306,12 @@ public async Task GetInternalRecording(string id, Cancellation
private readonly SemaphoreSlim _liveStreamSemaphore = new SemaphoreSlim(1, 1);
- public async Task GetRecordingStream(string id, CancellationToken cancellationToken)
+ public async Task GetRecordingStream(string id, CancellationToken cancellationToken)
{
return await GetLiveStream(id, false, cancellationToken).ConfigureAwait(false);
}
- public async Task GetChannelStream(string id, CancellationToken cancellationToken)
+ public async Task GetChannelStream(string id, CancellationToken cancellationToken)
{
return await GetLiveStream(id, true, cancellationToken).ConfigureAwait(false);
}
@@ -324,20 +326,20 @@ private ILiveTvService GetService(string name)
return _services.FirstOrDefault(i => string.Equals(i.Name, name, StringComparison.OrdinalIgnoreCase));
}
- private async Task GetLiveStream(string id, bool isChannel, CancellationToken cancellationToken)
+ private async Task GetLiveStream(string id, bool isChannel, CancellationToken cancellationToken)
{
await _liveStreamSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
try
{
- ChannelMediaInfo info;
+ MediaSourceInfo info;
if (isChannel)
{
var channel = GetInternalChannel(id);
var service = GetService(channel);
_logger.Info("Opening channel stream from {0}, external channel Id: {1}", service.Name, channel.ExternalId);
- info = await service.GetChannelStream(channel.ExternalId, cancellationToken).ConfigureAwait(false);
+ info = await service.GetChannelStream(channel.ExternalId, null, cancellationToken).ConfigureAwait(false);
}
else
{
@@ -345,7 +347,7 @@ private async Task GetLiveStream(string id, bool isChannel, Ca
var service = GetService(recording);
_logger.Info("Opening recording stream from {0}, external recording Id: {1}", service.Name, recording.RecordingInfo.Id);
- info = await service.GetRecordingStream(recording.RecordingInfo.Id, cancellationToken).ConfigureAwait(false);
+ info = await service.GetRecordingStream(recording.RecordingInfo.Id, null, cancellationToken).ConfigureAwait(false);
}
_logger.Info("Live stream info: {0}", _jsonSerializer.SerializeToString(info));
@@ -375,41 +377,73 @@ private async Task GetLiveStream(string id, bool isChannel, Ca
}
}
- private void Sanitize(ChannelMediaInfo info)
+ private void Sanitize(MediaSourceInfo mediaSource)
{
- // Clean some bad data coming from providers
-
- if (info.AudioBitrate.HasValue && info.AudioBitrate <= 0)
- {
- info.AudioBitrate = null;
- }
- if (info.VideoBitrate.HasValue && info.VideoBitrate <= 0)
- {
- info.VideoBitrate = null;
- }
- if (info.AudioChannels.HasValue && info.AudioChannels <= 0)
- {
- info.AudioChannels = null;
- }
- if (info.Framerate.HasValue && info.Framerate <= 0)
- {
- info.Framerate = null;
- }
- if (info.Width.HasValue && info.Width <= 0)
+ if (mediaSource.MediaStreams.Count == 0)
{
- info.Width = null;
- }
- if (info.Height.HasValue && info.Height <= 0)
- {
- info.Height = null;
+ mediaSource.MediaStreams.AddRange(new List
+ {
+ new MediaStream
+ {
+ Type = MediaStreamType.Video,
+ // Set the index to -1 because we don't know the exact index of the video stream within the container
+ Index = -1
+ },
+ new MediaStream
+ {
+ Type = MediaStreamType.Audio,
+ // Set the index to -1 because we don't know the exact index of the audio stream within the container
+ Index = -1
+ }
+ });
}
- if (info.AudioSampleRate.HasValue && info.AudioSampleRate <= 0)
+
+ // Clean some bad data coming from providers
+ foreach (var stream in mediaSource.MediaStreams)
{
- info.AudioSampleRate = null;
+ if (stream.BitRate.HasValue && stream.BitRate <= 0)
+ {
+ stream.BitRate = null;
+ }
+ if (stream.Channels.HasValue && stream.Channels <= 0)
+ {
+ stream.Channels = null;
+ }
+ if (stream.AverageFrameRate.HasValue && stream.AverageFrameRate <= 0)
+ {
+ stream.AverageFrameRate = null;
+ }
+ if (stream.RealFrameRate.HasValue && stream.RealFrameRate <= 0)
+ {
+ stream.RealFrameRate = null;
+ }
+ if (stream.Width.HasValue && stream.Width <= 0)
+ {
+ stream.Width = null;
+ }
+ if (stream.Height.HasValue && stream.Height <= 0)
+ {
+ stream.Height = null;
+ }
+ if (stream.SampleRate.HasValue && stream.SampleRate <= 0)
+ {
+ stream.SampleRate = null;
+ }
+ if (stream.Level.HasValue && stream.Level <= 0)
+ {
+ stream.Level = null;
+ }
}
- if (info.VideoLevel.HasValue && info.VideoLevel <= 0)
+
+ var indexes = mediaSource.MediaStreams.Select(i => i.Index).Distinct().ToList();
+
+ // If there are duplicate stream indexes, set them all to unknown
+ if (indexes.Count != mediaSource.MediaStreams.Count)
{
- info.VideoLevel = null;
+ foreach (var stream in mediaSource.MediaStreams)
+ {
+ stream.Index = -1;
+ }
}
}
@@ -1433,7 +1467,7 @@ private LiveTvProgram GetCurrentProgram(string externalChannelId)
return program;
}
- private async Task> GetNewTimerDefaultsInternal(CancellationToken cancellationToken, LiveTvProgram program = null)
+ private async Task> GetNewTimerDefaultsInternal(CancellationToken cancellationToken, LiveTvProgram program = null)
{
var service = program != null && !string.IsNullOrWhiteSpace(program.ServiceName) ?
GetService(program) :
@@ -1679,7 +1713,7 @@ public async Task> GetRecordingGroups(RecordingGr
class LiveStreamData
{
- internal ChannelMediaInfo Info;
+ internal MediaSourceInfo Info;
internal int ConsumerCount;
internal string ItemId;
internal bool IsChannel;
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/dashboard.html b/MediaBrowser.WebDashboard/dashboard-ui/dashboard.html
index 15ac783174..5a2f040fab 100644
--- a/MediaBrowser.WebDashboard/dashboard-ui/dashboard.html
+++ b/MediaBrowser.WebDashboard/dashboard-ui/dashboard.html
@@ -111,10 +111,6 @@ ${HeaderPaths}
${LabelTranscodingTemporaryFiles}
-
- ${LabelImagesByName}
-
-
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/scripts/dashboardpage.js b/MediaBrowser.WebDashboard/dashboard-ui/scripts/dashboardpage.js
index ffe33ed5ca..e011cf4ff6 100644
--- a/MediaBrowser.WebDashboard/dashboard-ui/scripts/dashboardpage.js
+++ b/MediaBrowser.WebDashboard/dashboard-ui/scripts/dashboardpage.js
@@ -60,7 +60,6 @@
$('#cachePath', page).html(systemInfo.CachePath);
$('#logPath', page).html(systemInfo.LogPath);
- $('#imagesByNamePath', page).html(systemInfo.ItemsByNamePath);
$('#transcodingTemporaryPath', page).html(systemInfo.TranscodingTempPath);
$('#metadataPath', page).html(systemInfo.InternalMetadataPath);
},
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js b/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
index 5caa88ef34..304872884a 100644
--- a/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
+++ b/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
@@ -589,7 +589,7 @@
var mediaSource;
- ApiClient.getJSON(ApiClient.getUrl('Items/' + item.Id + '/MediaInfo', {
+ ApiClient.getJSON(ApiClient.getUrl('Items/' + item.Id + '/PlaybackInfo', {
userId: Dashboard.getCurrentUserId()
})).done(function (result) {
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
index bbdce1f110..ea30ffd4fa 100644
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ b/Nuget/MediaBrowser.Common.Internal.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common.Internal
- 3.0.593
+ 3.0.594
MediaBrowser.Common.Internal
Luke
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.
Copyright © Media Browser 2013
-
+
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index 7aa7a9f695..1802aaf879 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common
- 3.0.593
+ 3.0.594
MediaBrowser.Common
Media Browser Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspec
index b33205c1e1..2a0d38bbf6 100644
--- a/Nuget/MediaBrowser.Model.Signed.nuspec
+++ b/Nuget/MediaBrowser.Model.Signed.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Model.Signed
- 3.0.593
+ 3.0.594
MediaBrowser.Model - Signed Edition
Media Browser Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index 9d6ad279ca..4fd30306b9 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Server.Core
- 3.0.593
+ 3.0.594
Media Browser.Server.Core
Media Browser Team
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains core components required to build plugins for Media Browser Server.
Copyright © Media Browser 2013
-
+
From 1ed664c55f8d1cb39cec92760862499be986a59e Mon Sep 17 00:00:00 2001
From: Luke Pulverenti
Date: Fri, 20 Mar 2015 13:17:03 -0400
Subject: [PATCH 03/29] improve people naming
---
.../UserLibrary/ArtistsService.cs | 1 -
.../Library/LibraryManager.cs | 9 ++++++-
.../Session/WebSocketController.cs | 25 -------------------
SharedVersion.cs | 4 +--
4 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/MediaBrowser.Api/UserLibrary/ArtistsService.cs b/MediaBrowser.Api/UserLibrary/ArtistsService.cs
index 121d395ba3..dd9825debd 100644
--- a/MediaBrowser.Api/UserLibrary/ArtistsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ArtistsService.cs
@@ -5,7 +5,6 @@
using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Querying;
using ServiceStack;
using System;
using System.Collections.Generic;
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 1f82e7ef13..64e5d20c99 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -886,7 +886,14 @@ private T GetItemByName(string path, string name)
if (type == typeof(Person))
{
- subFolderPrefix = validFilename.Substring(0, 1);
+ var subFolderIndex = 0;
+
+ while (!char.IsLetterOrDigit(validFilename[subFolderIndex]))
+ {
+ subFolderIndex++;
+ }
+
+ subFolderPrefix = validFilename.Substring(subFolderIndex, 1);
}
var fullPath = string.IsNullOrEmpty(subFolderPrefix) ?
diff --git a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
index 19aaaf8a55..f51998feac 100644
--- a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
+++ b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
@@ -233,8 +233,6 @@ public Task SendMessage(string name, T data, CancellationToken cancellationTo
private Task SendMessageInternal(WebSocketMessage message, CancellationToken cancellationToken)
{
- if (SkipSending()) return Task.FromResult(true);
-
var socket = GetActiveSocket();
return socket.SendAsync(message, cancellationToken);
@@ -242,8 +240,6 @@ private Task SendMessageInternal(WebSocketMessage message, CancellationTok
private Task SendMessagesInternal(WebSocketMessage message, CancellationToken cancellationToken)
{
- if (SkipSending()) return Task.FromResult(true);
-
var tasks = GetActiveSockets().Select(i => Task.Run(async () =>
{
try
@@ -260,27 +256,6 @@ private Task SendMessagesInternal(WebSocketMessage message, CancellationTo
return Task.WhenAll(tasks);
}
- private bool SkipSending()
- {
- if (Session != null)
- {
- if (string.Equals(Session.Client, "mb-classic", StringComparison.OrdinalIgnoreCase))
- {
- Version version;
-
- if (!string.IsNullOrWhiteSpace(Session.ApplicationVersion) && Version.TryParse(Session.ApplicationVersion, out version))
- {
- if (version < new Version(3, 0, 196))
- {
- _logger.Debug("Skipping web socket message to MBC version {0}.", version);
- return true;
- }
- }
- }
- }
- return false;
- }
-
public void Dispose()
{
foreach (var socket in Sockets.ToList())
diff --git a/SharedVersion.cs b/SharedVersion.cs
index 851d73ed7c..3f8cacbfac 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-//[assembly: AssemblyVersion("3.0.*")]
-[assembly: AssemblyVersion("3.0.5557.0")]
+[assembly: AssemblyVersion("3.0.*")]
+//[assembly: AssemblyVersion("3.0.5557.0")]
From 701a39a9d67dd6e460816807df09d7bdd42ac0e3 Mon Sep 17 00:00:00 2001
From: Luke Pulverenti
Date: Fri, 20 Mar 2015 13:29:18 -0400
Subject: [PATCH 04/29] update call to stop transcoding
---
.../dashboard-ui/scripts/mediaplayer.js | 9 +++++++--
.../thirdparty/apiclient/mediabrowser.apiclient.js | 13 +++++++++----
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js b/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
index 304872884a..ec3cc5ed10 100644
--- a/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
+++ b/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
@@ -138,6 +138,7 @@
var transcodingExtension;
var isStatic;
+ var currentStreamId = getParameterByName('StreamId', currentSrc);
if (self.currentItem.MediaType == "Video") {
@@ -172,6 +173,7 @@
if (finalParams.isStatic) {
currentSrc = currentSrc.replace('.webm', '.mp4').replace('.m3u8', '.mp4');
+ currentSrc = replaceQueryString(currentSrc, 'StreamId', '');
} else {
currentSrc = currentSrc.replace('.mp4', transcodingExtension).replace('.m4v', transcodingExtension).replace('.mkv', transcodingExtension).replace('.webm', transcodingExtension);
currentSrc = replaceQueryString(currentSrc, 'StreamId', new Date().getTime());
@@ -209,7 +211,7 @@
});
if (self.currentItem.MediaType == "Video") {
- ApiClient.stopActiveEncodings().done(function () {
+ ApiClient.stopActiveEncodings(currentStreamId).done(function () {
self.startTimeTicksOffset = ticks;
element.src = currentSrc;
@@ -1269,6 +1271,8 @@
var playerElement = this;
+ var currentStreamId = getParameterByName('StreamId', playerElement.currentSrc);
+
$(playerElement).off('.mediaplayerevent').off('ended.playbackstopped');
self.cleanup(playerElement);
@@ -1279,7 +1283,8 @@
var mediaSource = self.currentMediaSource;
if (item.MediaType == "Video") {
- ApiClient.stopActiveEncodings();
+
+ ApiClient.stopActiveEncodings(currentStreamId);
if (self.isFullScreen()) {
self.exitFullScreen();
}
diff --git a/MediaBrowser.WebDashboard/dashboard-ui/thirdparty/apiclient/mediabrowser.apiclient.js b/MediaBrowser.WebDashboard/dashboard-ui/thirdparty/apiclient/mediabrowser.apiclient.js
index b65c829213..8ce9a7788c 100644
--- a/MediaBrowser.WebDashboard/dashboard-ui/thirdparty/apiclient/mediabrowser.apiclient.js
+++ b/MediaBrowser.WebDashboard/dashboard-ui/thirdparty/apiclient/mediabrowser.apiclient.js
@@ -1881,12 +1881,17 @@
});
};
- self.stopActiveEncodings = function () {
-
- var url = self.getUrl("Videos/ActiveEncodings", {
+ self.stopActiveEncodings = function (streamId) {
+ var options = {
deviceId: deviceId
- });
+ };
+
+ if (streamId) {
+ options.streamId = streamId;
+ }
+
+ var url = self.getUrl("Videos/ActiveEncodings", options);
return self.ajax({
type: "DELETE",
From 287c2ff1385df47ea5cc321baebedc5482928293 Mon Sep 17 00:00:00 2001
From: Luke Pulverenti
Date: Fri, 20 Mar 2015 16:06:04 -0400
Subject: [PATCH 05/29] incorporate file length into image cache tag
---
.../Playback/Hls/BaseHlsService.cs | 3 +-
MediaBrowser.Controller/Entities/BaseItem.cs | 22 ++++++--
.../Entities/ItemImageInfo.cs | 6 +++
MediaBrowser.Model/ApiClient/IApiClient.cs | 3 +-
.../Manager/ItemImageProvider.cs | 1 +
.../Drawing/ImageProcessor.cs | 54 ++++++++++++-------
.../Dto/DtoService.cs | 5 +-
.../dashboard-ui/scripts/externalplayer.js | 1 -
8 files changed, 66 insertions(+), 29 deletions(-)
diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
index 8541a60ef5..d4c0ddc70e 100644
--- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
@@ -107,8 +107,7 @@ private async Task