fix streaming error

This commit is contained in:
Luke Pulverenti 2013-12-21 15:38:35 -05:00
parent 042a33abfb
commit 7251d9d75c
3 changed files with 10 additions and 2 deletions

View File

@ -809,6 +809,11 @@ namespace MediaBrowser.Api.Playback
/// <returns>System.String.</returns> /// <returns>System.String.</returns>
protected string GetUserAgent(string path) protected string GetUserAgent(string path)
{ {
if (string.IsNullOrEmpty(path))
{
throw new ArgumentNullException("path");
}
if (path.IndexOf("apple.com", StringComparison.OrdinalIgnoreCase) != -1) if (path.IndexOf("apple.com", StringComparison.OrdinalIgnoreCase) != -1)
{ {
return "QuickTime/7.7.4"; return "QuickTime/7.7.4";
@ -892,6 +897,9 @@ namespace MediaBrowser.Api.Playback
{ {
item = DtoService.GetItemByDtoId(request.Id); item = DtoService.GetItemByDtoId(request.Id);
state.MediaPath = item.Path;
state.IsRemote = item.LocationType == LocationType.Remote;
var video = item as Video; var video = item as Video;
if (video != null) if (video != null)

View File

@ -101,7 +101,7 @@ namespace MediaBrowser.Providers.Movies
var timestampFileInfo = new FileInfo(timestampFile); var timestampFileInfo = new FileInfo(timestampFile);
// Don't check for updates every single time // Don't check for updates every single time
if (timestampFileInfo.Exists && (DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(timestampFileInfo)).TotalDays < 3) if (timestampFileInfo.Exists && (DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(timestampFileInfo)).TotalDays < 7)
{ {
return; return;
} }

View File

@ -77,7 +77,7 @@ namespace MediaBrowser.Providers.Movies
var timestampFileInfo = new FileInfo(timestampFile); var timestampFileInfo = new FileInfo(timestampFile);
// Don't check for updates every single time // Don't check for updates every single time
if (timestampFileInfo.Exists && (DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(timestampFileInfo)).TotalDays < 3) if (timestampFileInfo.Exists && (DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(timestampFileInfo)).TotalDays < 10)
{ {
return; return;
} }