Skip to content

Instantly share code, notes, and snippets.

@moinologics
Created February 15, 2021 07:09
Show Gist options
  • Save moinologics/6a828e382338265b7c9cc122be06c05f to your computer and use it in GitHub Desktop.
Save moinologics/6a828e382338265b7c9cc122be06c05f to your computer and use it in GitHub Desktop.
Purge Jellyfin(media server) Extracted Content From Media Library Folder Using Python
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