parent
89d603d71c
commit
82b06bab7a
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Xml.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
public class BasicTorrentRssParser : RssParserBase
|
||||
{
|
||||
protected override ReleaseInfo CreateNewReleaseInfo()
|
||||
{
|
||||
return new TorrentInfo();
|
||||
}
|
||||
|
||||
protected override ReleaseInfo PostProcessor(XElement item, ReleaseInfo currentResult)
|
||||
{
|
||||
var torrentInfo = (TorrentInfo)currentResult;
|
||||
|
||||
torrentInfo.MagnetUrl = MagnetUrl(item);
|
||||
torrentInfo.InfoHash = InfoHash(item);
|
||||
|
||||
return torrentInfo;
|
||||
}
|
||||
|
||||
protected override long GetSize(XElement item)
|
||||
{
|
||||
var elementLength = GetTorrentElement(item).Element("contentLength");
|
||||
return Convert.ToInt64(elementLength.Value);
|
||||
}
|
||||
|
||||
protected virtual string MagnetUrl(XElement item)
|
||||
{
|
||||
var elementLength = GetTorrentElement(item).Element("magnetURI");
|
||||
return elementLength.Value;
|
||||
}
|
||||
|
||||
protected virtual string InfoHash(XElement item)
|
||||
{
|
||||
var elementLength = GetTorrentElement(item).Element("infoHash");
|
||||
return elementLength.Value;
|
||||
}
|
||||
|
||||
private static XElement GetTorrentElement(XElement item)
|
||||
{
|
||||
return item.Element("torrent");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
public enum DownloadProtocols
|
||||
{
|
||||
Nzb = 0,
|
||||
Torrent =1
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NzbDrone.Core.Indexers.Eztv
|
||||
{
|
||||
public class Eztv : IndexerBase
|
||||
{
|
||||
public override string Name
|
||||
{
|
||||
get { return "Eztv"; }
|
||||
}
|
||||
|
||||
public override bool EnableByDefault
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public override IParseFeed Parser
|
||||
{
|
||||
get
|
||||
{
|
||||
return new BasicTorrentRssParser();
|
||||
}
|
||||
}
|
||||
|
||||
public override IEnumerable<string> RecentFeed
|
||||
{
|
||||
get
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
"http://www.ezrss.it/feed/"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetEpisodeSearchUrls(string seriesTitle, int tvRageId, int seasonNumber, int episodeNumber)
|
||||
{
|
||||
yield return string.Format("http://www.ezrss.it/search/index.php?show_name={0}&season={1}&episode={2}&mode=rss", seriesTitle, seasonNumber, episodeNumber);
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetSeasonSearchUrls(string seriesTitle, int tvRageId, int seasonNumber, int offset)
|
||||
{
|
||||
yield return string.Format("http://www.ezrss.it/search/index.php?show_name={0}&season={1}&mode=rss", seriesTitle, seasonNumber);
|
||||
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetDailyEpisodeSearchUrls(string seriesTitle, int tvRageId, DateTime date)
|
||||
{
|
||||
//EZTV doesn't support searching based on actual epidose airdate. they only support release date.
|
||||
return new string[0];
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
|
||||
namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
public interface IParseFeed
|
||||
{
|
||||
IEnumerable<ReleaseInfo> Process(string source, string url);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace NzbDrone.Core.Parser.Model
|
||||
{
|
||||
public class ReleaseInfo
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public long Size { get; set; }
|
||||
public string DownloadUrl { get; set; }
|
||||
public string InfoUrl { get; set; }
|
||||
public string CommentUrl { get; set; }
|
||||
public String Indexer { get; set; }
|
||||
|
||||
public DateTime PublishDate { get; set; }
|
||||
|
||||
public int Age
|
||||
{
|
||||
get
|
||||
{
|
||||
return DateTime.UtcNow.Subtract(PublishDate).Days;
|
||||
}
|
||||
}
|
||||
|
||||
public string ReleaseGroup { get; set; }
|
||||
public int TvRageId { get; set; }
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace NzbDrone.Core.Parser.Model
|
||||
{
|
||||
public class ReportInfo
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public long Size { get; set; }
|
||||
public string NzbUrl { get; set; }
|
||||
public string NzbInfoUrl { get; set; }
|
||||
public String Indexer { get; set; }
|
||||
public int Age { get; set; }
|
||||
public string ReleaseGroup { get; set; }
|
||||
public int TvRageId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace NzbDrone.Core.Parser.Model
|
||||
{
|
||||
public class TorrentInfo : ReleaseInfo
|
||||
{
|
||||
public string MagnetUrl { get; set; }
|
||||
public string InfoHash { get; set; }
|
||||
}
|
||||
}
|
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
rd _raw /s /q
|
||||
rd _setup /s /q
|
||||
xcopy ..\SyntikX.Client\bin\release\*.* _raw\ /S /V /I /F /R
|
||||
|
||||
"C:\Program Files (x86)\WiX Toolset v3.6\bin\candle.exe" -nologo "syntik.wix.build.wxs" -out "_setup\SyntikX.Wix.wixobj" -ext WixNetFxExtension -ext WixUIExtension
|
||||
"C:\Program Files (x86)\WiX Toolset v3.6\bin\light.exe" -nologo "_setup\SyntikX.Wix.wixobj" -out "_setup\SyntikX.msi" -ext WixNetFxExtension -ext WixUIExtension
|
||||
|
||||
pause
|
@ -0,0 +1,10 @@
|
||||
rd _raw /s /q
|
||||
rd _setup /s /q
|
||||
xcopy ..\SyntikX.Client\bin\debug\*.* _raw\ /S /V /I /F /R
|
||||
|
||||
SET BUILD_NUMBER=1.9.9.9
|
||||
|
||||
"C:\Program Files (x86)\WiX Toolset v3.6\bin\candle.exe" -nologo "syntik.wix.build.wxs" -out "_setup\SyntikX.Wix.wixobj" -ext WixNetFxExtension -ext WixUIExtension
|
||||
"C:\Program Files (x86)\WiX Toolset v3.6\bin\light.exe" -nologo "_setup\SyntikX.Wix.wixobj" -out "_setup\SyntikX.Wix.msi" -ext WixNetFxExtension -ext WixUIExtension
|
||||
|
||||
pause
|
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Product Id="*" Name="NzbDrone" Language="1033" Version="$(env.BUILD_NUMBER)" Manufacturer="NzbDrone Team" UpgradeCode="56833D74-A480-4CA2-B562-5A018B3A0F99">
|
||||
<Package Description="NzbDrone"
|
||||
Comments="NzbDrone"
|
||||
InstallerVersion="200"
|
||||
Compressed="yes"
|
||||
InstallPrivileges="limited"
|
||||
InstallScope="perUser"
|
||||
Platform="x86"
|
||||
Manufacturer="NzbDrone Team"
|
||||
/>
|
||||
<Media Id="1" Cabinet="NzbDrone.cab" EmbedCab="yes" CompressionLevel="high"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="ND_ICON" />
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="LocalAppDataFolder" Name="AppDataFolder">
|
||||
<Directory Name="NzbDrone" Id="SX_ROOT">
|
||||
<Component Id="SX_APP_COMP" DiskId="1" Guid="9c3ac309-cde4-4338-be75-a914cbce2601">
|
||||
<File Id="SX_EXE_FILE" Name="NzbDrone.Client.exe" Source="_raw\NzbDrone.Client.exe" />
|
||||
<File Id="AUTOFAC.CONFIGURATION.DLL" Name="Autofac.Configuration.dll" Source="_raw\Autofac.Configuration.dll" />
|
||||
<File Id="AUTOFAC.DLL" Name="Autofac.dll" Source="_raw\Autofac.dll" />
|
||||
<File Id="BCRYPT.NET.DLL" Name="BCrypt.Net.dll" Source="_raw\BCrypt.Net.dll" />
|
||||
<File Id="CALIBURN.MICRO.DLL" Name="Caliburn.Micro.dll" Source="_raw\Caliburn.Micro.dll" />
|
||||
<File Id="ICSHARPCODE.SHARPZIPLIB.DLL" Name="ICSharpCode.SharpZipLib.dll" Source="_raw\ICSharpCode.SharpZipLib.dll" />
|
||||
<File Id="MAHAPPS.METRO.DLL" Name="MahApps.Metro.dll" Source="_raw\MahApps.Metro.dll" />
|
||||
<File Id="NEWTONSOFT.JSON.DLL" Name="Newtonsoft.Json.dll" Source="_raw\Newtonsoft.Json.dll" />
|
||||
<File Id="NLOG.DLL" Name="NLog.dll" Source="_raw\NLog.dll" />
|
||||
<File Id="RESTSHARP.DLL" Name="RestSharp.dll" Source="_raw\RestSharp.dll" />
|
||||
<File Id="EXCEPTRON.CLIENT.DLL" Name="exceptron.client.dll" Source="_raw\exceptron.client.dll" />
|
||||
<File Id="EXCEPTRON.NLOG.DLL" Name="exceptron.nlog.dll" Source="_raw\exceptron.nlog.dll" />
|
||||
<File Id="NzbDrone.CLIENT.CORE.DLL" Name="NzbDrone.Client.Core.dll" Source="_raw\NzbDrone.Client.Core.dll" />
|
||||
<File Id="NzbDrone.CLIENT.CORE.PDB" Name="NzbDrone.Client.Core.pdb" Source="_raw\NzbDrone.Client.Core.pdb" />
|
||||
<File Id="NzbDrone.CLIENT.EXE.CONFIG" Name="NzbDrone.Client.exe.config" Source="_raw\NzbDrone.Client.exe.config" />
|
||||
<File Id="NzbDrone.CLIENT.PDB" Name="NzbDrone.Client.pdb" Source="_raw\NzbDrone.Client.pdb" />
|
||||
<File Id="NzbDrone.SHARED.DLL" Name="NzbDrone.Shared.dll" Source="_raw\NzbDrone.Shared.dll" />
|
||||
<File Id="NzbDrone.SHARED.PDB" Name="NzbDrone.Shared.pdb" Source="_raw\NzbDrone.Shared.pdb" />
|
||||
<File Id="SYSTEM.WINDOWS.INTERACTIVITY.DLL" Name="System.Windows.Interactivity.dll" Source="_raw\System.Windows.Interactivity.dll" />
|
||||
<RegistryValue Root="HKCU" Key="Software\Microsoft\NzbDrone" Name="installed" Type="integer" Value="1" KeyPath="yes" />
|
||||
<RemoveFolder Id="SX_ROOT" On="uninstall" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="DesktopFolder">
|
||||
<Component Id="SX_DESKTOP_SHORTCUT_COMP" Guid="1f395635-7a9d-454d-aab4-95a5a4e70be4">
|
||||
<Shortcut Id="SX_DESKTOP_SHORTCUT" Name="NzbDrone" Description="NzbDrone Backup Client" Target="[SX_ROOT]NzbDrone.Client.exe" WorkingDirectory="SX_ROOT" />
|
||||
<RegistryValue Root="HKCU" Key="Software\Microsoft\NzbDrone" Name="installed" Type="integer" Value="1" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="SX_START_DIR" Name="NzbDrone">
|
||||
<Component Id="SX_START_SHORTCUT_COMP" Guid="8b3d54c6-712b-4bc2-b1e9-7cf40bcc1344">
|
||||
<Shortcut Id="SX_START_SHORTCUT" Name="NzbDrone" Description="NzbDrone Backup Client" Target="[SX_ROOT]NzbDrone.Client.exe" WorkingDirectory="SX_ROOT" />
|
||||
<RemoveFolder Id="SX_START_DIR" On="uninstall" />
|
||||
<RegistryValue Root="HKCU" Key="Software\Microsoft\NzbDrone" Name="installed" Type="integer" Value="1" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="StartupFolder" Name="Startup">
|
||||
<Component Id="SX_STARTUP_SHORTCUT_COMP" Guid="0fdfe510-621e-4925-a0d4-395617fb7cbc">
|
||||
<Shortcut Id="SX_STARTUP_SHORTCUT" Name="NzbDrone" Description="NzbDrone Backup Client" Target="[SX_ROOT]NzbDrone.Client.exe" Arguments="/startup" WorkingDirectory="SX_ROOT" />
|
||||
<RegistryValue Root="HKCU" Key="Software\Microsoft\NzbDrone" Name="installed" Type="integer" Value="1" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<!--<UIRef Id="WixUI_Minimal" />-->
|
||||
<UI />
|
||||
<MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="yes" MigrateFeatures="yes" Schedule="afterInstallInitialize" DowngradeErrorMessage="Newer version of NzbDrone is already installed." />
|
||||
<Feature Id="DefaultFeature" Title="Main Feature" Level="1">
|
||||
<ComponentRef Id="SX_APP_COMP" />
|
||||
<ComponentRef Id="SX_START_SHORTCUT_COMP" />
|
||||
<ComponentRef Id="SX_STARTUP_SHORTCUT_COMP" />
|
||||
<ComponentRef Id="SX_DESKTOP_SHORTCUT_COMP" />
|
||||
</Feature>
|
||||
<PropertyRef Id="NETFRAMEWORK40FULL" />
|
||||
<Condition Message="This application requires .NET Framework 4.0 or later. Please install the .NET Framework then run this installer again.">NETFRAMEWORK40FULL</Condition>
|
||||
<Icon Id="SX_ICON" SourceFile="_raw\NzbDrone.Client.exe" />
|
||||
<InstallExecuteSequence>
|
||||
<InstallInitialize/>
|
||||
<Custom Action="SX_START_ACTION" After="InstallFiles" />
|
||||
<InstallFinalize/>
|
||||
</InstallExecuteSequence>
|
||||
<CustomAction Id="SX_START_ACTION" FileKey="SX_EXE_FILE" ExeCommand="" Execute="deferred" Impersonate="no" Return="asyncNoWait" />
|
||||
</Product>
|
||||
</Wix>
|
Loading…
Reference in new issue