Created
February 15, 2021 07:09
-
-
Save moinologics/6a828e382338265b7c9cc122be06c05f to your computer and use it in GitHub Desktop.
Purge Jellyfin(media server) Extracted Content From Media Library Folder Using Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
libraries_path = ['E:\\Video\\Tv Series','E:\\Video\\Movies'] | |
#insert library path above | |
#Note - All .nfo and .jpg file will be remove | |
for library_path in libraries_path: | |
for root, dirs, files in os.walk(library_path): | |
for file in files: | |
file_path = root+os.sep+file | |
if file.endswith('nfo') or file.endswith('jpg'): | |
print('Removing... {}'.format(file_path)) | |
os.remove(file_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment