mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-03 04:23:59 +03:00
Add test script for PlaylistManager with prune and non-interactive modes
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import logging
|
||||
from ytplaylist.manager import PlaylistManager
|
||||
|
||||
class test:
|
||||
playlists=[{"url": None, "save_path":"./tmp_test", "archive":"archive.txt"}]
|
||||
yt_dlp_path="yt-dlp"
|
||||
ffmpeg_path="ffmpeg"
|
||||
aria2c_path="aria2c"
|
||||
max_parallel_downloads=2
|
||||
aria2c_connections=2
|
||||
debug=False
|
||||
non_interactive=False
|
||||
prune=False
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(level=logging.INFO, format="%(levelname)s:%(message)s")
|
||||
print('--- Running with prune=False ---')
|
||||
cfg=test()
|
||||
m=PlaylistManager(cfg, debug=False)
|
||||
m.run()
|
||||
print('Run complete prune=False')
|
||||
|
||||
print('\n--- Running with prune=True, non_interactive=True ---')
|
||||
cfg2=test()
|
||||
cfg2.prune=True
|
||||
cfg2.non_interactive=True
|
||||
m2=PlaylistManager(cfg2, debug=False)
|
||||
m2.run()
|
||||
print('Run complete prune=True non_interactive=True')
|
||||
Reference in New Issue
Block a user