Jump to content

I want to know how to delete the collection folder in Emby.


Recommended Posts

Posted (edited)
 

 

 

IMG_4317.jpeg

No matter what, I can't clear it. I'm so anxious

 

Edited by seanbuff
seanbuff
Posted
1 hour ago, wushhs said:

No matter what, I can't clear it. I'm so anxious

Why is it so important that you delete it? If you simply don't enable automatic collections at the library level, it won't be populated with anything.

What is the contents of the Collections library? If the contents are clear, then it won't appear in the menu's and will only remain on the Library management screen (which no one else will see)

You can also disable it from appearing on your Home Screen
image.png.24781d376f8b7171aedbeadc4ab27fea.png

Posted

It's shocking that there is no way to delete collections, and that they keep getting created if you use NFO files. 

I created the following python script to delete collections, cron it every hour or so, depending on your library scan frequency. 

For the love of GOD though, this is asked so often, just let us disable them FULLY!

import requests
import json

# API key as a variable
API_KEY = "API KEY"
BASE_URL = "https://EMBY-SERVER-URL.COM/emby/Library/VirtualFolders"

# Step 1: Get the ID of the "Collections" library
query_url = f"{BASE_URL}/Query?api_key={API_KEY}"

# Make the GET request
response = requests.get(query_url, headers={"accept": "application/json"})

if response.status_code == 200:
    data = response.json()

    # Find the "Collections" library and get its ID
    collections_id = next((item["Id"] for item in data.get("Items", []) if item.get("Name") == "Collections"), None)

    if collections_id:
        print(f"Found Collections ID: {collections_id}")

        # Step 2: Send DELETE request using the found ID
        delete_url = f"{BASE_URL}/Delete?api_key={API_KEY}"
        payload = {"Id": collections_id, "RefreshLibrary": True}

        delete_response = requests.post(delete_url, headers={"accept": "*/*", "Content-Type": "application/json"}, json=payload)

        if delete_response.status_code in [200, 204]:  # Handle both 200 OK and 204 No Content
            print(f"Successfully deleted Collections library with ID: {collections_id}")
        else:
            print(f"Unexpected response: {delete_response.status_code} - {delete_response.text}")

    else:
        print("Collections library not found.")

else:
    print(f"Error fetching library data: {response.status_code} - {response.text}")

 

Posted
Quote

It's shocking that there is no way to delete collections, and that they keep getting created if you use NFO files. 

HI, the user interface has functions to delete a collection.

Posted

Ok, let me re-phrase. DISABLE Collection creation. 

 

 

Posted
54 minutes ago, zerodayz said:

Ok, let me re-phrase. DISABLE Collection creation. 

 

 

Hi, have you explored the options for your movie library in emby library setup?

Posted

Of course, there is no option to DISABLE collections, minimum size, which to too low (4), and if you have collection information in the NFO files (100,000's) then collections will be recreated on each scan. I don't want to edit 100,00's of NFOs. 

Even at a minimum, let the minimum collection size be greater than (4), say (99) and that would prevent all but most collections being created, but why no disable is odd. 

 

 

Happy2Play
Posted
5 minutes ago, zerodayz said:

Of course, there is no option to DISABLE collections, minimum size, which to too low (4), and if you have collection information in the NFO files (100,000's) then collections will be recreated on each scan. I don't want to edit 100,00's of NFOs. 

Even at a minimum, let the minimum collection size be greater than (4), say (99) and that would prevent all but most collections being created, but why no disable is odd. 

 

 

Yes that has been brought up in other topics as there is no way to disable collections when metadata contains the <set> information.

But one should show there support here.

 

Posted

By the same token, if you have genres in your nfo files, there is no option to ignore those either. So the server is just using what's in your own metadata files.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...