forked from Sitecore/Media-Framework-Brightcove-Edition
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update the videos/playlists pull pipelines to automatically refresh the search index to prevent a race condition (#14) Co-authored-by: Cody Rodgers <[email protected]> * v10.1.X-3.6 (#18) * V10.2.0.3 (#16) * Fixed broken DXF configuration content for labels/folders * Add more error handling to the folder and labels property value readers * Fix bug preventing new labels from being synced * Remove automatic re-indexing from the videos/playlists pipeline --------- Co-authored-by: Cody Rodgers <[email protected]> * Add missing embed media buttons * Reorganize DEF files * Update the DEF GET pipelines to have better error handling and removed broken SetFolderSettings code * Update the DEF resolve pipelines to have better error handling * Updated the UPDATE DEF pipelines to have better logging and error handling * Update playlist/video pipelines to accuratly reflect video name changes made outside of Sitecore * Fix bug preventing deleted Brightcove items from being deleted in Sitecore * Fix broken standard values for experience items * Update the Brightcove services to trim account ids/secrets * Update logging levels on video/player pipelines * Update all pipelines to handle name changes * Update sitecore package creation script to include patching instructions * Update the pull pipelines to support creating items in languages other an "en" * Update all template fields to be shared * Update the push pipelines to support creating items in languages other than "en" * Update the folder/labels value readers to have better error handling * Add support for embedding medai links again. It was removed as part of the upgrade but returned on client request * Update the resolve asset item pipeline step to rename resolved items if the name has been changed since creation * Fix the brightcove settings config so it loads both html editor scripts correctly * Update sitecore package creation script --------- Co-authored-by: Cody Rodgers <[email protected]> * Fix bug which prevents the user from embedding media in the Siteocre RTE in certain scenarios * Add support for syncing video scheduling/status information * Reserialize content * Add some help text to the new scheduling fields --------- Co-authored-by: Cody Rodgers <[email protected]>
- Loading branch information
1 parent
bf78d2a
commit 0a8a017
Showing
43 changed files
with
784 additions
and
59 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace Brightcove.Core.Models | ||
{ | ||
public class VideoSchedule | ||
{ | ||
[JsonProperty("starts_at", NullValueHandling = NullValueHandling.Ignore)] | ||
public DateTime? StartsAt { get; set; } | ||
|
||
[JsonProperty("ends_at", NullValueHandling = NullValueHandling.Ignore)] | ||
public DateTime? EndsAt { get; set; } | ||
} | ||
} |
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
49 changes: 49 additions & 0 deletions
49
....DataExchangeFramework/Converters/ValueAccessor/DateTimePropertyValueAccessorConverter.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,49 @@ | ||
using Brightcove.DataExchangeFramework.ValueReaders; | ||
using Brightcove.DataExchangeFramework.ValueWriters; | ||
using Sitecore.DataExchange; | ||
using Sitecore.DataExchange.Attributes; | ||
using Sitecore.DataExchange.Converters.DataAccess.ValueAccessors; | ||
using Sitecore.DataExchange.DataAccess; | ||
using Sitecore.DataExchange.DataAccess.Readers; | ||
using Sitecore.DataExchange.DataAccess.Writers; | ||
using Sitecore.DataExchange.Repositories; | ||
using Sitecore.Services.Core.Model; | ||
|
||
namespace Brightcove.DataExchangeFramework | ||
{ | ||
[SupportedIds(new string[] { "{CC5AC65C-ACAF-4D89-8811-43B2D8E8134A}" })] | ||
public class DateTimePropertyValueAccessorConverter : ValueAccessorConverter | ||
{ | ||
public const string FieldNamePropertyName = "PropertyName"; | ||
|
||
public DateTimePropertyValueAccessorConverter(IItemModelRepository repository) | ||
: base(repository) | ||
{ | ||
} | ||
|
||
protected override ConvertResult<IValueAccessor> ConvertSupportedItem( | ||
ItemModel source) | ||
{ | ||
ConvertResult<IValueAccessor> convertResult = base.ConvertSupportedItem(source); | ||
if (!convertResult.WasConverted) | ||
return convertResult; | ||
string stringValue = this.GetStringValue(source, "PropertyName"); | ||
if (string.IsNullOrWhiteSpace(stringValue)) | ||
return this.NegativeResult(source, "The property name field must have a value specified.", "field: PropertyName"); | ||
IValueAccessor convertedValue = convertResult.ConvertedValue; | ||
if (convertedValue == null) | ||
return this.NegativeResult(source, "A null value accessor was returned by the converter."); | ||
if (convertedValue.ValueReader == null) | ||
{ | ||
DateTimePropertyValueReader propertyValueReader = new DateTimePropertyValueReader(stringValue); | ||
convertedValue.ValueReader = (IValueReader)propertyValueReader; | ||
} | ||
if (convertedValue.ValueWriter == null) | ||
{ | ||
DateTimePropertyValueWriter propertyValueWriter = new DateTimePropertyValueWriter(stringValue); | ||
convertedValue.ValueWriter = (IValueWriter)propertyValueWriter; | ||
} | ||
return this.PositiveResult(convertedValue); | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
Brightcove.DataExchangeFramework/ValueReaders/DateTimePropertyValueReader.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 Sitecore.DataExchange.DataAccess; | ||
using Sitecore.DataExchange.DataAccess.Readers; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Reflection; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace Brightcove.DataExchangeFramework.ValueReaders | ||
{ | ||
public class DateTimePropertyValueReader : ChainedPropertyValueReader | ||
{ | ||
public DateTimePropertyValueReader(string propertyName) : base(propertyName) | ||
{ | ||
} | ||
|
||
public override ReadResult Read(object source, DataAccessContext context) | ||
{ | ||
if (context == null) | ||
throw new ArgumentNullException(nameof(context)); | ||
|
||
var result = base.Read(source, context); | ||
|
||
bool wasValueRead = result.WasValueRead; | ||
object obj = result.ReadValue; | ||
|
||
if(obj == null || !(obj is DateTime)) | ||
{ | ||
obj = ""; | ||
wasValueRead = true; | ||
} | ||
else | ||
{ | ||
obj = ((DateTime)obj).ToString("yyyyMMddTHHmmss\\Z"); | ||
} | ||
|
||
return new ReadResult(DateTime.UtcNow) | ||
{ | ||
WasValueRead = wasValueRead, | ||
ReadValue = obj | ||
}; | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
Brightcove.DataExchangeFramework/ValueWriters/DateTimePropertyValueWriter.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,39 @@ | ||
using Sitecore.DataExchange.DataAccess; | ||
using System; | ||
using System.Globalization; | ||
|
||
namespace Brightcove.DataExchangeFramework.ValueWriters | ||
{ | ||
public class DateTimePropertyValueWriter : ChainedPropertyValueWriter | ||
{ | ||
public DateTimePropertyValueWriter(string propertyName) : base(propertyName) | ||
{ | ||
|
||
} | ||
|
||
public override bool Write(object target, object value, DataAccessContext context) | ||
{ | ||
DateTime? returnValue = null; | ||
|
||
try | ||
{ | ||
if ((value is string) && !string.IsNullOrWhiteSpace((string)value)) | ||
{ | ||
string sourceValue = (string)value; | ||
DateTime tmp; | ||
|
||
if (DateTime.TryParseExact(sourceValue, new string[2] { "yyyyMMddTHHmmss", "yyyyMMddTHHmmss\\Z" }, (IFormatProvider)CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out tmp)) | ||
{ | ||
returnValue = tmp; | ||
} | ||
} | ||
} | ||
catch | ||
{ | ||
returnValue = null; | ||
} | ||
|
||
return base.Write(target, returnValue, context); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,4 @@ | |
|
||
<div class="brightcove-media-rendering-container"> | ||
@Html.Raw(Model.Markup) | ||
@Html.Raw(Model.ScriptTag) | ||
</div> |
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
22 changes: 22 additions & 0 deletions
22
...rk.Framework.Branches/9f623c7f-51f5-4091-8645-daad69627e67/Schedule_StartsAt Property.yml
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,22 @@ | ||
--- | ||
ID: "e6d6979d-50c4-4904-a82f-970b9abfbbda" | ||
Parent: "9f623c7f-51f5-4091-8645-daad69627e67" | ||
Template: "cc5ac65c-acaf-4d89-8811-43b2d8e8134a" | ||
Path: /sitecore/templates/Branches/Data Exchange/Framework/Branches/Brightcove Tenant/$name/Data Access/Value Accessor Sets/Providers/Brightcove/Video Model Properties/Schedule_StartsAt Property | ||
DB: master | ||
SharedFields: | ||
- ID: "bbcf1be5-5f6b-4e21-9c8e-00e12aa2f042" | ||
Hint: PropertyName | ||
Value: Schedule.StartsAt | ||
Languages: | ||
- Language: en | ||
Versions: | ||
- Version: 1 | ||
Fields: | ||
- ID: "25bed78c-4957-4165-998a-ca1b52f67497" | ||
Hint: __Created | ||
Value: 20231115T163646Z | ||
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f" | ||
Hint: __Created by | ||
Value: | | ||
sitecore\Admin |
18 changes: 18 additions & 0 deletions
18
...ss/Value Accessor Sets/Providers/Brightcove/Video Model Properties/ItemState Property.yml
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,18 @@ | ||
--- | ||
ID: "a9578900-8b33-4ac4-9edd-8f3d0942b967" | ||
Parent: "9f623c7f-51f5-4091-8645-daad69627e67" | ||
Template: "729aeffb-b5bd-4cd4-958f-e25b50948ac8" | ||
Path: /sitecore/templates/Branches/Data Exchange/Framework/Branches/Brightcove Tenant/$name/Data Access/Value Accessor Sets/Providers/Brightcove/Video Model Properties/ItemState Property | ||
DB: master | ||
SharedFields: | ||
- ID: "06fd1c3e-a7f7-4cd2-a54e-a995d7a9e4de" | ||
Hint: PropertyName | ||
Value: ItemState | ||
Languages: | ||
- Language: en | ||
Versions: | ||
- Version: 1 | ||
Fields: | ||
- ID: "25bed78c-4957-4165-998a-ca1b52f67497" | ||
Hint: __Created | ||
Value: 20231115T142712Z |
22 changes: 22 additions & 0 deletions
22
...ue Accessor Sets/Providers/Brightcove/Video Model Properties/Schedule_EndsAt Property.yml
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,22 @@ | ||
--- | ||
ID: "95f41ff7-7660-478f-9a25-dc576db83c81" | ||
Parent: "9f623c7f-51f5-4091-8645-daad69627e67" | ||
Template: "cc5ac65c-acaf-4d89-8811-43b2d8e8134a" | ||
Path: /sitecore/templates/Branches/Data Exchange/Framework/Branches/Brightcove Tenant/$name/Data Access/Value Accessor Sets/Providers/Brightcove/Video Model Properties/Schedule_EndsAt Property | ||
DB: master | ||
SharedFields: | ||
- ID: "bbcf1be5-5f6b-4e21-9c8e-00e12aa2f042" | ||
Hint: PropertyName | ||
Value: Schedule.EndsAt | ||
Languages: | ||
- Language: en | ||
Versions: | ||
- Version: 1 | ||
Fields: | ||
- ID: "25bed78c-4957-4165-998a-ca1b52f67497" | ||
Hint: __Created | ||
Value: 20231115T163711Z | ||
- ID: "5dd74568-4d4b-44c1-b513-0af5f4cda34f" | ||
Hint: __Created by | ||
Value: | | ||
sitecore\Admin |
Oops, something went wrong.