Skip to content

Commit

Permalink
Merge pull request #2232 from MediaBrowser/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
LukePulverenti authored Oct 13, 2016
2 parents f8a0c42 + 89d62be commit 8dbdef9
Show file tree
Hide file tree
Showing 79 changed files with 605 additions and 567 deletions.
2 changes: 1 addition & 1 deletion MediaBrowser.Api/ItemUpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public object Get(GetMetadataEditorInfo request)
info.ContentTypeOptions = GetContentTypeOptions(true);
info.ContentType = configuredContentType;

if (string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
if (string.IsNullOrWhiteSpace(inheritedContentType) || string.Equals(inheritedContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
info.ContentTypeOptions = info.ContentTypeOptions
.Where(i => string.IsNullOrWhiteSpace(i.Value) || string.Equals(i.Value, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
Expand Down
9 changes: 8 additions & 1 deletion MediaBrowser.Common.Implementations/BaseApplicationHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,14 @@ public virtual async Task Init(IProgress<double> progress)

JsonSerializer = CreateJsonSerializer();

MemoryStreamProvider = new MemoryStreamProvider();
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
MemoryStreamProvider = new RecyclableMemoryStreamProvider();
}
else
{
MemoryStreamProvider = new MemoryStreamProvider();
}

OnLoggerLoaded(true);
LogManager.LoggerLoaded += (s, e) => OnLoggerLoaded(false);
Expand Down
27 changes: 20 additions & 7 deletions MediaBrowser.Common.Implementations/IO/MemoryStreamProvider.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using MediaBrowser.Common.IO;
using Microsoft.IO;

namespace MediaBrowser.Common.Implementations.IO
{
public class MemoryStreamProvider : IMemoryStreamProvider
public class RecyclableMemoryStreamProvider : IMemoryStreamProvider
{
readonly RecyclableMemoryStreamManager _manager = new RecyclableMemoryStreamManager();

Expand All @@ -28,4 +23,22 @@ public MemoryStream CreateNew(byte[] buffer)
return _manager.GetStream("RecyclableMemoryStream", buffer, 0, buffer.Length);
}
}

public class MemoryStreamProvider : IMemoryStreamProvider
{
public MemoryStream CreateNew()
{
return new MemoryStream();
}

public MemoryStream CreateNew(int capacity)
{
return new MemoryStream(capacity);
}

public MemoryStream CreateNew(byte[] buffer)
{
return new MemoryStream(buffer);
}
}
}
2 changes: 1 addition & 1 deletion MediaBrowser.Controller/Entities/Folder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ public IList<BaseItem> GetRecursiveChildren(Func<BaseItem, bool> filter, bool in
{
var result = new Dictionary<Guid, BaseItem>();

AddChildrenToList(result, true, true, filter);
AddChildrenToList(result, includeLinkedChildren, true, filter);

return result.Values.ToList();
}
Expand Down
1 change: 0 additions & 1 deletion MediaBrowser.Model/LiveTv/RecordingStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ namespace MediaBrowser.Model.LiveTv
public enum RecordingStatus
{
New,
Scheduled,
InProgress,
Completed,
Cancelled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public override void Configure(Container container)
container.Adapter = _containerAdapter;

Plugins.RemoveAll(x => x is NativeTypesFeature);
//Plugins.Add(new SwaggerFeature());
Plugins.Add(new SwaggerFeature());
Plugins.Add(new CorsFeature(allowedHeaders: "Content-Type, Authorization, Range, X-MediaBrowser-Token, X-Emby-Authorization"));

//Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ protected override Series Resolve(ItemResolveArgs args)
return null;
}

if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
{
return new Series
{
Path = args.Path,
Name = Path.GetFileName(args.Path)
};
}

var collectionType = args.GetCollectionType();
if (string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
//if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
//{
// return new Series
// {
// Path = args.Path,
// Name = Path.GetFileName(args.Path)
// };
//}

var configuredContentType = _libraryManager.GetConfiguredContentType(args.Path);
if (!string.Equals(configuredContentType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
{
Expand All @@ -83,6 +83,15 @@ protected override Series Resolve(ItemResolveArgs args)
}
else if (string.IsNullOrWhiteSpace(collectionType))
{
if (args.ContainsFileSystemEntryByName("tvshow.nfo"))
{
return new Series
{
Path = args.Path,
Name = Path.GetFileName(args.Path)
};
}

if (args.Parent.IsRoot)
{
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ public Task<SeriesTimerInfo> GetNewTimerDefaultsAsync(CancellationToken cancella
{
defaults.SeriesId = program.SeriesId;
defaults.ProgramId = program.Id;
defaults.RecordNewOnly = !program.IsRepeat;
}

defaults.SkipEpisodesInLibrary = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ private M3UChannel GetChannelnfo(string extInf, string tunerHostId, string media
}

channel.ImageUrl = FindProperty("tvg-logo", extInf, null);
channel.Number = FindProperty("tvg-id", extInf, channel.Number);
channel.Number = FindProperty("channel-id", extInf, channel.Number);
channel.Number = FindProperty("tvg-id", extInf, channel.Number);
channel.Name = FindProperty("tvg-name", extInf, channel.Name);
channel.Name = FindProperty("tvg-id", extInf, channel.Name);
return channel;
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.Server.Startup.Common/ApplicationHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ public async Task<SystemInfo> GetSystemInfo()
EncoderLocationType = MediaEncoder.EncoderLocationType,
SystemArchitecture = NativeApp.Environment.SystemArchitecture,
SystemUpdateLevel = ConfigurationManager.CommonConfiguration.SystemUpdateLevel,
PackageName = _startupOptions.GetOption("package")
PackageName = _startupOptions.GetOption("-package")
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.299",
"_release": "1.4.299",
"version": "1.4.302",
"_release": "1.4.302",
"_resolution": {
"type": "version",
"tag": "1.4.299",
"commit": "7e708cf27aa74f7f0d0aaa30d95d3e1f09b71ce3"
"tag": "1.4.302",
"commit": "20e464bac58bf2fe4408dc20e98d127fdfa0c692"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,9 @@ button {
right: 0;
margin: 0 .35em .5em 0;
z-index: 1;
padding: 6px;
/*opacity: 0;
transition: opacity 0.5s ease-in; /* vendorless fallback */ */;
transition: opacity 0.5s ease-in; */
}

/*.card:hover .cardOverlayButton {
Expand Down Expand Up @@ -415,12 +416,13 @@ button {
}

.overflowBackdropCard-scalable {
width: 80%;
width: 70%;
max-width: 400px;
}

.overflowSquareCard-scalable {
width: 42%;
width: 40%;
max-width: 200px;
}

@media all and (min-width: 420px) {
Expand All @@ -441,25 +443,32 @@ button {
}
}

@media all and (min-width: 640px) {

.portraitCard-scalable {
width: 25%;
}
@media all and (min-width: 540px) {

.overflowPortraitCard-scalable {
width: 36%;
width: 30%;
}

.overflowBackdropCard-scalable {
width: 60%;
width: 64%;
}

.overflowSquareCard-scalable {
width: 30%;
}
}

@media all and (min-width: 640px) {

.portraitCard-scalable {
width: 25%;
}

.overflowBackdropCard-scalable {
width: 56%;
}
}

@media all and (min-width: 700px) {
.squareCard-scalable {
width: 25%;
Expand Down Expand Up @@ -503,7 +512,7 @@ button {
}

.overflowPortraitCard-scalable {
width: 23%;
width: 22%;
}

.overflowBackdropCard-scalable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,28 +144,31 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
return 1;
case 'overflowPortrait':
if (screenWidth >= 1000) {
return 100 / 23;
return 100 / 22;
}
if (screenWidth >= 640) {
return 100 / 36;
if (screenWidth >= 540) {
return 100 / 30;
}
return 2.5;
return 100 / 40;
case 'overflowSquare':
if (screenWidth >= 1000) {
return 100 / 22;
}
if (screenWidth >= 640) {
if (screenWidth >= 540) {
return 100 / 30;
}
return 100 / 42;
return 100 / 40;
case 'overflowBackdrop':
if (screenWidth >= 1000) {
return 100 / 40;
}
if (screenWidth >= 640) {
return 100 / 60;
return 100 / 56;
}
if (screenWidth >= 540) {
return 100 / 64;
}
return 100 / 84;
return 100 / 70;
default:
return 4;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
}

.paper-icon-button-light > i {
width: auto;
height: auto;
width: 1em;
height: 1em;
font-size: 1.6em;
/* Make sure its on top of the ripple */
position: relative;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="tvGuideHeader">
<div class="channelTimeslotHeader">
<button is="emby-button" type="button" class="btnSelectDate block button-flat">
<button is="emby-button" type="button" class="btnSelectDate block button-flat" style="color:inherit;">
<div class="btnSelectDateContent">
<div class="guideDateText">
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events', 'browser
return true;
}

function fillVibrantOnLoaded(img, url, vibrantElement, canvas, canvasContext) {
function fillVibrantOnLoaded(img, url, vibrantElement) {

vibrantElement = document.getElementById(vibrantElement);
if (!vibrantElement) {
Expand All @@ -148,7 +148,7 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events', 'browser
requestIdleCallback(function () {

//var now = new Date().getTime();
var swatch = getVibrantInfo(canvas || img, url, canvasContext).split('|');
var swatch = getVibrantInfo(img, url).split('|');
//console.log('vibrant took ' + (new Date().getTime() - now) + 'ms');
if (swatch.length) {

Expand Down Expand Up @@ -176,7 +176,7 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events', 'browser

url = url.split('?')[0];

var cacheKey = 'vibrant11';
var cacheKey = 'vibrant21';
return cacheKey + url;
}

Expand All @@ -185,14 +185,14 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events', 'browser
return appSettings.get(getSettingsKey(url));
}

function getVibrantInfo(img, url, canvasContext) {
function getVibrantInfo(img, url) {

var value = getCachedVibrantInfo(url);
if (value) {
return value;
}

var vibrant = new Vibrant(img, canvasContext);
var vibrant = new Vibrant(img);
var swatches = vibrant.swatches();

value = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
if (options.year !== false && item.ProductionYear && item.Type == "Series") {

if (item.Status == "Continuing") {
miscInfo.push(globalize.translate('sharedcomponents#ValueSeriesYearToPresent', item.ProductionYear));
miscInfo.push(globalize.translate('sharedcomponents#SeriesYearToPresent', item.ProductionYear));

}
else if (item.ProductionYear) {
Expand Down
Loading

0 comments on commit 8dbdef9

Please sign in to comment.