mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-06 02:06:21 +00:00
beginning remote subtitle downloading
This commit is contained in:
@@ -327,7 +327,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
|
||||
var categoryKey = string.IsNullOrWhiteSpace(categoryId) ? "root" : categoryId.GetMD5().ToString("N");
|
||||
|
||||
return Path.Combine(_config.ApplicationPaths.CachePath, channelId, categoryKey, user.Id.ToString("N") + ".json");
|
||||
return Path.Combine(_config.ApplicationPaths.CachePath, "channels", channelId, categoryKey, user.Id.ToString("N") + ".json");
|
||||
}
|
||||
|
||||
private async Task<QueryResult<BaseItemDto>> GetReturnItems(IEnumerable<BaseItem> items, User user, ChannelItemQuery query, CancellationToken cancellationToken)
|
||||
|
||||
@@ -93,7 +93,13 @@ namespace MediaBrowser.Server.Implementations.Collections
|
||||
// Find an actual physical folder
|
||||
if (folder is CollectionFolder)
|
||||
{
|
||||
return _libraryManager.RootFolder.Children.OfType<Folder>().First(i => folder.PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase));
|
||||
var child = _libraryManager.RootFolder.Children.OfType<Folder>()
|
||||
.FirstOrDefault(i => folder.PhysicalLocations.Contains(i.Path, StringComparer.OrdinalIgnoreCase));
|
||||
|
||||
if (child != null)
|
||||
{
|
||||
return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +206,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
/// <param name="message">The message.</param>
|
||||
public void Warn(object message)
|
||||
{
|
||||
_logger.Warn(GetMesssage(message));
|
||||
// Hide StringMapTypeDeserializer messages
|
||||
// _logger.Warn(GetMesssage(message));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -216,7 +217,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
/// <param name="args">The args.</param>
|
||||
public void WarnFormat(string format, params object[] args)
|
||||
{
|
||||
_logger.Warn(format, args);
|
||||
// Hide StringMapTypeDeserializer messages
|
||||
// _logger.Warn(format, args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Library.Validators
|
||||
{
|
||||
class PeoplePostScanTask : ILibraryPostScanTask
|
||||
{
|
||||
/// <summary>
|
||||
/// The _library manager
|
||||
/// </summary>
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
|
||||
/// <summary>
|
||||
/// The _logger
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public PeoplePostScanTask(ILibraryManager libraryManager, ILogger logger)
|
||||
{
|
||||
_libraryManager = libraryManager;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs the specified progress.
|
||||
/// </summary>
|
||||
/// <param name="progress">The progress.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
public Task Run(IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
return new PeopleValidator(_libraryManager, _logger).ValidatePeople(cancellationToken, new MetadataRefreshOptions
|
||||
{
|
||||
ImageRefreshMode = ImageRefreshMode.ValidationOnly,
|
||||
MetadataRefreshMode = MetadataRefreshMode.None
|
||||
|
||||
}, progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ using MediaBrowser.Controller.Localization;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MoreLinq;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
@@ -106,16 +105,13 @@ namespace MediaBrowser.Server.Implementations.Localization
|
||||
/// <returns>IEnumerable{CultureDto}.</returns>
|
||||
public IEnumerable<CultureDto> GetCultures()
|
||||
{
|
||||
return CultureInfo.GetCultures(CultureTypes.AllCultures)
|
||||
.OrderBy(c => c.DisplayName)
|
||||
.DistinctBy(c => c.TwoLetterISOLanguageName + c.ThreeLetterISOLanguageName)
|
||||
.Select(c => new CultureDto
|
||||
{
|
||||
Name = c.Name,
|
||||
DisplayName = c.DisplayName,
|
||||
ThreeLetterISOLanguageName = c.ThreeLetterISOLanguageName,
|
||||
TwoLetterISOLanguageName = c.TwoLetterISOLanguageName
|
||||
});
|
||||
var type = GetType();
|
||||
var path = type.Namespace + ".cultures.json";
|
||||
|
||||
using (var stream = type.Assembly.GetManifestResourceStream(path))
|
||||
{
|
||||
return _jsonSerializer.DeserializeFromStream<List<CultureDto>>(stream);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -124,28 +120,13 @@ namespace MediaBrowser.Server.Implementations.Localization
|
||||
/// <returns>IEnumerable{CountryInfo}.</returns>
|
||||
public IEnumerable<CountryInfo> GetCountries()
|
||||
{
|
||||
return CultureInfo.GetCultures(CultureTypes.SpecificCultures)
|
||||
.Select(c =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return new RegionInfo(c.LCID);
|
||||
}
|
||||
catch (CultureNotFoundException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.Where(i => i != null)
|
||||
.OrderBy(c => c.DisplayName)
|
||||
.DistinctBy(c => c.TwoLetterISORegionName)
|
||||
.Select(c => new CountryInfo
|
||||
{
|
||||
Name = c.Name,
|
||||
DisplayName = c.DisplayName,
|
||||
TwoLetterISORegionName = c.TwoLetterISORegionName,
|
||||
ThreeLetterISORegionName = c.ThreeLetterISORegionName
|
||||
});
|
||||
var type = GetType();
|
||||
var path = type.Namespace + ".countries.json";
|
||||
|
||||
using (var stream = type.Assembly.GetManifestResourceStream(path))
|
||||
{
|
||||
return _jsonSerializer.DeserializeFromStream<List<CountryInfo>>(stream);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -627,5 +627,84 @@
|
||||
"OptionSpecialFeatures": "Special Features",
|
||||
"HeaderCollections": "Collections",
|
||||
"HeaderChannels": "Channels",
|
||||
"HeaderMyLibrary": "My Library"
|
||||
"HeaderMyLibrary": "My Library",
|
||||
"LabelProfileCodecsHelp": "Separated by comma. This can be left empty to apply to all codecs.",
|
||||
"LabelProfileContainersHelp": "Separated by comma. This can be left empty to apply to all containers.",
|
||||
"HeaderResponseProfile": "Response Profile",
|
||||
"LabelType": "Type:",
|
||||
"LabelProfileContainer": "Container:",
|
||||
"LabelProfileVideoCodecs": "Video codecs:",
|
||||
"LabelProfileAudioCodecs": "Audio codecs:",
|
||||
"LabelProfileCodecs": "Codecs:",
|
||||
"HeaderDirectPlayProfile": "Direct Play Profile",
|
||||
"HeaderTranscodingProfile": "Transcoding Profile",
|
||||
"HeaderCodecProfile": "Codec Profile",
|
||||
"HeaderCodecProfileHelp": "Define additional conditions that must be met in order for a codec to be direct played.",
|
||||
"HeaderContainerProfile": "Container Profile",
|
||||
"HeaderContainerProfileHelp": "Define additional conditions that must be met in order for a file to be direct played.",
|
||||
"OptionProfileVideo": "Video",
|
||||
"OptionProfileAudio": "Audio",
|
||||
"OptionProfileVideoAudio": "Video Audio",
|
||||
"OptionProfilePhoto": "Photo",
|
||||
"LabelUserLibrary": "User library:",
|
||||
"LabelUserLibraryHelp": "Select which user library to display to the device. Leave empty to inherit the default setting.",
|
||||
"OptionPlainStorageFolders": "Display all folders as plain storage folders",
|
||||
"OptionPlainStorageFoldersHelp": "If enabled, all folders are represented in DIDL as \"object.container.storageFolder\" instead of a more specific type, such as \"object.container.person.musicArtist\".",
|
||||
"OptionPlainVideoItems": "Display all videos as plain video items",
|
||||
"OptionPlainVideoItemsHelp": "If enabled, all videos are represented in DIDL as \"object.item.videoItem\" instead of a more specific type, such as \"object.item.videoItem.movie\".",
|
||||
"LabelSupportedMediaTypes": "Supported Media Types:",
|
||||
"TabIdentification": "Identification",
|
||||
"TabDirectPlay": "Direct Play",
|
||||
"TabContainers": "Containers",
|
||||
"TabCodecs": "Codecs",
|
||||
"TabResponses": "Responses",
|
||||
"HeaderProfileInformation": "Profile Information",
|
||||
"LabelEmbedAlbumArtDidl": "Embed album art in Didl",
|
||||
"LabelEmbedAlbumArtDidlHelp": "Some devices prefer this method for obtaining album art. Others may fail to play with this option enabled.",
|
||||
"LabelAlbumArtPN": "Album art PN:",
|
||||
"LabelAlbumArtHelp": "PN used for album art, within the dlna:profileID attribute on upnp:albumArtURI. Some clients require a specific value, regardless of the size of the image.",
|
||||
"LabelAlbumArtMaxWidth": "Album art max width:",
|
||||
"LabelAlbumArtMaxWidthHelp": "Max resolution of album art exposed via upnp:albumArtURI.",
|
||||
"LabelAlbumArtMaxHeight": "Album art max height:",
|
||||
"LabelAlbumArtMaxHeightHelp": "Max resolution of album art exposed via upnp:albumArtURI.",
|
||||
"LabelIconMaxWidth": "Icon max width:",
|
||||
"LabelIconMaxWidthHelp": "Max resolution of icons exposed via upnp:icon.",
|
||||
"LabelIconMaxHeight": "Icon max height:",
|
||||
"LabelIconMaxHeightHelp": "Max resolution of icons exposed via upnp:icon.",
|
||||
"LabelIdentificationFieldHelp": "A case-insensitive substring or regex expression.",
|
||||
"HeaderProfileServerSettingsHelp": "These values control how Media Browser will present itself to the device.",
|
||||
"LabelMaxBitrate": "Max bitrate:",
|
||||
"LabelMaxBitrateHelp": "Specify a max bitrate in bandwidth constrained environments, or if the device imposes it's own limit.",
|
||||
"OptionIgnoreTranscodeByteRangeRequests": "Ignore transcode byte range requests",
|
||||
"OptionIgnoreTranscodeByteRangeRequestsHelp": "If enabled, these requests will be honored but will ignore the byte range header.",
|
||||
"LabelFriendlyName": "Friendly name",
|
||||
"LabelManufacturer": "Manufacturer",
|
||||
"LabelManufacturerUrl": "Manufacturer url",
|
||||
"LabelModelName": "Model name",
|
||||
"LabelModelNumber": "Model number",
|
||||
"LabelModelDescription": "Model description",
|
||||
"LabelModelUrl": "Model url",
|
||||
"LabelSerialNumber": "Serial number",
|
||||
"LabelDeviceDescription": "Device description",
|
||||
"HeaderIdentificationCriteriaHelp": "Enter at least one identification criteria.",
|
||||
"HeaderDirectPlayProfileHelp": "Add direct play profiles to indicate which formats the device can handle natively.",
|
||||
"HeaderTranscodingProfileHelp": "Add transcoding profiles to indicate which formats should be used when transcoding is required.",
|
||||
"HeaderContainerProfileHelp": "Container profiles indicate the limitations of a device when playing specific formats. If a limitation applies then the media will be transcoded, even if the format is configured for direct play.",
|
||||
"HeaderCodecProfileHelp": "Codec profiles indicate the limitations of a device when playing specific codecs. If a limitation applies then the media will be transcoded, even if the codec is configured for direct play.",
|
||||
"HeaderResponseProfileHelp": "Response profiles provide a way to customize information sent to the device when playing certain kinds of media.",
|
||||
"LabelXDlnaCap": "X-Dlna cap:",
|
||||
"LabelXDlnaCapHelp": "Determines the content of the X_DLNACAP element in the urn:schemas-dlna-org:device-1-0 namespace.",
|
||||
"LabelXDlnaDoc": "X-Dlna doc:",
|
||||
"LabelXDlnaDocHelp": "Determines the content of the X_DLNADOC element in the urn:schemas-dlna-org:device-1-0 namespace.",
|
||||
"LabelSonyAggregationFlags": "Sony aggregation flags:",
|
||||
"LabelSonyAggregationFlagsHelp": "Determines the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace.",
|
||||
"LabelTranscodingContainer": "Container:",
|
||||
"LabelTranscodingVideoCodec": "Video codec:",
|
||||
"LabelTranscodingVideoProfile": "Video profile:",
|
||||
"LabelTranscodingAudioCodec": "Audio codec:",
|
||||
"OptionEnableM2tsMode": "Enable M2ts mode",
|
||||
"OptionEnableM2tsModeHelp": "Enable m2ts mode when encoding to mpegts.",
|
||||
"OptionEstimateContentLength": "Estimate content length when transcoding",
|
||||
"OptionReportByteRangeSeekingWhenTranscoding": "Report that the server supports byte seeking when transcoding",
|
||||
"OptionReportByteRangeSeekingWhenTranscodingHelp": "This is required for some devices that don't time seek very well."
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -169,7 +169,6 @@
|
||||
<Compile Include="Library\Validators\GenresValidator.cs" />
|
||||
<Compile Include="Library\Validators\MusicGenresPostScanTask.cs" />
|
||||
<Compile Include="Library\Validators\MusicGenresValidator.cs" />
|
||||
<Compile Include="Library\Validators\PeoplePostScanTask.cs" />
|
||||
<Compile Include="Library\Validators\PeopleValidator.cs" />
|
||||
<Compile Include="Library\Validators\StudiosPostScanTask.cs" />
|
||||
<Compile Include="Library\Validators\StudiosValidator.cs" />
|
||||
@@ -328,6 +327,8 @@
|
||||
<EmbeddedResource Include="Localization\Server\ms.json" />
|
||||
<EmbeddedResource Include="Localization\JavaScript\kk.json" />
|
||||
<EmbeddedResource Include="Localization\Server\kk.json" />
|
||||
<EmbeddedResource Include="Localization\countries.json" />
|
||||
<EmbeddedResource Include="Localization\cultures.json" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user