mirror of
https://github.com/IllusionMan1212/yt-db-completer.git
synced 2026-10-24 10:12:27 +00:00
Compare commits
2
Commits
7e319f1c46
...
cbf185e111
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbf185e111
|
||
|
|
48aff7d986
|
@@ -1 +1,2 @@
|
|||||||
yt-db-completer
|
yt-db-completer
|
||||||
|
missing.txt
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ const (
|
|||||||
Shorts = "shorts"
|
Shorts = "shorts"
|
||||||
Video = "video"
|
Video = "video"
|
||||||
Livestream = "livestream"
|
Livestream = "livestream"
|
||||||
// TODO: Can't test this until I get my hands on a membership.
|
|
||||||
Membership = "membership"
|
Membership = "membership"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -78,6 +77,7 @@ func CategoryFlag(name string, value Category, usage string) *Category {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cat := CategoryFlag("category", All, "Category of videos to check against.\nValid options are all, shorts, video, livestream, membership")
|
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()
|
flag.Parse()
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ func main() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
case Membership:
|
case Membership:
|
||||||
if !strings.HasSuffix(metadata.PlaylistTitle, "Membership") {
|
if !strings.HasSuffix(metadata.PlaylistTitle, "Members-only videos") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,4 +205,17 @@ func main() {
|
|||||||
fmt.Println("Found extra existing videos:")
|
fmt.Println("Found extra existing videos:")
|
||||||
fmt.Println(extraIds)
|
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