Skip to content

Commit

Permalink
Merge pull request #39 from thijstakken/release/1.1
Browse files Browse the repository at this point in the history
Release/1.1
  • Loading branch information
thijstakken authored Jul 18, 2023
2 parents 9f60c28 + 4d1e44b commit dbe883c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**A tool that synchronizes your YouTube playlists and other music providers with your Cloud Storage like Nextcloud as MP3s.**

### What does it do? ✨
- 🎵 Downloads your music from YouTube, SoundCloud [and many more](http://ytdl-org.github.io/youtube-dl/supportedsites.html)
- 🎵 Downloads your music from YouTube, SoundCloud [and many more](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)
- 😁 Automatically monitors your playlists for newly added music
- 🔄 Converts video files to the highest quality MP3 possible
-   Uploads your music as MP3 to your Cloud Storage account. Supports all Cloud providers with WebDAV compatibility: Nextcloud, ownCloud, pCloud, STACK [and many more](https://community.cryptomator.org/t/webdav-urls-of-common-cloud-storage-services/75)
Expand Down Expand Up @@ -209,7 +209,7 @@ Feel free to contribute, you can [submit issues here](https://github.com/thijsta

### Developer instructions 👩🏻‍💻👨🏻‍💻
System requirements: Have [Docker (Desktop or Engine)](https://www.docker.com/) installed on your system <br/>
Techniques: [Python](https://www.python.org/), [Docker](https://www.docker.com/), [youtube-dl](https://youtube-dl.org/) and [WebDAV](http://www.webdav.org/)
Techniques: [Python](https://www.python.org/), [Docker](https://www.docker.com/), [YT-DLP](https://github.com/yt-dlp/yt-dlp) and [WebDAV](http://www.webdav.org/)

1. 🤠 Git clone the project with `git clone https://github.com/thijstakken/MusicService.git`
2. 🐛 [Pick a issue from the list or create a new issue and use that one](https://github.com/thijstakken/MusicService/issues)
Expand Down
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import unicode_literals
from re import L
import youtube_dl
from yt_dlp import YoutubeDL
import shutil
import requests
import os
Expand Down Expand Up @@ -28,6 +28,7 @@ def my_hook(d):
# Configure YouTube DL options
ydl_opts = {
'writethumbnail': True,
'no_write_playlist_metafiles': True, # do not save playlist data, like playlist .png
'format': 'bestaudio[asr<=44100]/best[asr<=44100]/bestaudio', # using asr 44100 as max, this mitigates exotic compatibility issues with certain mediaplayers, and allow bestaudio as a fallback for direct mp3s
'postprocessors': [{
'key': 'FFmpegExtractAudio', # use FFMPEG and only save audio
Expand All @@ -42,7 +43,7 @@ def my_hook(d):
'simulate': False, # to dry test the YT-DL, if set to True, it will skip the downloading. Can be True/False
'cachedir': False, # turn off caching, this should mitigate 403 errors which are commonly seen when downloading from Youtube
'download_archive': './config/downloaded', # this will update the downloads file which serves as a database/archive for which songs have already been downloaded, so it don't downloads them again
'nocheckcertificate': True, # mitigates YT-DL bug where it wrongly examins the server certificate, so therefore, ignore invalid certificates for now, to mitigate this bug
'nocheckcertificates': True, # mitigates YT-DL bug where it wrongly examins the server certificate, so therefore, ignore invalid certificates for now, to mitigate this bug
}

# reads and saves playlist URL's in a list
Expand All @@ -53,7 +54,7 @@ def getPlaylistURLs():

# downloads the playlists with the specified options in ydl_opts
def downloadPlaylists(ydl_opts, lines):
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
with YoutubeDL(ydl_opts) as ydl:
ydl.download(lines)

# creates directories in the cloud based on the local directory structure
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
youtube_dl==2021.12.17
#youtube_dl==2021.12.17
yt-dlp==2023.7.6
python-dotenv
#os
requests
Expand Down

0 comments on commit dbe883c

Please # to comment.