-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Library scan: log summary and show popup #13427
base: main
Are you sure you want to change the base?
Conversation
35598a0
to
289c57f
Compare
Simply storing that in an LibraryScanner int member seems fine to me (reset when scan is started, no need to bother scannerGlobal with this). |
It's a nice addition to get a feedback, when I triggered the scan amnually. But I would no like to get this pop-up, when I start Mixxx. |
Funny thing is, I moved the connection to CoreServices so we can always get the popup. Why do you consider the info popup disturbing / not helpful for the autorun scan during startup? |
} // namespace | ||
return matchLength; | ||
} | ||
} // namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only fixing indentation, pre-commit
friendly ping @JoergAtGithub
We could make the report optional when scanning during startup, but I'd rather avoid that sort of complification / extra pref option. |
In my opinion a dialog should only appear, if:
but on startup it is always anoying to click dialogs away. Normal information should be visualize unobtrusive in the UI, in a way that does not require user action to continue. |
The last commit disables the report/summary dialog for the auto scan run during startup. |
I'm a bit puzzled why the "changed/added" directory count is not 0 repeatedly even if the dirs haven't been modified. |
41f64ac
to
1cd81d7
Compare
Turns out it's just the confusing naming scanned vs. changed/added. I adjusted the dialog and the logged lines. All good now! |
Thanks for your thourough testing!
In order to reliably report rediscovered tracks I'll add a method to TrackDAO to get missing track locations. |
The report is always logged, just the dialog is now suppressed for the scan during startup. |
I have not tested this yet and I have scanning during start up disabled so I probably not fully qualified to comment. But here some thoughts: I think we have a scanning dialog that pops up when the scan takes longer. There is a risk that mixxx is locked when using the library during scanning. So I would argue the user is disturbed anyway by the startup scan. On the other hand I can confirm that the scan during startup is annoying and a "useless" dialog would be more annoying. How about showing the dialog only if new tracks are found or some are missing in the startup case? What do you think? |
I think the currently implemented approach with printing always to the log, but showing the dialog only when the user manually triggers the library scan is fine. |
Exactly, the scan progress dialog pops up if the scan takes longer than 2s. |
Yes, that wold make sense. new tracks, new missing tracks, track rediscovered. |
The "New tracks" feature / crate would make sense. How / when tracks are removed needs to be discussed. Automatically when a rating is set? And/or when they're sorted into playlists or crates? I appreciate the idea, though it's unrelated to this UX fix/feature. I remember we briefly discussed this recently, is there already an Issue for tracking it? |
2c254d5
to
1cd547c
Compare
I think the report can be optimized. IMO this is sufficient:
ToDo
|
My current use case would work perfectly if the tracks stick in the "Incoming" crate, just like in my email in box. Normally I sort them from there and than weeks later I delete them they are no longer considered as "New". |
We have this one: I will file new one for the scanner part. |
1cd547c
to
f8d7fd9
Compare
The report dialog now only displays relevant information: I'll work on a fixup to show the report dialog during startup only if changes have been detected. |
554c965
to
c2554f2
Compare
done. |
9e45b1c
to
5141b18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments. Not yet tested.
src/library/dao/trackdao.cpp
Outdated
while (query.next()) { | ||
locations.insert(query.value(locationColumn).toString()); | ||
} | ||
return locations; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may put this lower part into a common function taking a query, and returning the QSet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, done.
numRediscoveredTracks++; | ||
} | ||
} | ||
const auto missingTracks = m_trackDao.getAllMissingTrackLocations(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how this performs and whether optimization is beneficial:
An idea for optimizion would be to move the compare loop into getAllMissingTrackLocations and get around the temporary QSet(). This will require a lot more compares though.
0579a2b
to
ba77efa
Compare
ba77efa
to
47eb4f5
Compare
This emphasizes the logged scan summary and allows to show a respective popup, both for automatic scan at startup and manual scan.
Fixes #10720
For me, this is a step towards being able to manually find successors for moved missing tracks, may also be helpful for the New Tracks filter/feature.
if nothing changed it displays only duration and ""No changes were detected."
TODO
Find an alternative for✔️int LibraryScanner::cleanUpScan()
to get the number of relocated tracks.