summary refs log tree commit diff stats
path: root/lib/posix/posix.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/posix/posix.nim')
-rw-r--r--lib/posix/posix.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim
index dba79cbf6..92bafe07d 100644
--- a/lib/posix/posix.nim
+++ b/lib/posix/posix.nim
@@ -448,7 +448,7 @@ type
     sa_family*: TSa_Family         ## Address family.
     sa_data*: array [0..255, char] ## Socket address (variable-length data).
 
-  Tsockaddr_storage* {.importc: "struct sockaddr_storage",
+  Sockaddr_storage* {.importc: "struct sockaddr_storage",
                        header: "<sys/socket.h>",
                        pure, final.} = object ## struct sockaddr_storage
     ss_family*: TSa_Family ## Address family.
@@ -506,7 +506,7 @@ type
               header: "<netinet/in.h>".} = object ## struct in6_addr
     s6_addr*: array [0..15, char]
 
-  Tsockaddr_in6* {.importc: "struct sockaddr_in6", pure, final,
+  Sockaddr_in6* {.importc: "struct sockaddr_in6", pure, final,
                    header: "<netinet/in.h>".} = object ## struct sockaddr_in6
     sin6_family*: TSa_Family ## AF_INET6.
     sin6_port*: InPort      ## Port number.
@@ -581,6 +581,7 @@ type
 
 {.deprecated: [TSockaddr_in: Sockaddr_in, TAddrinfo: AddrInfo,
     TSockAddr: SockAddr, TSockLen: SockLen, TTimeval: Timeval,
+    Tsockaddr_storage: Sockaddr_storage, Tsockaddr_in6: Sockaddr_in6,
     Thostent: Hostent, TServent: Servent,
     TInAddr: InAddr, TIOVec: IOVec, TInPort: InPort, TInAddrT: InAddrT,
     TIn6Addr: In6Addr, TInAddrScalar: InAddrScalar, TProtoent: Protoent].}
r: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#ifndef YTDLPWRAPPER_H
#define YTDLPWRAPPER_H
#include <string>
#include <vector>
#include <iostream>
#include <pybind11/embed.h>
#include <nlohmann/json.hpp>

class YtdlpWrapper {

    public:
        nlohmann::json getJsonSearch(const std::string& searchTerm, int limit = 1);
        Video::video getVideoByUrl(const std::string& url);
        std::vector<Video::video> searchVideos(const std::string& searchterm, int limit = 1);
    private:
        pybind11::object get_ytdl();       
}; 


#endif