add organize now/sync prepare buttons

pull/702/head
Luke Pulverenti 10 years ago
parent 1d5f1bc474
commit 449485d3d2

@ -112,7 +112,6 @@ namespace MediaBrowser.Providers.TV
Name = seasonName, Name = seasonName,
IndexNumber = seasonNumber, IndexNumber = seasonNumber,
Parent = series, Parent = series,
DisplayMediaType = typeof(Season).Name,
Id = (series.Id + (seasonNumber ?? -1).ToString(_usCulture) + seasonName).GetMBId(typeof(Season)) Id = (series.Id + (seasonNumber ?? -1).ToString(_usCulture) + seasonName).GetMBId(typeof(Season))
}; };

@ -406,7 +406,6 @@ namespace MediaBrowser.Providers.TV
IndexNumber = episodeNumber, IndexNumber = episodeNumber,
ParentIndexNumber = seasonNumber, ParentIndexNumber = seasonNumber,
Parent = season, Parent = season,
DisplayMediaType = typeof(Episode).Name,
Id = (series.Id + seasonNumber.ToString(_usCulture) + name).GetMBId(typeof(Episode)) Id = (series.Id + seasonNumber.ToString(_usCulture) + name).GetMBId(typeof(Episode))
}; };

@ -1263,8 +1263,6 @@ namespace MediaBrowser.Server.Implementations.Channels
var mediaSource = info.MediaSources.FirstOrDefault(); var mediaSource = info.MediaSources.FirstOrDefault();
item.Path = mediaSource == null ? null : mediaSource.Path; item.Path = mediaSource == null ? null : mediaSource.Path;
item.DisplayMediaType = channelMediaItem.ContentType.ToString();
} }
if (isNew) if (isNew)

@ -69,7 +69,6 @@ namespace MediaBrowser.Server.Implementations.Collections
{ {
Name = name, Name = name,
Parent = parentFolder, Parent = parentFolder,
DisplayMediaType = "Collection",
Path = path, Path = path,
IsLocked = options.IsLocked, IsLocked = options.IsLocked,
ProviderIds = options.ProviderIds, ProviderIds = options.ProviderIds,

@ -10,7 +10,6 @@ namespace MediaBrowser.Server.Implementations.Devices
public CameraUploadsFolder() public CameraUploadsFolder()
{ {
Name = "Camera Uploads"; Name = "Camera Uploads";
DisplayMediaType = "CollectionFolder";
} }
public override bool IsVisible(User user) public override bool IsVisible(User user)

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.FileOrganization namespace MediaBrowser.Server.Implementations.FileOrganization
{ {
public class OrganizerScheduledTask : IScheduledTask, IConfigurableScheduledTask, IScheduledTaskActivityLog public class OrganizerScheduledTask : IScheduledTask, IConfigurableScheduledTask, IScheduledTaskActivityLog, IHasKey
{ {
private readonly ILibraryMonitor _libraryMonitor; private readonly ILibraryMonitor _libraryMonitor;
private readonly ILibraryManager _libraryManager; private readonly ILibraryManager _libraryManager;
@ -82,5 +82,10 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
{ {
get { return false; } get { return false; }
} }
public string Key
{
get { return "AutoOrganize"; }
}
} }
} }

@ -39,12 +39,6 @@ namespace MediaBrowser.Server.Implementations.Library
item.Id = libraryManager.GetNewItemId(item.Path, item.GetType()); item.Id = libraryManager.GetNewItemId(item.Path, item.GetType());
// If the resolver didn't specify this
if (string.IsNullOrEmpty(item.DisplayMediaType))
{
item.DisplayMediaType = item.GetType().Name;
}
item.IsLocked = item.Path.IndexOf("[dontfetchmeta]", StringComparison.OrdinalIgnoreCase) != -1 || item.IsLocked = item.Path.IndexOf("[dontfetchmeta]", StringComparison.OrdinalIgnoreCase) != -1 ||
item.Parents.Any(i => i.IsLocked); item.Parents.Any(i => i.IsLocked);
@ -79,12 +73,6 @@ namespace MediaBrowser.Server.Implementations.Library
item.Id = libraryManager.GetNewItemId(item.Path, item.GetType()); item.Id = libraryManager.GetNewItemId(item.Path, item.GetType());
// If the resolver didn't specify this
if (string.IsNullOrEmpty(item.DisplayMediaType))
{
item.DisplayMediaType = item.GetType().Name;
}
// Make sure the item has a name // Make sure the item has a name
EnsureName(item, args.FileInfo); EnsureName(item, args.FileInfo);

@ -411,6 +411,7 @@ namespace MediaBrowser.Server.Implementations.Library
catch catch
{ {
user.Policy.EnabledFolders = new string[] { }; user.Policy.EnabledFolders = new string[] { };
user.Policy.EnableAllFolders = true;
} }
} }
else else
@ -419,6 +420,12 @@ namespace MediaBrowser.Server.Implementations.Library
user.Policy.EnabledFolders = new string[] { }; user.Policy.EnabledFolders = new string[] { };
} }
// Just to be safe
if (user.Policy.EnabledFolders.Length == 0)
{
user.Policy.EnableAllFolders = true;
}
user.Policy.BlockedMediaFolders = null; user.Policy.BlockedMediaFolders = null;
await UpdateUserPolicy(user, user.Policy, false); await UpdateUserPolicy(user, user.Policy, false);

@ -46,6 +46,8 @@
"OptionEnableWebClientResourceMinification": "Enable web client resource minification", "OptionEnableWebClientResourceMinification": "Enable web client resource minification",
"LabelDashboardSourcePath": "Web client source path:", "LabelDashboardSourcePath": "Web client source path:",
"LabelDashboardSourcePathHelp": "If running the server from source, specify the path to the dashboard-ui folder. All web client files will be served from this location.", "LabelDashboardSourcePathHelp": "If running the server from source, specify the path to the dashboard-ui folder. All web client files will be served from this location.",
"ButtonConvertMedia": "Convert media",
"ButtonOrganizeNow": "Organize now",
"ButtonOk": "Ok", "ButtonOk": "Ok",
"ButtonCancel": "Cancel", "ButtonCancel": "Cancel",
"ButtonNew": "New", "ButtonNew": "New",

@ -13,7 +13,7 @@ using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.Sync namespace MediaBrowser.Server.Implementations.Sync
{ {
public class SyncScheduledTask : IScheduledTask, IConfigurableScheduledTask public class SyncScheduledTask : IScheduledTask, IConfigurableScheduledTask, IHasKey
{ {
private readonly ILibraryManager _libraryManager; private readonly ILibraryManager _libraryManager;
private readonly ISyncRepository _syncRepo; private readonly ISyncRepository _syncRepo;
@ -42,7 +42,7 @@ namespace MediaBrowser.Server.Implementations.Sync
public string Name public string Name
{ {
get { return "Sync preparation"; } get { return "Convert media"; }
} }
public string Description public string Description
@ -54,7 +54,7 @@ namespace MediaBrowser.Server.Implementations.Sync
{ {
get get
{ {
return "Library"; return "Sync";
} }
} }
@ -82,5 +82,10 @@ namespace MediaBrowser.Server.Implementations.Sync
{ {
get { return true; } get { return true; }
} }
public string Key
{
get { return "SyncPrepare"; }
}
} }
} }

Loading…
Cancel
Save