about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt15
-rw-r--r--LICENSE.txt (renamed from LICENSE)0
-rw-r--r--include/YtdlpWrapper.hpp (renamed from src/YtdlpWrapper.hpp)0
-rw-r--r--include/invapi.hpp (renamed from src/invapi.hpp)0
-rw-r--r--include/sqliteinterface.hpp (renamed from src/sqliteinterface.hpp)0
-rw-r--r--include/tui.hpp (renamed from src/tui.hpp)0
-rw-r--r--include/video.hpp (renamed from src/video.hpp)26
-rw-r--r--src/main.cpp12
8 files changed, 42 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e3f249..033e0b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,12 @@ project(ytcpp
     HOMEPAGE_URL https://crow.port0.org/git/comradecrow/ytcpp.git
 )
 
+if(PROJECT_IS_TOP_LEVEL)
+  include(CTest)
+  enable_testing()
+endif()
+# set(PROJECT_SOURCE_DIR "src")
+set(PROJECT_INCLUDE_DIR "include")
 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
 
@@ -57,7 +63,7 @@ add_executable(${PROJECT_NAME}
     src/video.cpp
 )
 
-target_include_directories(${PROJECT_NAME} PRIVATE src)
+target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_INCLUDE_DIR})
 
 target_compile_definitions(${PROJECT_NAME} 
     PRIVATE DEF_APPDATA="${DEF_APPDATA}"
@@ -74,3 +80,10 @@ target_link_libraries(${PROJECT_NAME}
     PRIVATE SQLite::SQLite3
     PRIVATE pybind11::embed
 )
+
+# set(CPACK_PROJECT_NAME ${PROJECT_NAME})
+# set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
+set(CPACK_PACKAGE_VENDOR "ComradeCrow")
+set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.txt)
+set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md)
+include(CPack)
\ No newline at end of file
diff --git a/LICENSE b/LICENSE.txt
index 11c45b7..11c45b7 100644
--- a/LICENSE
+++ b/LICENSE.txt
diff --git a/src/YtdlpWrapper.hpp b/include/YtdlpWrapper.hpp
index 9ee2410..9ee2410 100644
--- a/src/YtdlpWrapper.hpp
+++ b/include/YtdlpWrapper.hpp
diff --git a/src/invapi.hpp b/include/invapi.hpp
index 3fb4c05..3fb4c05 100644
--- a/src/invapi.hpp
+++ b/include/invapi.hpp
diff --git a/src/sqliteinterface.hpp b/include/sqliteinterface.hpp
index cc4adb4..cc4adb4 100644
--- a/src/sqliteinterface.hpp
+++ b/include/sqliteinterface.hpp
diff --git a/src/tui.hpp b/include/tui.hpp
index 112135c..112135c 100644
--- a/src/tui.hpp
+++ b/include/tui.hpp
diff --git a/src/video.hpp b/include/video.hpp
index fd57d0b..456eda9 100644
--- a/src/video.hpp
+++ b/include/video.hpp
@@ -5,31 +5,49 @@
 #include <vector>
 #include <nlohmann/json.hpp>
 
+
+///
+/// \brief Video namespace.
+/// Contains the format, thumbnail, and video structs. 
+///
 namespace Video {
 
+    ///
+    /// \brief Format structure.
+    /// This saves a video format, with the necessary url and information.
+    ///
     struct format {
     
-        std::string format;
+        std::string format; /**< Name of the format provided by Youtube */
         std::string url;
         std::string vcodec;
         std::string acodec;
-        std::string ext;
-        std::optional<float> quality;
+        std::string ext; /**< File Extention */
+        std::optional<float> quality; 
         std::optional<std::string> resolution;
         std::optional<int> height;
         std::optional<int> width;
     };
 
+    ///
+    /// \brief Thumbnail structure.
+    /// This saves a video thumbnail, with the necessary url and information.
+    ///
     struct thumbnail {
 
         std::string url;
-        int preference;
+        int preference; /**< The lower the prefrence, the worse the quality */
         std::string id;
         std::optional<std::string> resolution;
         std::optional<int> height;
         std::optional<int> width;
     };
 
+    ///
+    /// \brief Video structure.
+    /// The video structure will be used to store video objects, and will be used to
+    /// save to DB, and as a common format between invidious.io and yt-dlp.
+    ///
     struct video {
 
         std::string id;
diff --git a/src/main.cpp b/src/main.cpp
index 1bac482..ea955f0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,11 +18,11 @@
 #include <sys/wait.h>
 #endif
 
-#include "tui.hpp"
-#include "video.hpp"
-#include "invapi.hpp"
-#include "YtdlpWrapper.hpp"
-#include "sqliteinterface.hpp"
+#include <tui.hpp>
+#include <video.hpp>
+#include <invapi.hpp>
+#include <YtdlpWrapper.hpp>
+#include <sqliteinterface.hpp>
 
 
 // namespace py = pybind11;
@@ -137,7 +137,7 @@ int main(int argc, char **argv) {
 
     // validateStructConversions();
     parseSysArgs(argc, argv);
-    // SqliteInterface sqldb;
+    SqliteInterface sqldb;
     // InvidiousApi invapi("https://httpbin.org/get");
     // invapi.test();
 }
\ No newline at end of file
> 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734