-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
47 lines (32 loc) · 1.11 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from SpotifyDl import spotify
from SpotifyDl import Upload
from SpotifyDl.create import VideoRender
import settings
from SpotifyDl.Upload import UploadVideo
import schedule
import time
playlist_id = '37i9dQZF1DWT0upuUFtT7o'
playlist_name = 'Fresh Finds - Indie'
render = VideoRender(False)
upload = UploadVideo(settings.google_cred_upload)
def spotify_download():
"""
upload song data to database and download new songs.
A database is used to make sure no song is duplicated.
a lot of the code needs to be formatted better and more efficiently
"""
song_objects = spotify.add_scripts(playlist_id)
spotify.download_songs_from_playlist(playlist_id)
def video_render():
"""takes metadata from each song and uses ffmpeg and moviepy to create a video"""
video_list = render.get_video()
render.create_video(video_list)
def upload_to_youtube():
"""uploads rendered videos to youtube"""
songs = spotify.add_scripts(playlist_id)
videos = Upload.video_data(songs)
upload.upload()
"""
IN Upload.py CREATE DATABASE FOR VIDEO TITLE, DESCRIPTION, TAGS
"""
upload_to_youtube()