mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
Feature: Deluge download client (#12)
* chore: add go-libdeluge package * feat: implement deluge v1 and v2 clients * feat(web): handle add and update deluge clients * chore: temp remove releaseinfo parser
This commit is contained in:
parent
eb5b040eeb
commit
0c4aaa29b0
19 changed files with 493 additions and 122 deletions
|
@ -82,6 +82,15 @@ func Parse(filename string) (*ReleaseInfo, error) {
|
|||
setField(tor, pattern.name, matches[matchIdx][1], matches[matchIdx][2])
|
||||
}
|
||||
|
||||
if startIndex > endIndex {
|
||||
// FIXME temp solution to not panic if the are the reverse
|
||||
tmpStart := startIndex
|
||||
tmpEnd := endIndex
|
||||
|
||||
startIndex = tmpEnd
|
||||
endIndex = tmpStart
|
||||
}
|
||||
|
||||
// Start process for title
|
||||
//fmt.Println(" title: <internal>")
|
||||
raw := strings.Split(filename[startIndex:endIndex], "(")[0]
|
||||
|
|
|
@ -191,6 +191,7 @@ var tvTests = []string{
|
|||
"Power Book III: Raising Kanan S01E02 2160p WEB-DL DD+ 5.1 H265-GGWP",
|
||||
"Thea Walking Dead: Origins S01E01 1080p WEB-DL DD+ 2.0 H.264-GOSSIP",
|
||||
"Mean Mums S01 1080p AMZN WEB-DL DD+ 2.0 H.264-FLUX",
|
||||
"[BBT-RMX] Servant x Service",
|
||||
}
|
||||
|
||||
func TestParse_TV(t *testing.T) {
|
||||
|
@ -250,6 +251,27 @@ func TestParse_TV(t *testing.T) {
|
|||
},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
filename: "[BBT-RMX] Servant x Service",
|
||||
want: &ReleaseInfo{
|
||||
Title: "",
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
filename: "[Dekinai] Dungeon Ni Deai O Motomeru No Wa Machigatte Iru Darouka ~Familia Myth~ (2015) [BD 1080p x264 10bit - FLAC 2 0]",
|
||||
want: &ReleaseInfo{
|
||||
Title: "",
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
filename: "[SubsPlease] Higurashi no Naku Koro ni Sotsu - 09 (1080p) [C00D6C68]",
|
||||
want: &ReleaseInfo{
|
||||
Title: "",
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.filename, func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue