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

[DRAFT] resolve-from-urls #13146

Draft
wants to merge 1 commit into
base: 2.5
Choose a base branch
from
Draft

[DRAFT] resolve-from-urls #13146

wants to merge 1 commit into from

Conversation

m0dB
Copy link
Contributor

@m0dB m0dB commented Apr 20, 2024

resolveTrackIdsFromUrls directly, without going through DragAndDropeHlper::supportedTracksFromUrls

@mxmilkiib
Copy link
Contributor

mxmilkiib commented Apr 29, 2024

Could this eventually lead to the possibility of pasting YouTube URLs into Mixxx to pull, convert and load audio into the next available deck? (an aspect of #6277)

QStringList pathList;
pathList.reserve(urls.size());
for (const auto& url : urls) {
pathList << "(" + SqlStringFormatter::format(m_database, url.toLocalFile()) + ")";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a source code comment about the braces?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor issue is that because if that, the QString is allocated twice. Maybe we find a workaround for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if it is no local file? We should avoid "()"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

friendly ping @m0dB

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daschuer do you have a fix in mind?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if it is no local file? We should avoid "()"

What about this? Like in DragAndDropHelper::supportedTracksFromUrls

Suggested change
pathList << "(" + SqlStringFormatter::format(m_database, url.toLocalFile()) + ")";
QString urlStr = url.isLocalFile() ? url.toLocalFile() : url.toString()
pathList << "(" + SqlStringFormatter::format(m_database, urlStr) + ")";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that looks good.

@ronso0 ronso0 added this to the 2.5-beta milestone Apr 29, 2024
@daschuer
Copy link
Member

daschuer commented May 1, 2024

This is still draft, move form 2.5-beta milestone?

@m0dB
Copy link
Contributor Author

m0dB commented May 3, 2024

Could this eventually lead to the possibility of pasting YouTube URLs into Mixxx to pull, convert and load audio into the next available deck? (an aspect of #6277)

I don't think so...

@m0dB
Copy link
Contributor Author

m0dB commented May 3, 2024

This is still draft, move form 2.5-beta milestone?

It is draft because I find it the surrounding code hard to understand. The sole purpose of this change is to fix #13100 , and it looks to me that it does, but I find it hard to say if it is the right solution (also because @ronso0 suggested other approaches) and to predict if this can have negative side effects.

I don't think we want to revert the tracklist shortkey handling for 2.5, as it is a very nice and very "announcable" improvement, but @ronso0 considers a #13100 a blocker (I think I agree), so it should be fixed.

I am not quite sure how to proceed... Who would be the most familiar with the surrounding code?

@ronso0
Copy link
Member

ronso0 commented May 3, 2024

gonna take a in-detail look soonish.
think this could slip in during beta IMOH (regression fix etc.)

@daschuer daschuer modified the milestones: 2.5-beta, 2.5.0 May 13, 2024
@m0dB
Copy link
Contributor Author

m0dB commented Jun 1, 2024

Did you have a change to look at this @ronso0 ? Or do you think there is a better way to fix #13100 ?

@ronso0 ronso0 changed the base branch from main to 2.5 June 1, 2024 23:53
@ronso0
Copy link
Member

ronso0 commented Jun 2, 2024

Well, it works as desired now, thanks!

I also have a hard time double-checking all callers, and I didn't spent time on an alternative fix.
Changes LGTM from what I can tell, but @daschuer's review is still open?

@ronso0
Copy link
Member

ronso0 commented Jun 2, 2024

I changed the base branch to 2.5, now that 2.6 has been split off.

@ronso0
Copy link
Member

ronso0 commented Jun 8, 2024

Yes, LGTM.
I propose to remove the Draft state and get this into 2.5-beta.

@daschuer What do you think?

@daschuer
Copy link
Member

daschuer commented Oct 1, 2024

This PR will allow to add any URL to the database regardless if it is a playable file or any other random address. I this the intended behavior? To reference streaming tracks for instance?

@ronso0
Copy link
Member

ronso0 commented Nov 21, 2024

@m0dB @daschuer How shall we proceed here?
Can we still get this into 2.5, with the fixup I proposed?
Or should we add the 'bug' to the "Known issues" for 2.5.0 and try to get in into 2.5.1?

@daschuer
Copy link
Member

I consider this is as "ready for merge" with your fix in place. @m0dB will you have time to prepare that for merge?

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

Successfully merging this pull request may close these issues.

Cutting Ctrl+X track with missing track files from track sets removes them irretrievably
4 participants