-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Reimporting singleton files to albums is not easily possible #4642
Comments
Yeah, this is a super unpleasant issue to be sure! This kind of re-import is obviously useful, but it's tricky to get right in a way that is uniform w/r/t the other "modes" of the importer. So yes, to summarize:
Neither mode lets you search for individual tracks and re-import them all together as a single album. In a way, this is the intended behavior, because both of the scenarios above are things we want to support. We wouldn't want to break them in the process of supporting the new, third use case. But it is a problem that the third thing is impossible. Of course, it is always possible to just not use We should maybe consider adding yet another flag specifically for this? I'm not entirely sure what that flag would look like, so ideas would be welcome. Unfortunately, if we were to add support, I predict that it might uncover other issues having to do with "removing" the individual tracks from other albums they're part of (if they weren't singletons to begin with), for example. But we should still do it; this is just an advance warning that it could be a fair amount of work. |
There's possibly another issue blocking this as well - tracks imported as singletons have a Maybe I'm misunderstanding the |
Thanks @sampsyo and @scztt-ni for your feedback. @scztt-ni yes I've been there. You can't just change singleton. I'm not sure why but wanted to dig into that once I find time... I think anyhow and also like @sampsyo explainend above, it seems to be not that simple and I'm a little scared now of getting my hands dirty with fiddling with this ;-) @sampsyo thanks for the summary and insight. Regarding the third option way, the only thing that comes up is a --long-option, something like
Regarding your concern:
Wouldn't it easy to prevent matching non-singletons if the new option Unfortunately nothing wants to come to mind about a short form option for this option..... :-/, the only other thing that I could think of is to invent an entirely new
(we dont't have capital M yet, do we??? ;-) |
And my third and last idea of how a command could look like is to really have 3 options. Option 3 should only be allowed if
|
For @scztt-ni:
The |
About the question of what to do for the CLI: one option that might make the most sense, architecturally, would be an alternative to The reason this design would make some sense, architecturally, is that it changes the behavior of the query associated with |
I just found this post which explains what actually defines a singleton (album_id is empty on item): #2747 (comment) Also that issue is somehow related. It discusses the other way round: Changing album-items to singletons. |
I feel like a clean way of handling this might be to use |
Already imported singleton files can't easily be retagged using the
import -L
option. A tedious second step via the imported file's path is required to achive that.Problem
If we look at these outputs:
We see the following problems if our goal is to reimport an already imported singleton item in album mode.
-L
flag ignores the given query when the library items are singletons.-s
flag additionally we do find the items in question, but a reimport jumps to the singleton import prompt right away. There is no way to switch back to album import mode at this point.A tedious workaround is required to actually get the importer to show the regular album import mode on our singleton library items:
beet ls <query finding singleton items> -p
beet import -t <paste path here>
Of course commandline trickery in bash or zsh could be done to ease that tedious copying and pasting part but that turns out to be unsurprisingly different since we most probably have to deal with whitespace and escaping things in our file paths.
I'm wondering if
-L
ignoring singleton files is a bug or supposed to be a feature. Could this behaviour be changed or is there any technical reason why it is implemented that way?Setup
My configuration (output of
beet config
) is:FIXME when required/requested
I reported about this behaviour in a longish thread a year ago already: #4211
The text was updated successfully, but these errors were encountered: