-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Document or remove path_sep_replace config value #323
Comments
You're right: we should document this better. I've been surprised by the number of people who have gone looking for this setting. There are two reasons that the setting is currently separate: (a) so we can use |
This reverts commit c82b31e. Conflicts: docs/changelog.rst
I ran into this one today. It has been a while since the original report or references. Have you given any more thought on this? |
I do think about it from time to time, but I'm still convinced there's no good solution: the current behavior is confusing, and the ideal behavior is surprisingly hard to get right. Bright ideas are always welcome. |
So, this feature is apparently still implemented, it has the relevant parts still there: if self.for_path:
sep_repl = beets.config['path_sep_replace'].get(unicode)
for sep in (os.path.sep, os.path.altsep):
if sep:
value = value.replace(sep, sep_repl) It should replace any occurence of "/" on my linux system with the 'path_sep_replace' from my config. But, for some reason, it is not. Any ideas? |
@petwri We might be able to help, but we'll need more details (i.e., the standard bug report stuff including a specific way to reproduce the problem). |
@sampsyo Sorry I am coming back to this after not paying any attention to it for quite a while, I just found out that it is still in the code (see my posting from 8 May). But I can't really tell why "sep" doesn't get replaced by "sep_rep1". If you need, I could provide more info. |
Yes, please provide a full bug report. A new ticket is probably in order. |
Will asap. On Jul 12, 2016 20:33, "Adrian Sampson" notifications@github.com wrote:
|
So, tried it again, importing and moving resulted in this:
So, the Version is 1.3.18, Python 2.7.11+, Linux 4.5.2-040502-generic |
Huh, that's odd. This is a separate issue, though—can you please open a new bug so we don't bother the subscribers to this issue? Then, it might be useful to see if this happens in the default configuration, with everything turned off. Out of the box, beets should replace slashes automatically. |
When you're talking about default config, where do I get that from? On Wed, Jul 13, 2016 at 12:01 AM, Adrian Sampson notifications@github.com
|
You can just (temporarily) move your I'd take a backup of my whole |
Issue created: #2126 |
Apparently we need to use the secret `path_sep_replace` option. See <beetbox/beets#323>.
I struggled for quite a while to not have slashes replaced with underscores (I use a comma for readability). Based on the documentation of the configuration (which is otherwise quite thorough, thanks!), I tried replacing the regex in the replace configuration value. Only after digging at the code did I find that there is a separate path_sep_replace config value used to define what to use for replacement.
I didn't look in detail, but it looks like as long as a valid regex replacement value is given then the separate config value isn't needed. If it is needed, a quick mention during the discussion of the replace configuration section would be quite helpful.
The text was updated successfully, but these errors were encountered: