mirror of
https://github.com/IllusionMan1212/yt-db-completer.git
synced 2026-10-24 10:12:27 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbf185e111
|
||
|
|
48aff7d986
|
@@ -1 +1,2 @@
|
||||
yt-db-completer
|
||||
missing.txt
|
||||
|
||||
@@ -15,7 +15,6 @@ const (
|
||||
Shorts = "shorts"
|
||||
Video = "video"
|
||||
Livestream = "livestream"
|
||||
// TODO: Can't test this until I get my hands on a membership.
|
||||
Membership = "membership"
|
||||
)
|
||||
|
||||
@@ -78,6 +77,7 @@ func CategoryFlag(name string, value Category, usage string) *Category {
|
||||
|
||||
func main() {
|
||||
cat := CategoryFlag("category", All, "Category of videos to check against.\nValid options are all, shorts, video, livestream, membership")
|
||||
dumpToFile := flag.Bool("dump-to-file", false, "The program will dump the missing IDs to a file that can be used with yt-dlp")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
@@ -148,7 +148,7 @@ func main() {
|
||||
continue
|
||||
}
|
||||
case Membership:
|
||||
if !strings.HasSuffix(metadata.PlaylistTitle, "Membership") {
|
||||
if !strings.HasSuffix(metadata.PlaylistTitle, "Members-only videos") {
|
||||
continue
|
||||
}
|
||||
}
|
||||
@@ -205,4 +205,17 @@ func main() {
|
||||
fmt.Println("Found extra existing videos:")
|
||||
fmt.Println(extraIds)
|
||||
}
|
||||
|
||||
if *dumpToFile {
|
||||
file, fileErr := os.Create("./missing.txt")
|
||||
defer file.Close()
|
||||
if fileErr != nil {
|
||||
fmt.Printf("Error while opening dump file: %v\n", fileErr)
|
||||
return
|
||||
}
|
||||
|
||||
for _, meta := range missingMetadata {
|
||||
file.WriteString(meta.Id + "\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user