mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(filters): support daily shows (#1462)
* feat(database): Add month, day columns to release table * feat(database): Add month, day columns to postgres release table * feat(filters): support daily show format * feat(filters): check smart episode daily * fix(tests): rss * feat(filters): add daily shows elements to form * enhancement(web): minimize html in MoviesAndTV tab * feat(filters): smart episode check proper and repack * feat(filters): smart episode do not allow multiple latest * feat(filters): smart episode check group with repack * feat(filters): smart episode allow multiple current releases --------- Co-authored-by: s0up4200 <soup@r4tio.dev> Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com> Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
This commit is contained in:
parent
2a3dcfbf05
commit
4fceccd611
15 changed files with 270 additions and 56 deletions
|
@ -582,7 +582,7 @@ func TestReleaseRepo_Delete(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestReleaseRepo_CanDownloadShow(t *testing.T) {
|
||||
func TestReleaseRepo_CheckSmartEpisodeCanDownloadShow(t *testing.T) {
|
||||
for dbType, db := range testDBs {
|
||||
log := setupLoggerForTest()
|
||||
|
||||
|
@ -595,7 +595,7 @@ func TestReleaseRepo_CanDownloadShow(t *testing.T) {
|
|||
releaseActionMockData := getMockReleaseActionStatus()
|
||||
actionMockData := getMockAction()
|
||||
|
||||
t.Run(fmt.Sprintf("Delete_Succeeds [%s]", dbType), func(t *testing.T) {
|
||||
t.Run(fmt.Sprintf("Check_Smart_Episode_Can_Download [%s]", dbType), func(t *testing.T) {
|
||||
// Setup
|
||||
createdClient, err := downloadClientRepo.Store(context.Background(), getMockDownloadClient())
|
||||
assert.NoError(t, err)
|
||||
|
@ -624,8 +624,17 @@ func TestReleaseRepo_CanDownloadShow(t *testing.T) {
|
|||
err = repo.StoreReleaseActionStatus(context.Background(), releaseActionMockData)
|
||||
assert.NoError(t, err)
|
||||
|
||||
params := &domain.SmartEpisodeParams{
|
||||
Title: "Example.Torrent.Name",
|
||||
Season: 1,
|
||||
Episode: 2,
|
||||
Year: 0,
|
||||
Month: 0,
|
||||
Day: 0,
|
||||
}
|
||||
|
||||
// Execute
|
||||
canDownload, err := repo.CanDownloadShow(context.Background(), "Example.Torrent.Name", 1, 2)
|
||||
canDownload, err := repo.CheckSmartEpisodeCanDownload(context.Background(), params)
|
||||
|
||||
// Verify
|
||||
assert.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue