diff options
author | Thanos Apollo <[email protected]> | 2023-07-06 07:54:31 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-07-06 07:54:31 +0300 |
commit | f9e86efdaae673ad82a07518b97f868940e1eb9c (patch) | |
tree | fbfd97859c5d4cfca5cea1477b5e71e5de194d28 | |
parent | 4c54d98f3c2357789baefabc4c2fc2a28c21a2a4 (diff) |
fix: Adjust titles
Add "duck-tape" function to fix titles that keep "unicode" ='= and ="=
-rw-r--r-- | yeetube.el | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -120,6 +120,15 @@ Example Usage: (format "%s %s" yeetube-player url) nil 0) (message "Opening with %s" yeetube-player)))) +;; we should use something like +;; (decode-coding-region (point-min) (point-max) 'utf-8 +;; (get-buffer-create "decoded")) +;; in yeetube-search to make sure titles are always correct +;; this is a quick "duck-tape" fix. +(defun yeetube-fix-title (title) + "Adjust TITLE." + (replace-regexp-in-string "'" "'" + (replace-regexp-in-string """ "\"" title))) (defun yeetube-insert-content (prefix url videoTitles videoIds) "Insert video links with titles into the buffer. @@ -135,7 +144,8 @@ PREFIX [[URL/watch?v=VIDEOID][VIDEOTITLE ]]" (cl-loop for (videoId . videoTitle) in (cl-mapcar #'cons (reverse videoIds) (reverse videoTitles)) do (insert (format "%s [[%s/watch?v=%s][%s ]]\n" - prefix url videoId videoTitle)))) + prefix url videoId + (yeetube-fix-title videoTitle))))) (defun yeetube-search (query) "Search for QUERY." |