commit
850f1c79f1
@ -0,0 +1,36 @@
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.IO;
|
||||
|
||||
namespace Emby.Server.Implementations.Library;
|
||||
|
||||
/// <summary>
|
||||
/// IPathManager implementation.
|
||||
/// </summary>
|
||||
public class PathManager : IPathManager
|
||||
{
|
||||
private readonly IServerConfigurationManager _config;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PathManager"/> class.
|
||||
/// </summary>
|
||||
/// <param name="config">The server configuration manager.</param>
|
||||
public PathManager(
|
||||
IServerConfigurationManager config)
|
||||
{
|
||||
_config = config;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public string GetTrickplayDirectory(BaseItem item, bool saveWithMedia = false)
|
||||
{
|
||||
var basePath = _config.ApplicationPaths.TrickplayPath;
|
||||
var idString = item.Id.ToString("N", CultureInfo.InvariantCulture);
|
||||
|
||||
return saveWithMedia
|
||||
? Path.Combine(item.ContainingFolderPath, Path.ChangeExtension(item.Path, ".trickplay"))
|
||||
: Path.Combine(basePath, idString);
|
||||
}
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Model.System;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace Jellyfin.Server.ServerSetupApp;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a fake application pipeline that will only exist for as long as the main app is not started.
|
||||
/// </summary>
|
||||
public sealed class SetupServer : IDisposable
|
||||
{
|
||||
private IHost? _startupServer;
|
||||
private bool _disposed;
|
||||
|
||||
/// <summary>
|
||||
/// Starts the Bind-All Setup aspcore server to provide a reflection on the current core setup.
|
||||
/// </summary>
|
||||
/// <param name="networkManagerFactory">The networkmanager.</param>
|
||||
/// <param name="applicationPaths">The application paths.</param>
|
||||
/// <param name="serverApplicationHost">The servers application host.</param>
|
||||
/// <returns>A Task.</returns>
|
||||
public async Task RunAsync(
|
||||
Func<INetworkManager?> networkManagerFactory,
|
||||
IApplicationPaths applicationPaths,
|
||||
Func<IServerApplicationHost?> serverApplicationHost)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
_startupServer = Host.CreateDefaultBuilder()
|
||||
.UseConsoleLifetime()
|
||||
.ConfigureServices(serv =>
|
||||
{
|
||||
serv.AddHealthChecks()
|
||||
.AddCheck<SetupHealthcheck>("StartupCheck");
|
||||
})
|
||||
.ConfigureWebHostDefaults(webHostBuilder =>
|
||||
{
|
||||
webHostBuilder
|
||||
.UseKestrel()
|
||||
.Configure(app =>
|
||||
{
|
||||
app.UseHealthChecks("/health");
|
||||
|
||||
app.Map("/startup/logger", loggerRoute =>
|
||||
{
|
||||
loggerRoute.Run(async context =>
|
||||
{
|
||||
var networkManager = networkManagerFactory();
|
||||
if (context.Connection.RemoteIpAddress is null || networkManager is null || !networkManager.IsInLocalNetwork(context.Connection.RemoteIpAddress))
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
|
||||
return;
|
||||
}
|
||||
|
||||
var logFilePath = new DirectoryInfo(applicationPaths.LogDirectoryPath)
|
||||
.EnumerateFiles()
|
||||
.OrderBy(f => f.CreationTimeUtc)
|
||||
.FirstOrDefault()
|
||||
?.FullName;
|
||||
if (logFilePath is not null)
|
||||
{
|
||||
await context.Response.SendFileAsync(logFilePath, CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
app.Map("/System/Info/Public", systemRoute =>
|
||||
{
|
||||
systemRoute.Run(async context =>
|
||||
{
|
||||
var jfApplicationHost = serverApplicationHost();
|
||||
|
||||
var retryCounter = 0;
|
||||
while (jfApplicationHost is null && retryCounter < 5)
|
||||
{
|
||||
await Task.Delay(500).ConfigureAwait(false);
|
||||
jfApplicationHost = serverApplicationHost();
|
||||
retryCounter++;
|
||||
}
|
||||
|
||||
if (jfApplicationHost is null)
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.ServiceUnavailable;
|
||||
context.Response.Headers.RetryAfter = new Microsoft.Extensions.Primitives.StringValues("60");
|
||||
return;
|
||||
}
|
||||
|
||||
var sysInfo = new PublicSystemInfo
|
||||
{
|
||||
Version = jfApplicationHost.ApplicationVersionString,
|
||||
ProductName = jfApplicationHost.Name,
|
||||
Id = jfApplicationHost.SystemId,
|
||||
ServerName = jfApplicationHost.FriendlyName,
|
||||
LocalAddress = jfApplicationHost.GetSmartApiUrl(context.Request),
|
||||
StartupWizardCompleted = false
|
||||
};
|
||||
|
||||
await context.Response.WriteAsJsonAsync(sysInfo).ConfigureAwait(false);
|
||||
});
|
||||
});
|
||||
|
||||
app.Run((context) =>
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.ServiceUnavailable;
|
||||
context.Response.Headers.RetryAfter = new Microsoft.Extensions.Primitives.StringValues("60");
|
||||
context.Response.WriteAsync("<p>Jellyfin Server still starting. Please wait.</p>");
|
||||
var networkManager = networkManagerFactory();
|
||||
if (networkManager is not null && context.Connection.RemoteIpAddress is not null && networkManager.IsInLocalNetwork(context.Connection.RemoteIpAddress))
|
||||
{
|
||||
context.Response.WriteAsync("<p>You can download the current logfiles <a href='/startup/logger'>here</a>.</p>");
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
});
|
||||
})
|
||||
.Build();
|
||||
await _startupServer.StartAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops the Setup server.
|
||||
/// </summary>
|
||||
/// <returns>A task. Duh.</returns>
|
||||
public async Task StopAsync()
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
if (_startupServer is null)
|
||||
{
|
||||
throw new InvalidOperationException("Tried to stop a non existing startup server");
|
||||
}
|
||||
|
||||
await _startupServer.StopAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_disposed = true;
|
||||
_startupServer?.Dispose();
|
||||
}
|
||||
|
||||
private void ThrowIfDisposed()
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(_disposed, this);
|
||||
}
|
||||
|
||||
private class SetupHealthcheck : IHealthCheck
|
||||
{
|
||||
public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return Task.FromResult(HealthCheckResult.Degraded("Server is still starting up."));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
|
||||
namespace MediaBrowser.Controller.IO;
|
||||
|
||||
/// <summary>
|
||||
/// Interface ITrickplayManager.
|
||||
/// </summary>
|
||||
public interface IPathManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the path to the trickplay image base folder.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="saveWithMedia">Whether or not the tile should be saved next to the media file.</param>
|
||||
/// <returns>The absolute path.</returns>
|
||||
public string GetTrickplayDirectory(BaseItem item, bool saveWithMedia = false);
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Movies;
|
||||
|
||||
/// <summary>
|
||||
/// External URLs for IMDb.
|
||||
/// </summary>
|
||||
public class ImdbExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "IMDb";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
var baseUrl = "https://www.imdb.com/";
|
||||
if (item.TryGetProviderId(MetadataProvider.Imdb, out var externalId))
|
||||
{
|
||||
if (item is Person)
|
||||
{
|
||||
yield return baseUrl + $"name/{externalId}";
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return baseUrl + $"title/{externalId}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Plugins.AudioDb;
|
||||
|
||||
/// <summary>
|
||||
/// External artist URLs for AudioDb.
|
||||
/// </summary>
|
||||
public class AudioDbAlbumExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "TheAudioDb Album";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
if (item.TryGetProviderId(MetadataProvider.AudioDbAlbum, out var externalId))
|
||||
{
|
||||
var baseUrl = "https://www.theaudiodb.com/";
|
||||
switch (item)
|
||||
{
|
||||
case MusicAlbum:
|
||||
yield return baseUrl + $"album/{externalId}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Plugins.AudioDb;
|
||||
|
||||
/// <summary>
|
||||
/// External artist URLs for AudioDb.
|
||||
/// </summary>
|
||||
public class AudioDbArtistExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "TheAudioDb Artist";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
if (item.TryGetProviderId(MetadataProvider.AudioDbArtist, out var externalId))
|
||||
{
|
||||
var baseUrl = "https://www.theaudiodb.com/";
|
||||
switch (item)
|
||||
{
|
||||
case MusicAlbum:
|
||||
case Person:
|
||||
yield return baseUrl + $"artist/{externalId}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Plugins.MusicBrainz;
|
||||
|
||||
/// <summary>
|
||||
/// External album artist URLs for MusicBrainz.
|
||||
/// </summary>
|
||||
public class MusicBrainzAlbumArtistExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "MusicBrainz Album Artist";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
if (item is MusicAlbum)
|
||||
{
|
||||
if (item.TryGetProviderId(MetadataProvider.MusicBrainzAlbumArtist, out var externalId))
|
||||
{
|
||||
yield return Plugin.Instance!.Configuration.Server + $"/artist/{externalId}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Plugins.MusicBrainz;
|
||||
|
||||
/// <summary>
|
||||
/// External album URLs for MusicBrainz.
|
||||
/// </summary>
|
||||
public class MusicBrainzAlbumExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "MusicBrainz Album";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
if (item is MusicAlbum)
|
||||
{
|
||||
if (item.TryGetProviderId(MetadataProvider.MusicBrainzAlbum, out var externalId))
|
||||
{
|
||||
yield return Plugin.Instance!.Configuration.Server + $"/release/{externalId}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Plugins.MusicBrainz;
|
||||
|
||||
/// <summary>
|
||||
/// External artist URLs for MusicBrainz.
|
||||
/// </summary>
|
||||
public class MusicBrainzArtistExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "MusicBrainz Artist";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
if (item.TryGetProviderId(MetadataProvider.MusicBrainzArtist, out var externalId))
|
||||
{
|
||||
switch (item)
|
||||
{
|
||||
case MusicAlbum:
|
||||
case Person:
|
||||
yield return Plugin.Instance!.Configuration.Server + $"/artist/{externalId}";
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Plugins.MusicBrainz;
|
||||
|
||||
/// <summary>
|
||||
/// External release group URLs for MusicBrainz.
|
||||
/// </summary>
|
||||
public class MusicBrainzReleaseGroupExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "MusicBrainz Release Group";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
if (item is MusicAlbum)
|
||||
{
|
||||
if (item.TryGetProviderId(MetadataProvider.MusicBrainzReleaseGroup, out var externalId))
|
||||
{
|
||||
yield return Plugin.Instance!.Configuration.Server + $"/release-group/{externalId}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.Plugins.MusicBrainz;
|
||||
|
||||
/// <summary>
|
||||
/// External track URLs for MusicBrainz.
|
||||
/// </summary>
|
||||
public class MusicBrainzTrackExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "MusicBrainz Track";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
if (item is Audio)
|
||||
{
|
||||
if (item.TryGetProviderId(MetadataProvider.MusicBrainzTrack, out var externalId))
|
||||
{
|
||||
yield return Plugin.Instance!.Configuration.Server + $"/track/{externalId}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using TMDbLib.Objects.TvShows;
|
||||
|
||||
namespace MediaBrowser.Providers.Plugins.Tmdb;
|
||||
|
||||
/// <summary>
|
||||
/// External URLs for TMDb.
|
||||
/// </summary>
|
||||
public class TmdbExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "TMDB";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
switch (item)
|
||||
{
|
||||
case Series:
|
||||
if (item.TryGetProviderId(MetadataProvider.Tmdb, out var externalId))
|
||||
{
|
||||
yield return TmdbUtils.BaseTmdbUrl + $"tv/{externalId}";
|
||||
}
|
||||
|
||||
break;
|
||||
case Season season:
|
||||
if (season.Series.TryGetProviderId(MetadataProvider.Tmdb, out var seriesExternalId))
|
||||
{
|
||||
var orderString = season.Series.DisplayOrder;
|
||||
if (string.IsNullOrEmpty(orderString))
|
||||
{
|
||||
// Default order is airdate
|
||||
yield return TmdbUtils.BaseTmdbUrl + $"tv/{seriesExternalId}/season/{season.IndexNumber}";
|
||||
}
|
||||
|
||||
if (Enum.TryParse<TvGroupType>(season.Series.DisplayOrder, out var order))
|
||||
{
|
||||
if (order.Equals(TvGroupType.OriginalAirDate))
|
||||
{
|
||||
yield return TmdbUtils.BaseTmdbUrl + $"tv/{seriesExternalId}/season/{season.IndexNumber}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case Episode episode:
|
||||
if (episode.Series.TryGetProviderId(MetadataProvider.Imdb, out seriesExternalId))
|
||||
{
|
||||
var orderString = episode.Series.DisplayOrder;
|
||||
if (string.IsNullOrEmpty(orderString))
|
||||
{
|
||||
// Default order is airdate
|
||||
yield return TmdbUtils.BaseTmdbUrl + $"tv/{seriesExternalId}/season/{episode.Season.IndexNumber}/episode/{episode.IndexNumber}";
|
||||
}
|
||||
|
||||
if (Enum.TryParse<TvGroupType>(orderString, out var order))
|
||||
{
|
||||
if (order.Equals(TvGroupType.OriginalAirDate))
|
||||
{
|
||||
yield return TmdbUtils.BaseTmdbUrl + $"tv/{seriesExternalId}/season/{episode.Season.IndexNumber}/episode/{episode.IndexNumber}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case Movie:
|
||||
if (item.TryGetProviderId(MetadataProvider.Tmdb, out externalId))
|
||||
{
|
||||
yield return TmdbUtils.BaseTmdbUrl + $"movie/{externalId}";
|
||||
}
|
||||
|
||||
break;
|
||||
case Person:
|
||||
if (item.TryGetProviderId(MetadataProvider.Tmdb, out externalId))
|
||||
{
|
||||
yield return TmdbUtils.BaseTmdbUrl + $"person/{externalId}";
|
||||
}
|
||||
|
||||
break;
|
||||
case BoxSet:
|
||||
if (item.TryGetProviderId(MetadataProvider.Tmdb, out externalId))
|
||||
{
|
||||
yield return TmdbUtils.BaseTmdbUrl + $"collection/{externalId}";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Providers.TV;
|
||||
|
||||
/// <summary>
|
||||
/// External URLs for TMDb.
|
||||
/// </summary>
|
||||
public class Zap2ItExternalUrlProvider : IExternalUrlProvider
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name => "Zap2It";
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
if (item.TryGetProviderId(MetadataProvider.Zap2It, out var externalId))
|
||||
{
|
||||
yield return $"http://tvlistings.zap2it.com/overview.html?programSeriesId={externalId}";
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue