Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow user to use m3u in relative_to to create playlists relative to m3u_path #5365

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fbievan
Copy link

@fbievan fbievan commented Jul 20, 2024

Allow user to use m3u in relative_to to create playlists relative to

Description

Allows the user to use "m3u" in relative_to to create playlists which use paths relative to where the playlists are located, even if they are in subdirectories, for example, this allows users to have a working playlist config like

smartplaylist:
    target_dir: ~/Music
    relative_to: m3u
    #relative_to: ~/Music/Playlists
    playlist_dir: ~/Music/Playlists
    forward_slash: no
    playlists:
        - name: 'Genres/$genre/$genre.m3u'
          query: ''

And have it actually work

This is something that Still needs some work, and I haven't tested everything, but it works for my purposes, but I haven't tested everything. This is my first attempt at this, so it's rough, and needs alot of work... I want to see if anyone else is interested in this, so I can work on it more, or not

I haven't contributed to a python project before, so sorry if im a little disorganized... this is my first time doing stuff in python, so hope it's fine :)

To Do

  • Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • Tests. (Very much encouraged but not strictly required.)

Copy link

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

@fbievan
Copy link
Author

fbievan commented Jul 20, 2024

A more proper solution would be to process m3u_paths before processing the relative_to paths, but I didn't really want to make major changes to the codebase.

I couldn't find any related issues, and was kinda scared to make my own, so I just made my own solution to this...

Testing on windows, and the other options, would be nice :)

I just found poe

@fbievan fbievan changed the title Allow user to use m3u in relative_to to create playlists relative to Allow user to use m3u in relative_to to create playlists relative to m3u_path Jul 20, 2024
@fbievan
Copy link
Author

fbievan commented Jul 20, 2024

I linted and fixed the formatting, and also adding something in the changelog, I am not really good at writing docs, hope someone finds use out of this, atleast other than me :)

I'm fixing other things currently

@fbievan fbievan closed this Jul 20, 2024
@fbievan fbievan reopened this Jul 20, 2024
@fbievan fbievan marked this pull request as draft July 21, 2024 00:47
@fbievan
Copy link
Author

fbievan commented Jul 21, 2024

A cleaner solution would be nice, but this works for me

Plus, this stores the filepath as 'm3u' in the database, but I think that otherwise, it would require a restructuring of the codebase to do otherwise

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

Successfully merging this pull request may close these issues.

1 participant