diff --git a/README.md b/README.md index 9f3fae6..1052f34 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,16 @@ # getDiscography +[For Educational Purposes Only!] -Flask based utility that will allow a user to download an entire Discography for the provided artist. +#### Music Artist Discography Download Utility -## How to use: +This full-stack application will allow users to enter an artist, verify the target and queue up the albums to download. -Open the root directory of this project in a terminal. +Written in Laravel (Application) and Python (Task Runner). -Create a virtual environment with python. -``` -python -m venv . -``` +To start: -*For more about virtual environments, look here: https://docs.python.org/3/library/venv.html* +``docker compose up -d`` -While in the virtual env (venv) install the requirements.txt file with: -``` -pip install -r ./requirements.txt -``` +To stop: -After all dependencies have been installed successfully, start the service with: -``` -python app.py -``` - -The service will then be accessible at http://localhost for as long as the terminal stays open. To shutdown the service simply close the terminal or ctl + c - -## Known issues -The latest versions of Ubuntu (22.04+ I believe) have swicted over to symlinking Firefox to the snap packages. Which causes an issue with the selenium driver. I suppose you could probably point to the executable file directly in the snap (not the symlink). I just use docker with a distro that doesn't have this problem, personally. +``docker compose down`` \ No newline at end of file diff --git a/php/src/public/js/app.js b/php/src/public/js/app.js index e632ae4..de87eb4 100644 --- a/php/src/public/js/app.js +++ b/php/src/public/js/app.js @@ -1,6 +1,4 @@ const appModal = $('#modalDownloadQueue'); -const appModalContent = $('#modal_content'); -let modalPolling = false; function proc_notification(icon, title, text) { Swal.fire({ @@ -10,25 +8,12 @@ function proc_notification(icon, title, text) { }) } -function fill_download_queue() { - $.ajax({ - url: '/api/v1/get/queue' - }).done((res) => { - appModalContent.html(res); - }) -} - $('.settings_btn').on('click', () => { $('#modalSettings').modal('toggle'); }) $('.queue_btn').on('click', () => { console.log('Get Queue!'); - if (modalPolling) { - clearInterval(modalPolling); - } - fill_download_queue(); - modalPolling = setInterval(fill_download_queue, 12000); appModal.modal('toggle'); }) @@ -56,5 +41,17 @@ $('#download_btn').on('click', () => { } else { proc_notification(icon, title, text); } +}) -}) \ No newline at end of file +document.addEventListener('alpine:init', () => { + console.log('Alpine:init'); + Alpine.store('app', { + init() { + this.Artists = []; + }, + + Artists: [], + Queue: false, + + }) +}) diff --git a/php/src/resources/views/assets/scripts-footer.blade.php b/php/src/resources/views/assets/scripts-footer.blade.php index f2fae7e..2e2d8be 100644 --- a/php/src/resources/views/assets/scripts-footer.blade.php +++ b/php/src/resources/views/assets/scripts-footer.blade.php @@ -3,7 +3,7 @@ crossorigin="anonymous"> diff --git a/php/src/resources/views/components/download-queue.blade.php b/php/src/resources/views/components/download-queue.blade.php new file mode 100644 index 0000000..fdc334c --- /dev/null +++ b/php/src/resources/views/components/download-queue.blade.php @@ -0,0 +1,51 @@ +
+ + + +
diff --git a/php/src/resources/views/layouts/public.blade.php b/php/src/resources/views/layouts/public.blade.php index 7ac9afc..b9126be 100644 --- a/php/src/resources/views/layouts/public.blade.php +++ b/php/src/resources/views/layouts/public.blade.php @@ -19,9 +19,15 @@ @include('assets.scripts-header'); + -@include('components.loader'); +
+
+ +

Loading..

+
+
diff --git a/php/src/resources/views/modals/modal-download-queue.blade.php b/php/src/resources/views/modals/modal-download-queue.blade.php index 8c18dd6..fc1c684 100644 --- a/php/src/resources/views/modals/modal-download-queue.blade.php +++ b/php/src/resources/views/modals/modal-download-queue.blade.php @@ -10,7 +10,9 @@ aria-label="Close">