Skip to content

Commit

Permalink
debug output added
Browse files Browse the repository at this point in the history
  • Loading branch information
Vithanco committed Aug 1, 2023
1 parent eeb2a47 commit 1c23ead
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
27 changes: 18 additions & 9 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
"version": "0.3.0"
}
},
{
"package": "CollectionConcurrencyKit",
"repositoryURL": "https://github.com/johnsundell/collectionConcurrencyKit.git",
"state": {
"branch": null,
"revision": "b4f23e24b5a1bff301efc5e70871083ca029ff95",
"version": "0.2.0"
}
},
{
"package": "Files",
"repositoryURL": "https://github.com/johnsundell/files.git",
Expand All @@ -21,29 +30,29 @@
},
{
"package": "Ink",
"repositoryURL": "https://github.com/johnsundell/ink.git",
"repositoryURL": "https://github.com/Vithanco/ink.git",
"state": {
"branch": null,
"revision": "bd223a2482449507bd3286cb262c962d32d81e4b",
"version": "0.5.0"
"revision": "49b41cc5f1dde7a602c9ff63b6b4fcb48a94f2eb",
"version": "0.6.1"
}
},
{
"package": "Plot",
"repositoryURL": "https://github.com/johnsundell/plot.git",
"repositoryURL": "https://github.com/Vithanco/plot.git",
"state": {
"branch": null,
"revision": "61e828949ca6f84071bde65c8fc046cf74b7d1a2",
"version": "0.8.0"
"revision": "2aa5c4bfdab0b9d097047ba7e812d06791c3d518",
"version": "0.14.0"
}
},
{
"package": "Publish",
"repositoryURL": "https://github.com/JohnSundell/Publish.git",
"repositoryURL": "https://github.com/vithanco/Publish.git",
"state": {
"branch": null,
"revision": "e77aab786992350ea92333737fdb3d7cad3ca8fc",
"version": "0.7.0"
"revision": "bf0243a1c0f3290d234101865dfe4bbca2b8f67f",
"version": "0.9.0"
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion Sources/YoutubePublishPlugin/YoutubeEmbedGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ struct YoutubeEmbedGenerator {
}

func generate() -> Result<EmbeddedYoutube, Error> {
debugPrint("url: \(youtubeURL), config: \(config)")
guard let components = URLComponents(url: youtubeURL, resolvingAgainstBaseURL: false) else {
return .failure(.invalidURL)
}


// condition: www.youtube.com
if let v = components.queryItems?.compactMap { $0 }.filter({ $0.name == "v" }).first?.value {
if let v = components.queryItems?.compactMap ({ $0 }).filter({ $0.name == "v" }).first?.value {
return .success(EmbeddedYoutube(width: config.width, height: config.height, html: html(from: v)))
}

Expand Down

0 comments on commit 1c23ead

Please sign in to comment.