<ProjectGuid>{0B44B3D7-52D7-4C0E-9B1C-F48CEEDA36FE}</ProjectGuid>\r
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
- <ApplicationIcon>maestro.ico</ApplicationIcon>\r
+ <ApplicationIcon>\r
+ </ApplicationIcon>\r
<AssemblyKeyContainerName>\r
</AssemblyKeyContainerName>\r
<AssemblyName>DxPlay</AssemblyName>\r
<DependentUpon>PlayerForm.cs</DependentUpon>\r
</Compile>\r
<Content Include="DirectShowLib.dll" />\r
- <Content Include="maestro.ico" />\r
+ <Content Include="mediacube_logo_small_gray.ico" />\r
<None Include="Resources\ic_stop_black_24dp_2x.png" />\r
<None Include="Resources\ic_play_arrow_black_24dp_2x.png" />\r
<None Include="Resources\ic_pause_black_24dp_2x.png" />\r
MediaCubeApi = null,\r
ArchiveMetadata = null\r
};\r
- FTPTargetProcessor sut = new FTPTargetProcessor(null, parameters);\r
+ FTPTargetProcessor sut = new FTPTargetProcessor();\r
+ sut.Initialize(null, parameters);\r
sut.Execute();\r
}\r
\r
{\r
"title": "Lebony betöltő",\r
- "active": true,\r
+ "active": false,\r
"startInTray": false,\r
"enableCustomMetadataId": true,\r
"player": {\r
{\r
"title": "SxS",\r
- "active": true,\r
+ "active": false,\r
"startInTray": false,\r
"enableCustomMetadataId": true,\r
"player": {\r
"processor": "FTPTargetProcessor",\r
"outputFormat": "%ID%-%SOURCENAME%",\r
"tag": "Betöltés",\r
- "subFolderFormat": "%IDROOT%%TEXT%",\r
+ "subFolderFormat": "%DATESTAMP%/%IDROOT%%TEXT%",\r
"killDateDays": 7,\r
"saveArchiveMetadata": false,\r
"remote": {\r
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
</PropertyGroup>\r
<ItemGroup>\r
- <Reference Include="FluentFTP, Version=19.1.1.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">\r
- <HintPath>..\packages\FluentFTP.19.1.1\lib\net45\FluentFTP.dll</HintPath>\r
- </Reference>\r
<Reference Include="LinkDotNet.MessageHandling, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">\r
<HintPath>..\packages\LinkDotNet.MessageBus.0.1.1\lib\LinkDotNet.MessageHandling.dll</HintPath>\r
</Reference>\r
using MaestroShared.Metadata;\r
using MaestroShared.Targets;\r
using MaestroShared.Target;\r
+using System.Reflection;\r
\r
namespace Maestro {\r
\r
\r
private ITargetProcessor CreateProcessor(Target target, TargetProcessorParameter processorParameter) {\r
string typeName = string.Format("{0}.{1}", typeof(ITargetProcessor).Namespace, target.Processor);\r
- return (ITargetProcessor)Activator.CreateInstance(Type.GetType(typeName), new object[] { this, processorParameter });\r
+ Type type = typeof(ITargetProcessor).Assembly.GetType(typeName);\r
+ ITargetProcessor result = Activator.CreateInstance(type) as ITargetProcessor;\r
+ result.Initialize(this, processorParameter);\r
+ return result;\r
}\r
\r
private TargetProcessorParameter CreateProcessorParameter(Target target, ISourceItem sourceItem) {\r
// You can specify all the values or you can default the Build and Revision Numbers\r
// by using the '*' as shown below:\r
// [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("2.0.0")]\r
-[assembly: AssemblyFileVersion("2.0.0")]\r
+[assembly: AssemblyVersion("2.0.1")]\r
+[assembly: AssemblyFileVersion("2.0.1")]\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <OutputPath>bin\x64\Debug\</OutputPath>\r
+ <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+ <DebugType>full</DebugType>\r
+ <PlatformTarget>x64</PlatformTarget>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">\r
+ <OutputPath>bin\x64\Release\</OutputPath>\r
+ <DefineConstants>TRACE</DefineConstants>\r
+ <Optimize>true</Optimize>\r
+ <DebugType>pdbonly</DebugType>\r
+ <PlatformTarget>x64</PlatformTarget>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>\r
+ </PropertyGroup>\r
<ItemGroup>\r
<Reference Include="FluentFTP, Version=19.1.2.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">\r
<HintPath>..\packages\FluentFTP.19.1.2\lib\net45\FluentFTP.dll</HintPath>\r
private readonly Logger logger = LogManager.GetCurrentClassLogger();\r
protected FtpClient targetFTP;\r
\r
- public FTPTargetProcessor(Control parent, TargetProcessorParameter parameters)\r
- : base(parent, parameters) {\r
+ public override void Initialize(Control parent, TargetProcessorParameter parameters) {\r
+ base.Initialize(parent, parameters);\r
FtpTrace.LogFunctions = false;\r
if (!(parameters.SourceConfig is UNCSource)) {\r
inputFile = null;\r
string result = null;\r
if (!String.IsNullOrEmpty(parameters.TargetConfig.SubFolderFormat)) {\r
string name = GetDynamicName(parameters.TargetConfig.SubFolderFormat);\r
- //TODO ellenőrizni, hogy mi van placeholder esetén\r
if (parameters.TargetConfig.SubFolderFormat.Contains(PATTERN_TEXT)) {\r
string pattern = name.Split(HYPHEN[0])[0] + HYPHEN;\r
targetFTP.SetWorkingDirectory(connection.Address.LocalPath);\r
private Source sourceConfig;\r
Uri inputUri;\r
\r
- public FXPTargetProcessor(Control parent, TargetProcessorParameter parameters) :\r
- base(parent, parameters) {\r
+ public override void Initialize(Control parent, TargetProcessorParameter parameters) {\r
+ base.Initialize(parent, parameters);\r
sourceConfig = parameters.SourceConfig;\r
- //inputUri = new Uri(String.Format("{0}/{1}", parameters.SourceConfig.Remote.Address, parameters.InputFileName));\r
inputUri = new Uri(Path.Combine(parameters.SourceConfig.Remote.Address.ToString(), parameters.InputFileName));\r
Input = inputUri.ToString();\r
}\r
-using System;\r
+using MaestroShared.Target;\r
+using System;\r
using System.ComponentModel;\r
+using System.Windows.Forms;\r
\r
namespace MaestroShared.Targets {\r
public interface ITargetProcessor : INotifyPropertyChanged {\r
string KillDate { get; set; }\r
string Label { get; set; }\r
string KillDatePath { get; set; }\r
+\r
+ void Initialize(Control parent, TargetProcessorParameter parameters);\r
bool Execute();\r
}\r
}
\ No newline at end of file
using MaestroShared.Commons;\r
+using MaestroShared.Target;\r
using System;\r
using System.ComponentModel;\r
using System.Runtime.CompilerServices;\r
using System.Windows.Forms;\r
\r
namespace MaestroShared.Targets {\r
- public abstract class TargetProcessor : ITargetProcessor {\r
+ public abstract class TargetProcessor : MarshalByRefObject, ITargetProcessor {\r
private string status;\r
private string message;\r
private string id;\r
private string label;\r
private string killDatePath;\r
protected Control parent;\r
+ public event PropertyChangedEventHandler PropertyChanged;\r
\r
- public TargetProcessor(Control parent) {\r
+ public virtual void Initialize(Control parent, TargetProcessorParameter parameters) {\r
this.parent = parent;\r
}\r
\r
- public event PropertyChangedEventHandler PropertyChanged;\r
-\r
protected void NotifyPropertyChanged([CallerMemberName] String propertyName = "") {\r
parent?.SafeCall(() => {\r
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\r
private const string KILLDATE_FILE = "{0}.{1}.killdate";\r
private const string METADATA_FILE = "{0}.json";\r
private const string DEFAULT_EXTENSION = ".MXF";\r
- private const string NORMALIZE_TEXT_PATTERN = "[^0-9A-Za-z-._]";\r
- protected const string UNDERSCORE = "_";\r
- protected const string HYPHEN = "-";\r
+ private const string NORMALIZE_TEXT_PATTERN = "[^0-9A-Za-z-._/]";\r
private const string DATE_FORMAT = "yyyy.MM.dd";\r
private const string PROGRAMME = "PROGRAMME";\r
private const string COMMERCIAL = "COMMERCIAL";\r
private const string JUNCTION = "JUNCTION";\r
private const string XML_EXT = ".xml";\r
- private const string PATTERN_TARGETNAME = "%TARGETNAME%";\r
- protected const string PATTERN_TEXT = "%TEXT%";\r
- protected const string SLASH = "/";\r
private const string INPROGRESS = "Folyamatban";\r
private const string ERROR = "Hiba";\r
private const string DOT = ".";\r
private const string DATE_FORMAT_NODOTS = "yyyyMMdd";\r
private const string READY = "Kész";\r
private const string HYPHEN_SPACES = " - ";\r
+ private const string PATTERN_TARGETNAME = "%TARGETNAME%";\r
private const string PATTERN_ID = "%ID%";\r
private const string PATTERN_IDROOT = "%IDROOT%";\r
private const string PATTERN_SOURCENAME = "%SOURCENAME%";\r
private const string PATTERN_TIMESTAMP = "%TIMESTAMP%";\r
+ private const string PATTERN_DATESTAMP = "%DATESTAMP%";\r
private const string DATETIME_FORMAT = "yyyyMMddhhmmss";\r
+\r
+ protected const string UNDERSCORE = "_";\r
+ protected const string HYPHEN = "-";\r
+ protected const string PATTERN_TEXT = "%TEXT%";\r
+ protected const string SLASH = "/";\r
protected FileInfo inputFile;\r
protected string workingDir;\r
protected TargetProcessorParameter parameters;\r
\r
public WorkflowAction workFlowAction { get; set; }\r
\r
- public UNCTargetProcessor(Control parent, TargetProcessorParameter parameters)\r
- : base(parent) {\r
+ public override void Initialize(Control parent, TargetProcessorParameter parameters) {\r
+ base.Initialize(parent, parameters);\r
this.parameters = parameters;\r
InputName = parameters.InputFileName;\r
Input = Path.Combine(parameters.SourceConfig.Local.Address.LocalPath, parameters.InputFileName);\r
.Replace(PATTERN_IDROOT, idRoot)\r
.Replace(PATTERN_TEXT, HYPHEN + RemoveDiacritics(parameters.MetadataText))\r
.Replace(PATTERN_SOURCENAME, Path.GetFileNameWithoutExtension(InputName))\r
- .Replace(PATTERN_TIMESTAMP, DateTime.Now.ToString(DATETIME_FORMAT, CultureInfo.InvariantCulture));\r
+ .Replace(PATTERN_TIMESTAMP, DateTime.Now.ToString(DATETIME_FORMAT, CultureInfo.InvariantCulture))\r
+ .Replace(PATTERN_DATESTAMP, DateTime.Now.ToString(DATE_FORMAT_NODOTS, CultureInfo.InvariantCulture));\r
// replace hungarian and special characters\r
result = Regex.Replace(result, NORMALIZE_TEXT_PATTERN, UNDERSCORE);\r
if (result.Length > 100)\r
{D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Debug|x86.Build.0 = Debug|Any CPU\r
{D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
{D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|Any CPU.Build.0 = Release|Any CPU\r
- {D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x64.ActiveCfg = Release|Any CPU\r
- {D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x64.Build.0 = Release|Any CPU\r
+ {D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x64.ActiveCfg = Release|x64\r
+ {D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x64.Build.0 = Release|x64\r
{D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x86.ActiveCfg = Release|Any CPU\r
{D4417174-F21E-4CE2-AE5C-8EB30C9A9625}.Release|x86.Build.0 = Release|Any CPU\r
EndGlobalSection\r