mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-27 10:07:10 +00:00
Merge branch 'master' of git://github.com/kayone/NzbDrone
This commit is contained in:
commit
b77a91b7f7
4 changed files with 31 additions and 27 deletions
Binary file not shown.
|
@ -17,7 +17,6 @@ public class EpisodeStatusTest : TestBase
|
|||
[Row(1, false, false, EpisodeStatusType.NotAired)]
|
||||
[Row(-2, false, false, EpisodeStatusType.Missing)]
|
||||
[Row(1, true, false, EpisodeStatusType.Ready)]
|
||||
[Row(1, true, true, EpisodeStatusType.Ignored)]
|
||||
[Row(1, false, true, EpisodeStatusType.Ignored)]
|
||||
public void no_grab_date(int offsetDays, bool hasEpisodes, bool ignored, EpisodeStatusType status)
|
||||
{
|
||||
|
@ -43,7 +42,6 @@ public void no_grab_date(int offsetDays, bool hasEpisodes, bool ignored, Episode
|
|||
[Row(1, false, false, EpisodeStatusType.NotAired)]
|
||||
[Row(-2, false, false, EpisodeStatusType.Missing)]
|
||||
[Row(1, true, false, EpisodeStatusType.Ready)]
|
||||
[Row(1, true, true, EpisodeStatusType.Ignored)]
|
||||
[Row(1, false, true, EpisodeStatusType.Ignored)]
|
||||
public void old_grab_date(int offsetDays, bool hasEpisodes, bool ignored,
|
||||
EpisodeStatusType status)
|
||||
|
@ -70,8 +68,8 @@ public void old_grab_date(int offsetDays, bool hasEpisodes, bool ignored,
|
|||
[Row(1, false, false, EpisodeStatusType.Downloading)]
|
||||
[Row(-2, false, false, EpisodeStatusType.Downloading)]
|
||||
[Row(1, true, false, EpisodeStatusType.Downloading)]
|
||||
[Row(1, true, true, EpisodeStatusType.Ignored)]
|
||||
[Row(1, false, true, EpisodeStatusType.Ignored)]
|
||||
[Row(1, true, true, EpisodeStatusType.Downloading)]
|
||||
[Row(1, false, true, EpisodeStatusType.Downloading)]
|
||||
public void recent_grab_date(int offsetDays, bool hasEpisodes, bool ignored,
|
||||
EpisodeStatusType status)
|
||||
{
|
||||
|
@ -95,8 +93,6 @@ public void recent_grab_date(int offsetDays, bool hasEpisodes, bool ignored,
|
|||
[Test]
|
||||
[Row(1, false, false, EpisodeStatusType.Ignored)]
|
||||
[Row(-2, false, false, EpisodeStatusType.Ignored)]
|
||||
[Row(1, true, false, EpisodeStatusType.Ignored)]
|
||||
[Row(1, true, true, EpisodeStatusType.Ignored)]
|
||||
[Row(1, false, true, EpisodeStatusType.Ignored)]
|
||||
public void skipped_season(int offsetDays, bool hasEpisodes, bool ignored, EpisodeStatusType status)
|
||||
{
|
||||
|
@ -104,8 +100,10 @@ public void skipped_season(int offsetDays, bool hasEpisodes, bool ignored, Episo
|
|||
.With(e => e.AirDate = DateTime.Now.AddDays(offsetDays))
|
||||
.With(e => e.Ignored = ignored)
|
||||
.With(e => e.EpisodeFileId = 0)
|
||||
.With(e => e.GrabDate = null)
|
||||
.With(e => e.Season = Builder<Season>.CreateNew()
|
||||
.With(s => s.Monitored == false).Build())
|
||||
|
||||
.Build();
|
||||
|
||||
if (hasEpisodes)
|
||||
|
@ -124,7 +122,7 @@ public void low_air_date()
|
|||
.With(e => e.AirDate = DateTime.Now.AddYears(-200))
|
||||
.With(e => e.Ignored = false)
|
||||
.With(e => e.EpisodeFileId = 0)
|
||||
.With(e=>e.GrabDate =null)
|
||||
.With(e => e.GrabDate = null)
|
||||
.With(e => e.Season = Builder<Season>.CreateNew()
|
||||
.With(s => s.Monitored = true).Build())
|
||||
.Build();
|
||||
|
|
|
@ -49,17 +49,17 @@ public EpisodeStatusType Status
|
|||
{
|
||||
get
|
||||
{
|
||||
if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now)
|
||||
{
|
||||
return EpisodeStatusType.Downloading;
|
||||
}
|
||||
|
||||
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
|
||||
|
||||
var season = Season;
|
||||
|
||||
if (Ignored || (season != null && !season.Monitored)) return EpisodeStatusType.Ignored;
|
||||
|
||||
if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now)
|
||||
{
|
||||
return EpisodeStatusType.Downloading;
|
||||
}
|
||||
|
||||
if (AirDate.Date.Year > 1900 && DateTime.Now.Date >= AirDate.Date)
|
||||
{
|
||||
return EpisodeStatusType.Missing;
|
||||
|
|
32
package.bat
32
package.bat
|
@ -1,15 +1,20 @@
|
|||
SET TARGET=_deploy
|
||||
SET PACKAGEROOT=_rawPackage
|
||||
SET TARGET=%PACKAGEROOT%\NzbDrone
|
||||
|
||||
rmdir /s "%TARGET%"
|
||||
xcopy IISExpress %TARGET%\IISExpress /E /V /I /F /Y
|
||||
xcopy NzbDrone\bin\Release\*.* %TARGET%\ /E /V /I /F /Y
|
||||
xcopy IISExpress %TARGET%\IISExpress /E /V /I /Y
|
||||
xcopy NzbDrone\bin\Release\*.* %TARGET%\ /E /V /I /Y
|
||||
|
||||
xcopy NzbDrone.Web\bin\*.* %TARGET%\NzbDrone.Web\bin\ /E /V /I /F /Y
|
||||
xcopy NzbDrone.Web\App_GlobalResources\*.* %TARGET%\NzbDrone.Web\App_GlobalResources\ /E /V /I /F /Y
|
||||
xcopy NzbDrone.Web\Content\*.* %TARGET%\NzbDrone.Web\Content\ /E /V /I /F /Y
|
||||
xcopy NzbDrone.Web\Scripts\*.* %TARGET%\NzbDrone.Web\Scripts\ /E /V /I /F /Y
|
||||
xcopy NzbDrone.Web\Views\*.* %TARGET%\NzbDrone.Web\Views\ /E /V /I /F /Y
|
||||
del %TARGET%\nlog.xml
|
||||
del %TARGET%\*.vshost.exe.*
|
||||
|
||||
xcopy NzbDrone.Web\bin\*.* %TARGET%\NzbDrone.Web\bin\ /E /V /I /Y
|
||||
xcopy NzbDrone.Web\App_GlobalResources\*.* %TARGET%\NzbDrone.Web\App_GlobalResources\ /E /V /I /Y
|
||||
xcopy NzbDrone.Web\Content\*.* %TARGET%\NzbDrone.Web\Content\ /E /V /I /Y
|
||||
xcopy NzbDrone.Web\Scripts\*.* %TARGET%\NzbDrone.Web\Scripts\ /E /V /I /Y
|
||||
xcopy NzbDrone.Web\Views\*.* %TARGET%\NzbDrone.Web\Views\ /E /V /I /Y
|
||||
|
||||
del %TARGET%\NzbDrone.Web\bin\*.xml /q
|
||||
del %TARGET%\NzbDrone.Web\bin\ninject*.pdb /q
|
||||
|
||||
xcopy NzbDrone.Web\log.config %TARGET%\NzbDrone.Web\
|
||||
xcopy NzbDrone.Web\Global.asax %TARGET%\NzbDrone.Web\
|
||||
|
@ -17,7 +22,8 @@ xcopy NzbDrone.Web\favicon.ico %TARGET%\NzbDrone.Web\
|
|||
xcopy NzbDrone.Web\web.config %TARGET%\NzbDrone.Web\
|
||||
|
||||
|
||||
CD "%TARGET%"
|
||||
..\Libraries\7zip\7za.exe a -tzip NzbDrone.zip *
|
||||
..\Libraries\7zip\7za.exe t NzbDrone.zip
|
||||
cD ..
|
||||
CD %PACKAGEROOT%
|
||||
..\Libraries\7zip\7za.exe a -tzip ..\NzbDrone.zip *
|
||||
|
||||
CD ..
|
||||
Pause
|
Loading…
Reference in a new issue