-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#504: media and vimeo modules updated.
- Loading branch information
Simonas Mikulenas
committed
Jul 3, 2013
1 parent
b26aa78
commit 8a6de97
Showing
20 changed files
with
204 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Modules/BetterCms.Module.MediaManager/Content/Resources/MediaGlobalization.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
Modules/BetterCms.Module.MediaManager/Models/Maps/MediaVideoMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
|
||
using BetterCms.Core.Models; | ||
|
||
namespace BetterCms.Module.MediaManager.Models.Maps | ||
{ | ||
[Serializable] | ||
public class MediaVideoMap : EntitySubClassMapBase<MediaVideo> | ||
{ | ||
public MediaVideoMap() | ||
: base(MediaManagerModuleDescriptor.ModuleName) | ||
{ | ||
Table("MediaVideos"); | ||
|
||
Map(x => x.ProviderName).Nullable(); | ||
Map(x => x.VideoId).Nullable(); | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
Modules/BetterCms.Module.MediaManager/Models/MediaVideo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
|
||
namespace BetterCms.Module.MediaManager.Models | ||
{ | ||
/// <summary> | ||
/// Media video data entity. | ||
/// </summary> | ||
[Serializable] | ||
public class MediaVideo : MediaFile | ||
{ | ||
/// <summary> | ||
/// Gets or sets the name of the provider. | ||
/// </summary> | ||
/// <value> | ||
/// The name of the provider. | ||
/// </value> | ||
public virtual string ProviderName { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the video id according to provider. | ||
/// </summary> | ||
/// <value> | ||
/// The video id. | ||
/// </value> | ||
public virtual string VideoId { get; set; } | ||
|
||
/// <summary> | ||
/// Clones this instance. | ||
/// </summary> | ||
/// <returns></returns> | ||
public virtual MediaVideo Clone() | ||
{ | ||
return CopyDataTo(new MediaVideo()); | ||
} | ||
|
||
/// <summary> | ||
/// Copies the data to. | ||
/// </summary> | ||
/// <param name="media">The media.</param> | ||
/// <returns></returns> | ||
public virtual MediaVideo CopyDataTo(MediaVideo media) | ||
{ | ||
var copy = (MediaVideo)base.CopyDataTo(media); | ||
|
||
copy.ProviderName = ProviderName; | ||
copy.VideoId = VideoId; | ||
|
||
return copy; | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
Modules/BetterCms.Module.MediaManager/Models/Migrations/Migration201307011545.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
|
||
using BetterCms.Core.DataAccess.DataContext.Migrations; | ||
using BetterCms.Core.Models; | ||
|
||
using FluentMigrator; | ||
|
||
namespace BetterCms.Module.MediaManager.Models.Migrations | ||
{ | ||
/// <summary> | ||
/// Migration for IsInSitemap. | ||
/// </summary> | ||
[Migration(201307011545)] | ||
public class Migration201307011545 : DefaultMigration | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Migration201307011545"/> class. | ||
/// </summary> | ||
public Migration201307011545() | ||
: base(MediaManagerModuleDescriptor.ModuleName) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Migrate up. | ||
/// </summary> | ||
public override void Up() | ||
{ | ||
Create | ||
.Table("MediaVideos").InSchema(SchemaName) | ||
.WithColumn("Id").AsGuid().PrimaryKey().NotNullable() | ||
.WithColumn("ProviderName").AsString(MaxLength.Name).Nullable() | ||
.WithColumn("VideoId").AsString(MaxLength.Name).Nullable(); | ||
} | ||
|
||
/// <summary> | ||
/// Migrate down. | ||
/// </summary> | ||
public override void Down() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
Modules/BetterCms.Module.MediaManager/Services/IMediaVideoService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
namespace BetterCms.Module.MediaManager.Services | ||
using BetterCms.Module.MediaManager.Models; | ||
using BetterCms.Module.MediaManager.ViewModels.MediaManager; | ||
|
||
namespace BetterCms.Module.MediaManager.Services | ||
{ | ||
public interface IMediaVideoService | ||
{ | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
Modules/BetterCms.Module.Vimeo/Command/Videos/GetVideos/GetVideosCommand.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.