parent
01c1943d0e
commit
a49850cc89
@ -1,115 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<queue><active_lang>us-en</active_lang>
|
||||
<session>5c770e3197e4fe763423ee7c392c25d1</session>
|
||||
<slots><slot><status>Queued</status>
|
||||
<index>0</index>
|
||||
<eta>unknown</eta>
|
||||
<timeleft>0:00:00</timeleft>
|
||||
<avg_age>11h</avg_age>
|
||||
<script>None</script>
|
||||
<queue>
|
||||
<active_lang>us-en</active_lang>
|
||||
<session>5c770e3197e4fe763423ee7c392c25d1</session>
|
||||
<slots>
|
||||
<slot>
|
||||
<status>Queued</status>
|
||||
<index>0</index>
|
||||
<eta>unknown</eta>
|
||||
<timeleft>0:00:00</timeleft>
|
||||
<avg_age>11h</avg_age>
|
||||
<script>None</script>
|
||||
|
||||
<msgid></msgid>
|
||||
<verbosity></verbosity>
|
||||
<mb>770.96</mb>
|
||||
<sizeleft>770.96 MB</sizeleft>
|
||||
<filename>Ubuntu Test</filename>
|
||||
<priority>Normal</priority>
|
||||
<cat>None</cat>
|
||||
<mbleft>770.96</mbleft>
|
||||
<percentage>0</percentage>
|
||||
<nzo_id>SABnzbd_nzo_xyr5ak</nzo_id>
|
||||
<msgid></msgid>
|
||||
<verbosity></verbosity>
|
||||
<mb>770.96</mb>
|
||||
<sizeleft>770.96 MB</sizeleft>
|
||||
<filename>Ubuntu Test</filename>
|
||||
<priority>Normal</priority>
|
||||
<cat>None</cat>
|
||||
<mbleft>770.96</mbleft>
|
||||
<percentage>0</percentage>
|
||||
<nzo_id>SABnzbd_nzo_xyr5ak</nzo_id>
|
||||
|
||||
<unpackopts>3</unpackopts>
|
||||
<size>770.96 MB</size>
|
||||
</slot>
|
||||
</slots>
|
||||
<speed>0 </speed>
|
||||
<size>770.96 MB</size>
|
||||
<limit>0</limit>
|
||||
<start>0</start>
|
||||
<diskspacetotal2>259.45</diskspacetotal2>
|
||||
<darwin>False</darwin>
|
||||
<unpackopts>3</unpackopts>
|
||||
<size>770.96 MB</size>
|
||||
</slot>
|
||||
</slots>
|
||||
<speed>0 </speed>
|
||||
<size>770.96 MB</size>
|
||||
<limit>0</limit>
|
||||
<start>0</start>
|
||||
<diskspacetotal2>259.45</diskspacetotal2>
|
||||
<darwin>False</darwin>
|
||||
|
||||
<last_warning></last_warning>
|
||||
<have_warnings>0</have_warnings>
|
||||
<noofslots>1</noofslots>
|
||||
<pause_int>0</pause_int>
|
||||
<categories><category>None</category>
|
||||
<category>anime</category>
|
||||
<category>apps</category>
|
||||
<category>books</category>
|
||||
<category>consoles</category>
|
||||
<last_warning></last_warning>
|
||||
<have_warnings>0</have_warnings>
|
||||
<noofslots>1</noofslots>
|
||||
<pause_int>0</pause_int>
|
||||
<categories>
|
||||
<category>None</category>
|
||||
<category>anime</category>
|
||||
<category>apps</category>
|
||||
<category>books</category>
|
||||
<category>consoles</category>
|
||||
|
||||
<category>ds-games</category>
|
||||
<category>emulation</category>
|
||||
<category>games</category>
|
||||
<category>misc</category>
|
||||
<category>movies</category>
|
||||
<category>music</category>
|
||||
<category>pda</category>
|
||||
<category>resources</category>
|
||||
<category>test</category>
|
||||
<category>ds-games</category>
|
||||
<category>emulation</category>
|
||||
<category>games</category>
|
||||
<category>misc</category>
|
||||
<category>movies</category>
|
||||
<category>music</category>
|
||||
<category>pda</category>
|
||||
<category>resources</category>
|
||||
<category>test</category>
|
||||
|
||||
<category>tv</category>
|
||||
<category>tv-dvd</category>
|
||||
<category>unknown</category>
|
||||
<category>wii-games</category>
|
||||
<category>xbox-dlc</category>
|
||||
<category>xbox-xbla</category>
|
||||
</categories>
|
||||
<diskspacetotal1>259.45</diskspacetotal1>
|
||||
<mb>770.96</mb>
|
||||
<category>tv</category>
|
||||
<category>tv-dvd</category>
|
||||
<category>unknown</category>
|
||||
<category>wii-games</category>
|
||||
<category>xbox-dlc</category>
|
||||
<category>xbox-xbla</category>
|
||||
</categories>
|
||||
<diskspacetotal1>259.45</diskspacetotal1>
|
||||
<mb>770.96</mb>
|
||||
|
||||
<loadavg></loadavg>
|
||||
<cache_max>157286400</cache_max>
|
||||
<speedlimit></speedlimit>
|
||||
<webdir>C:\Program Files\SABnzbd\interfaces\Plush\templates</webdir>
|
||||
<paused>True</paused>
|
||||
<isverbose>False</isverbose>
|
||||
<restart_req>False</restart_req>
|
||||
<power_options>True</power_options>
|
||||
<helpuri>http://wiki.sabnzbd.org/</helpuri>
|
||||
<uptime>4d</uptime>
|
||||
<loadavg></loadavg>
|
||||
<cache_max>157286400</cache_max>
|
||||
<speedlimit></speedlimit>
|
||||
<webdir>C:\Program Files\SABnzbd\interfaces\Plush\templates</webdir>
|
||||
<paused>True</paused>
|
||||
<isverbose>False</isverbose>
|
||||
<restart_req>False</restart_req>
|
||||
<power_options>True</power_options>
|
||||
<helpuri>http://wiki.sabnzbd.org/</helpuri>
|
||||
<uptime>4d</uptime>
|
||||
|
||||
<refresh_rate></refresh_rate>
|
||||
<version>0.6.x</version>
|
||||
<color_scheme></color_scheme>
|
||||
<new_release></new_release>
|
||||
<nt>True</nt>
|
||||
<status>Paused</status>
|
||||
<finish>0</finish>
|
||||
<cache_art>0</cache_art>
|
||||
<paused_all>False</paused_all>
|
||||
<finishaction></finishaction>
|
||||
<sizeleft>770.96 MB</sizeleft>
|
||||
<refresh_rate></refresh_rate>
|
||||
<version>0.6.x</version>
|
||||
<color_scheme></color_scheme>
|
||||
<new_release></new_release>
|
||||
<nt>True</nt>
|
||||
<status>Paused</status>
|
||||
<finish>0</finish>
|
||||
<cache_art>0</cache_art>
|
||||
<paused_all>False</paused_all>
|
||||
<finishaction></finishaction>
|
||||
<sizeleft>770.96 MB</sizeleft>
|
||||
|
||||
<cache_size>0B</cache_size>
|
||||
<mbleft>770.96</mbleft>
|
||||
<diskspace2>1177.64</diskspace2>
|
||||
<diskspace1>1177.64</diskspace1>
|
||||
<scripts><script>None</script>
|
||||
<script>Alias.config</script>
|
||||
<script>ConsoleCategories.config</script>
|
||||
<script>exiso.exe</script>
|
||||
<script>Movies.exe</script>
|
||||
<cache_size>0B</cache_size>
|
||||
<mbleft>770.96</mbleft>
|
||||
<diskspace2>1177.64</diskspace2>
|
||||
<diskspace1>1177.64</diskspace1>
|
||||
<scripts>
|
||||
<script>None</script>
|
||||
<script>Alias.config</script>
|
||||
<script>ConsoleCategories.config</script>
|
||||
<script>exiso.exe</script>
|
||||
<script>Movies.exe</script>
|
||||
|
||||
<script>Movies.exe.config</script>
|
||||
<script>Movies.pdb</script>
|
||||
<script>PreQueue.exe</script>
|
||||
<script>PreQueue.exe.config</script>
|
||||
<script>PreQueue.pdb</script>
|
||||
<script>SABTest.exe</script>
|
||||
<script>TVMove.exe</script>
|
||||
<script>TVMove.exe.config</script>
|
||||
<script>TVMove_0.4.1.exe</script>
|
||||
<script>Movies.exe.config</script>
|
||||
<script>Movies.pdb</script>
|
||||
<script>PreQueue.exe</script>
|
||||
<script>PreQueue.exe.config</script>
|
||||
<script>PreQueue.pdb</script>
|
||||
<script>SABTest.exe</script>
|
||||
<script>TVMove.exe</script>
|
||||
<script>TVMove.exe.config</script>
|
||||
<script>TVMove_0.4.1.exe</script>
|
||||
|
||||
<script>XBox360.exe</script>
|
||||
<script>XBox360.exe.config</script>
|
||||
</scripts>
|
||||
<timeleft>0:00:00</timeleft>
|
||||
<nzb_quota></nzb_quota>
|
||||
<eta>unknown</eta>
|
||||
<kbpersec>0.00</kbpersec>
|
||||
<new_rel_url></new_rel_url>
|
||||
<queue_details>0</queue_details>
|
||||
<script>XBox360.exe</script>
|
||||
<script>XBox360.exe.config</script>
|
||||
</scripts>
|
||||
<timeleft>0:00:00</timeleft>
|
||||
<nzb_quota></nzb_quota>
|
||||
<eta>unknown</eta>
|
||||
<kbpersec>0.00</kbpersec>
|
||||
<new_rel_url></new_rel_url>
|
||||
<queue_details>0</queue_details>
|
||||
</queue>
|
@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using NzbDrone.Core.Repository;
|
||||
|
||||
namespace NzbDrone.Core.Providers
|
||||
{
|
||||
public class EpisodeProvider
|
||||
{
|
||||
private static Regex _parseRegex =
|
||||
new Regex(
|
||||
@"(?<showName>.*)
|
||||
(?:
|
||||
s(?<seasonNumber>\d+)e(?<episodeNumber>\d+)-?e(?<episodeNumber2>\d+)
|
||||
| s(?<seasonNumber>\d+)e(?<episodeNumber>\d+)
|
||||
| (?<seasonNumber>\d+)x(?<episodeNumber>\d+)
|
||||
| (?<airDate>\d{4}.\d{2}.\d{2})
|
||||
)
|
||||
(?:
|
||||
(?<episodeName>.*?)
|
||||
(?<release>
|
||||
(?:hdtv|pdtv|xvid|ws|720p|x264|bdrip|dvdrip|dsr|proper)
|
||||
.*)
|
||||
| (?<episodeName>.*)
|
||||
)", RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
|
||||
public static Episode Parse(string title)
|
||||
{
|
||||
Match match = _parseRegex.Match(title);
|
||||
|
||||
if (!match.Success)
|
||||
return null;
|
||||
|
||||
return new Episode
|
||||
{
|
||||
|
||||
Season = ParseInt(match.Groups["seasonNumber"].Value),
|
||||
EpisodeNumber = ParseInt(match.Groups["episodeNumber"].Value),
|
||||
EpisodeNumber2 = ParseInt(match.Groups["episodeNumber2"].Value),
|
||||
Title = ReplaceSeparatorChars(match.Groups["episodeName"].Value),
|
||||
Release = ReplaceSeparatorChars(match.Groups["release"].Value),
|
||||
Proper = title.Contains("PROPER")
|
||||
};
|
||||
}
|
||||
|
||||
private static string ReplaceSeparatorChars(string s)
|
||||
{
|
||||
if (s == null) return string.Empty;
|
||||
return s.Replace('.', ' ').Replace('-', ' ').Replace('_', ' ').Trim();
|
||||
}
|
||||
|
||||
private static int ParseInt(string s)
|
||||
{
|
||||
int i;
|
||||
int.TryParse(s, out i);
|
||||
return i;
|
||||
}
|
||||
|
||||
private static DateTime ParseAirDate(string s)
|
||||
{
|
||||
DateTime d;
|
||||
if (DateTime.TryParse(ReplaceSeparatorChars(s).Replace(' ', '-'), out d))
|
||||
return d;
|
||||
return DateTime.MinValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
namespace NzbDrone.Core.Repository
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
/// <summary>
|
||||
/// Represents Video Quality
|
||||
/// </summary>
|
||||
public enum Quality
|
||||
{
|
||||
/// <summary>
|
||||
/// Quality is unknown
|
||||
/// </summary>
|
||||
Unknown = 0,
|
||||
/// <summary>
|
||||
/// SD File (Source could be HD)
|
||||
/// </summary>
|
||||
SDTV = 1,
|
||||
/// <summary>
|
||||
/// SD File (DVD Source)
|
||||
/// </summary>
|
||||
DVD = 2,
|
||||
/// <summary>
|
||||
/// HD File (HDTV Source)
|
||||
/// </summary>
|
||||
HDTV = 3,
|
||||
/// <summary>
|
||||
/// HD File (Online Source)
|
||||
/// </summary>
|
||||
WEBDL = 4,
|
||||
/// <summary>
|
||||
/// HD File (Blu-ray Source)
|
||||
/// </summary>
|
||||
Bluray = 5
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in new issue