cleanup
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,3 +25,6 @@ data/
|
||||
# Executables
|
||||
rclone
|
||||
main
|
||||
zurg
|
||||
|
||||
config.yml
|
||||
|
||||
50
config.yml
50
config.yml
@@ -1,50 +0,0 @@
|
||||
# Zurg configuration version
|
||||
zurg: v1
|
||||
|
||||
# List of directory definitions and their filtering rules
|
||||
directories:
|
||||
|
||||
# Configuration for TV shows
|
||||
shows:
|
||||
group: media # directories on different groups have duplicates of the same torrent
|
||||
filters:
|
||||
- regex: /season[\s\.]?\d/i # Capture torrent names with the term 'season' in any case
|
||||
- regex: /Saison[\s\.]?\d/i # For non-English namings
|
||||
- regex: /stage[\s\.]?\d/i
|
||||
- regex: /s\d\d/i # Capture common season notations like S01, S02, etc.
|
||||
|
||||
# Configuration for movies
|
||||
movies:
|
||||
group: media # because movies and shows are in the same group, and shows come first before movies, all torrents that doesn't fall into shows will fall into movies
|
||||
filters:
|
||||
- regex: /.*/ # you cannot leave a directory without filters because it will not have any torrents in it
|
||||
|
||||
# Configuration for remuxes
|
||||
remuxes:
|
||||
group: def
|
||||
filters:
|
||||
- contains: remux # Specifically target remuxed content
|
||||
|
||||
# Configuration for Dolby Vision content
|
||||
"dolby vision":
|
||||
group: random
|
||||
filters:
|
||||
- and:
|
||||
- regex: /\bdovi\b/i # Matches abbreviations of 'dolby vision'
|
||||
- contains: 4k # you can be quite greedy here, dolby vision + 4k!
|
||||
|
||||
# Configuration for children's content
|
||||
kids:
|
||||
group: kids
|
||||
filters:
|
||||
- or: # you can also group conditions with 'or' which is useful especially inside 'and' conditions
|
||||
- not_contains: xxx # Ensures adult content is excluded
|
||||
- not_contains_strict: trailer # strict vs non-strict is just about case sensitivity; this ensures trailers aren't added
|
||||
- id: XFPQ5UCMUVAEG # Specific inclusion by torrent ID
|
||||
- id: VDRPYNRPQHEXC
|
||||
- id: YELNX3XR5XJQM
|
||||
|
||||
all:
|
||||
group: default # because movies and shows are in the same group, and shows come first before movies, all torrents that doesn't fall into shows will fall into movies
|
||||
filters:
|
||||
- regex: /.*/
|
||||
@@ -67,7 +67,7 @@ func createSingleTorrentResponse(basePath string, torrents []torrent.Torrent, t
|
||||
torrentResponses = append(torrentResponses, dav.File(
|
||||
filePath,
|
||||
file.Bytes,
|
||||
convertDate(torrent.Added),
|
||||
convertRFC3339toRFC1123(torrent.Added),
|
||||
file.Link,
|
||||
))
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"github.com/debridmediamanager.com/zurg/internal/torrent"
|
||||
)
|
||||
|
||||
// convertDate converts a date from RFC3339 to RFC1123
|
||||
func convertDate(input string) string {
|
||||
// convertRFC3339toRFC1123 converts a date from RFC3339 to RFC1123
|
||||
func convertRFC3339toRFC1123(input string) string {
|
||||
t, err := time.Parse(time.RFC3339, input)
|
||||
if err != nil {
|
||||
log.Println("Error:", err)
|
||||
|
||||
@@ -5,8 +5,7 @@ func Directory(path string) Response {
|
||||
Href: customPathEscape(path),
|
||||
Propstat: PropStat{
|
||||
Prop: Prop{
|
||||
ResourceType: ResourceType{Collection: &struct{}{}},
|
||||
ContentType: "httpd/unix-directory",
|
||||
ResourceType: ResourceType{Value: "<d:collection/>"},
|
||||
},
|
||||
Status: "HTTP/1.1 200 OK",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package dav
|
||||
|
||||
import "encoding/xml"
|
||||
import (
|
||||
"encoding/xml"
|
||||
)
|
||||
|
||||
type MultiStatus struct {
|
||||
XMLName xml.Name `xml:"d:multistatus"`
|
||||
@@ -19,13 +21,12 @@ type PropStat struct {
|
||||
}
|
||||
|
||||
type Prop struct {
|
||||
ResourceType ResourceType `xml:"d:resourcetype,omitempty"`
|
||||
ResourceType ResourceType `xml:"d:resourcetype"`
|
||||
ContentLength int64 `xml:"d:getcontentlength,omitempty"`
|
||||
CreationDate string `xml:"d:creationdate,omitempty"`
|
||||
LastModified string `xml:"d:getlastmodified,omitempty"`
|
||||
ContentType string `xml:"d:getcontenttype,omitempty"`
|
||||
}
|
||||
|
||||
type ResourceType struct {
|
||||
Collection *struct{} `xml:"d:collection,omitempty"`
|
||||
Value string `xml:",innerxml"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user