Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] A way to change the default folder structure. #24

Open
Nekobibu opened this issue Apr 26, 2023 · 8 comments
Open

[Feature Request] A way to change the default folder structure. #24

Nekobibu opened this issue Apr 26, 2023 · 8 comments
Labels
Feature New feature or request

Comments

@Nekobibu
Copy link

🚀 Feature Request

Is your feature request related to a problem? Please describe.

I'm not a fan of the default folder structure when downloading an album (Artist/Album/Bitrate/files) and I'd like all this info (and more!) to be displayed in the name of a unique folder containing all the files.


Describe the solution you'd like

An option to choose your default folder structure using tags like %artist% - %album% - %year% - %bitrate%... Something like that.


Describe alternatives you've considered

N/A


Additional context

N/A

@rodfeli
Copy link

rodfeli commented May 23, 2023

+1 for this request.
A single folder of this type would be ideal.
Artist - Album (Year) [Quality]
Thanks!!!

@gisturbance
Copy link

Additionally to the folder structure, that should also include a filename template.

@bgillis
Copy link

bgillis commented Nov 21, 2023

+1

@pache71
Copy link

pache71 commented Dec 5, 2023

+1 for this as well. Being able to format the folder structure in Plex's preferred manner (Artist > Album >Tracks) would be helpful

@Mrakobes666
Copy link

Mrakobes666 commented Jan 1, 2024

%artist%\%date% - %album%\%tracknumber%. %title%

@cboby1234
Copy link

+1 for this request.
A single folder of this type would be ideal.
Artist - Album (Year) [Quality]
Thanks!!!

@unraidcitadel
Copy link

+1 to this!

@JustanerdFML
Copy link

JustanerdFML commented Dec 4, 2024

you can use this python script if you want as a workaround until its implemented

for renaming bigger folders or subfolder structures with "album xyz [ID 12345]" total commander 64 is also a nice tool to delete [xxxxxx] parts with gui, ofc you can also realise it via cli/python script

usage at own risk

CHANGE IT TO YOUR BASE_DIRECTORY @ the bottom of the script

USE A TEST FOLDER WHEN FIRST RUNNING IT TO NOT ACCIDENTLY DELETE DATA

import os
import shutil

def move_files_and_cleanup(base_directory):
    for root, dirs, files in os.walk(base_directory, topdown=False):
        # Check if the current folder matches the specific bitrate folder names
        if os.path.basename(root) in ["FLAC (24bit-48kHz)", "FLAC (16bit-44.1kHz)"]:
            parent_dir = os.path.dirname(root)  # Get the parent directory

            # Move files from the bitrate folder to the parent directory
            for file in files:
                file_path = os.path.join(root, file)  # Full path of the file
                new_path = os.path.join(parent_dir, file)  # New target path

                # Only move the file if it does not already exist in the target folder
                if not os.path.exists(new_path):
                    shutil.move(file_path, new_path)
                    print(f"Moved: {file_path} -> {new_path}")
                else:
                    print(f"File already exists at target: {new_path}")

            # Remove the bitrate folder if it is empty
            if not os.listdir(root):  # Check if the directory is empty
                try:
                    os.rmdir(root)
                    print(f"Deleted empty bitrate folder: {root}")
                except Exception as e:
                    print(f"Error deleting directory {root}: {e}")

# Define the base directory where you downloaded your qobuz files to e.g. C:\music C:\qobuzdl_music etc.
# change it to your directory
#########################################################
base_directory = r"D:\test"  # Example: "D:\music"
#########################################################

move_files_and_cleanup(base_directory)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

10 participants