update ffmpeg info

pull/702/head
Luke Pulverenti 9 years ago
parent 67ff9f59a1
commit 067479f2d1

@ -231,6 +231,17 @@ namespace MediaBrowser.Api.Library
public string TvdbId { get; set; }
}
[Route("/Library/Movies/Added", "POST", Summary = "Reports that new movies have been added by an external source")]
[Route("/Library/Movies/Updated", "POST", Summary = "Reports that new movies have been added by an external source")]
[Authenticated]
public class PostUpdatedMovies : IReturnVoid
{
[ApiMember(Name = "TmdbId", Description = "Tmdb Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "GET")]
public string TmdbId { get; set; }
[ApiMember(Name = "ImdbId", Description = "Imdb Id", IsRequired = false, DataType = "string", ParameterType = "path", Verb = "GET")]
public string ImdbId { get; set; }
}
[Route("/Items/{Id}/Download", "GET", Summary = "Downloads item media")]
[Authenticated(Roles = "download")]
public class GetDownload
@ -444,6 +455,40 @@ namespace MediaBrowser.Api.Library
}
}
public void Post(PostUpdatedMovies request)
{
var movies = _libraryManager.GetItems(new InternalItemsQuery
{
IncludeItemTypes = new[] { typeof(Movie).Name }
}).Items;
if (!string.IsNullOrWhiteSpace(request.ImdbId))
{
movies = movies.Where(i => string.Equals(request.ImdbId, i.GetProviderId(MetadataProviders.Imdb), StringComparison.OrdinalIgnoreCase)).ToArray();
}
else if (!string.IsNullOrWhiteSpace(request.TmdbId))
{
movies = movies.Where(i => string.Equals(request.TmdbId, i.GetProviderId(MetadataProviders.Tmdb), StringComparison.OrdinalIgnoreCase)).ToArray();
}
else
{
movies = new BaseItem[] { };
}
if (movies.Length > 0)
{
foreach (var item in movies)
{
_libraryMonitor.ReportFileSystemChanged(item.Path);
}
}
else
{
Task.Run(() => _libraryManager.ValidateMediaLibrary(new Progress<double>(), CancellationToken.None));
}
}
public object Get(GetDownload request)
{
var item = _libraryManager.GetItemById(request.Id);

@ -85,16 +85,23 @@ namespace MediaBrowser.Server.Implementations.Session
async void _httpServer_WebSocketConnecting(object sender, WebSocketConnectingEventArgs e)
{
var token = e.QueryString["api_key"];
if (!string.IsNullOrWhiteSpace(token))
{
var session = await GetSession(e.QueryString, e.Endpoint).ConfigureAwait(false);
if (session == null)
{
//e.AllowConnection = false;
}
}
//var token = e.QueryString["api_key"];
//if (!string.IsNullOrWhiteSpace(token))
//{
// try
// {
// var session = await GetSession(e.QueryString, e.Endpoint).ConfigureAwait(false);
// if (session == null)
// {
// e.AllowConnection = false;
// }
// }
// catch (Exception ex)
// {
// _logger.ErrorException("Error getting session info", ex);
// }
//}
}
private Task<SessionInfo> GetSession(NameValueCollection queryString, string remoteEndpoint)

@ -84,13 +84,13 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
return new[]
{
"http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20150717-git-8250943-win64-static.7z",
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150717-git-8250943-win64-static.7z"
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150901-git-b54e03c-win64-static.7z"
};
case Architecture.X86:
return new[]
{
"http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20150717-git-8250943-win32-static.7z",
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150717-git-8250943-win32-static.7z"
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150901-git-b54e03c-win32-static.7z"
};
}
break;

Loading…
Cancel
Save