summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-07-23 22:57:00 +0100
committersr55 <[email protected]>2016-07-23 22:57:00 +0100
commitf77bf9985eb96c08fd327c82cfba10bdee30297e (patch)
tree6e544f6c6d84a368c5479042ed0ce8fb8582bd14 /win/CS/HandBrakeWPF/Services
parent63f04ee378c199d993e5b01d16ca9b4008b4ef00 (diff)
WinGui: Stubbing out some meta data code.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs14
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs9
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs93
3 files changed, 115 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
index 0f9aa02fd..ba07dc5e5 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
@@ -535,7 +535,19 @@ namespace HandBrakeWPF.Services.Encode.Factories
{
Metadata metaData = new Metadata();
- /* TODO NOT SUPPORTED YET. */
+ if (job.MetaData != null)
+ {
+ metaData.Artist = job.MetaData.Artist;
+ metaData.AlbumArtist = job.MetaData.AlbumArtist;
+ metaData.Comment = job.MetaData.Comment;
+ metaData.Composer = job.MetaData.Composer;
+ metaData.Description = job.MetaData.Description;
+ metaData.Genre = job.MetaData.Genre;
+ metaData.LongDescription = job.MetaData.LongDescription;
+ metaData.Name = job.MetaData.Name;
+ metaData.ReleaseDate = job.MetaData.ReleaseDate;
+ }
+
return metaData;
}
}
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
index 6ea377bc6..0203b0831 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
@@ -15,6 +15,7 @@ namespace HandBrakeWPF.Services.Encode.Model
using HandBrake.ApplicationServices.Interop.Model;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
+ using HandBrakeWPF.Services.Encode.Model.Models;
using HandBrakeWPF.Utilities;
using AllowedPassthru = HandBrakeWPF.Services.Encode.Model.Models.AllowedPassthru;
@@ -56,6 +57,7 @@ namespace HandBrakeWPF.Services.Encode.Model
this.ChapterNames = new ObservableCollection<ChapterMarker>();
this.AllowedPassthruOptions = new AllowedPassthru();
this.Modulus = 16;
+ this.MetaData = new MetaData();
this.VideoTunes = new List<VideoTune>();
}
@@ -148,6 +150,8 @@ namespace HandBrakeWPF.Services.Encode.Model
this.VideoTunes = new List<VideoTune>(task.VideoTunes);
this.ExtraAdvancedArguments = task.ExtraAdvancedArguments;
+ this.MetaData = new MetaData(task.MetaData);
+
this.ShowAdvancedTab = task.ShowAdvancedTab;
}
@@ -505,6 +509,11 @@ namespace HandBrakeWPF.Services.Encode.Model
#endregion
+ #region MetaData
+
+ public MetaData MetaData { get; set; }
+ #endregion
+
#region Preview
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs
new file mode 100644
index 000000000..5cf274ee9
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs
@@ -0,0 +1,93 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="MetaData.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// An MetaData Class
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Services.Encode.Model.Models
+{
+ public class MetaData
+ {
+ private string albumArtist;
+
+ /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary>
+ public MetaData()
+ {
+ }
+
+ /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary>
+ public MetaData(MetaData metadata)
+ {
+ if (metadata != null)
+ {
+ this.AlbumArtist = metadata.AlbumArtist;
+ this.Artist = metadata.Artist;
+ this.Comment = metadata.Comment;
+ this.Composer = metadata.Composer;
+ this.Description = metadata.Description;
+ this.Genre = metadata.Genre;
+ this.LongDescription = metadata.LongDescription;
+ this.Name = metadata.Name;
+ this.ReleaseDate = metadata.ReleaseDate;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the album artist.
+ /// </summary>
+ public string AlbumArtist
+ {
+ get
+ {
+ return this.albumArtist;
+ }
+ set
+ {
+ this.albumArtist = value;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the artist.
+ /// </summary>
+ public string Artist { get; set; }
+
+ /// <summary>
+ /// Gets or sets the comment.
+ /// </summary>
+ public string Comment { get; set; }
+
+ /// <summary>
+ /// Gets or sets the composer.
+ /// </summary>
+ public string Composer { get; set; }
+
+ /// <summary>
+ /// Gets or sets the description.
+ /// </summary>
+ public string Description { get; set; }
+
+ /// <summary>
+ /// Gets or sets the genre.
+ /// </summary>
+ public string Genre { get; set; }
+
+ /// <summary>
+ /// Gets or sets the long description.
+ /// </summary>
+ public string LongDescription { get; set; }
+
+ /// <summary>
+ /// Gets or sets the name.
+ /// </summary>
+ public string Name { get; set; }
+
+ /// <summary>
+ /// Gets or sets the release date.
+ /// </summary>
+ public string ReleaseDate { get; set; }
+ }
+}