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

Use a folder under a parent folder #198

Open
hackmonker opened this issue Mar 16, 2022 · 1 comment
Open

Use a folder under a parent folder #198

hackmonker opened this issue Mar 16, 2022 · 1 comment

Comments

@hackmonker
Copy link

hackmonker commented Mar 16, 2022

right now I have a folder structure like

/Folder 1/Artist/Album/Song.mp3

and I want to move it to

/Folder 2/Album/Song.mp3

rn now {relative_path} gives

/Folder 2/Artist/Album/Song.mp3

any way I can skip the Artist folder?

@drgrandios
Copy link

{path} is a Python pathlib.Path which has a parent attribute.

Python example:

>>> import pathlib
>>> p = pathlib.Path("/folder1/artist/album/song.mp3")
>>> p
PosixPath('/folder1/artist/album/song.mp3')
>>> p.parent
PosixPath('/folder1/artist/album')
>>> p.parent.parent
PosixPath('/folder1/artist')
>>> 

I.e. you could use {path.parent.parent} to access the album folder.

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

No branches or pull requests

2 participants