aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BasePluginFolder.cs
diff options
context:
space:
mode:
authorLukePulverenti <luke.pulverenti@gmail.com>2013-02-20 20:33:05 -0500
committerLukePulverenti <luke.pulverenti@gmail.com>2013-02-20 20:33:05 -0500
commit767cdc1f6f6a63ce997fc9476911e2c361f9d402 (patch)
tree49add55976f895441167c66cfa95e5c7688d18ce /MediaBrowser.Controller/Entities/BasePluginFolder.cs
parent845554722efaed872948a9e0f7202e3ef52f1b6e (diff)
Pushing missing changes
Diffstat (limited to 'MediaBrowser.Controller/Entities/BasePluginFolder.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BasePluginFolder.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/BasePluginFolder.cs b/MediaBrowser.Controller/Entities/BasePluginFolder.cs
new file mode 100644
index 000000000..7cabcf9f0
--- /dev/null
+++ b/MediaBrowser.Controller/Entities/BasePluginFolder.cs
@@ -0,0 +1,49 @@
+using MediaBrowser.Common.Extensions;
+using System;
+
+namespace MediaBrowser.Controller.Entities
+{
+ /// <summary>
+ /// Plugins derive from and export this class to create a folder that will appear in the root along
+ /// with all the other actual physical folders in the system.
+ /// </summary>
+ public abstract class BasePluginFolder : Folder, ICollectionFolder
+ {
+ /// <summary>
+ /// Gets or sets the id.
+ /// </summary>
+ /// <value>The id.</value>
+ public override Guid Id
+ {
+ get
+ {
+ // This doesn't get populated through the normal resolving process
+ if (base.Id == Guid.Empty)
+ {
+ base.Id = (Path ?? Name).GetMBId(GetType());
+ }
+ return base.Id;
+ }
+ set
+ {
+ base.Id = value;
+ }
+ }
+
+ /// <summary>
+ /// We don't resolve normally so need to fill this in
+ /// </summary>
+ public override string DisplayMediaType
+ {
+ get
+ {
+ return "CollectionFolder"; // Plug-in folders are collection folders
+ }
+ set
+ {
+ base.DisplayMediaType = value;
+ }
+ }
+
+ }
+}