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

Directly Query the sqlite DB for Song Title, Artist and Year #5

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

Conversation

kiisu-dsalyss
Copy link

Old version was somehow causing mixxx to freeze on my computer, this is a better solution.


# TODO: don't write the file if the value is the same (better for disk I/O)
# TODO: unify write command for both OSs
sqlite3 ~/Library/Application\ Support/Mixxx/mixxxdb.sqlite "select library.artist, library.title, library.year from library where library.id = (select PlaylistTracks.track_id from PlaylistTracks where id = (select max(id) from PlaylistTracks));" |
Copy link
Author

Choose a reason for hiding this comment

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

so this query has an issue if you add a track to the playlist while playing... the last track you add during playback will be returned instead of the currently playing track.

need to sort PlaylistTracks ORDER BY "position" DESC and then the track ID that is in the first row will be correct I think...now I just have to figure out the query. Where's a DB person when you need them?

@kiisu-dsalyss
Copy link
Author

this one is better

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

Successfully merging this pull request may close these issues.

1 participant