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
Re-enable Python scripts to access Quodlibet library #4242
Comments
Sorry about the delay. Probably best to do this within the Python console (plugin) within QL itself |
My application operates from the command line so I don't see this could work. I have a work around using the QL query json command to effectively export the library, and processing the output, but unfortunately that doesn't perform well with a large library. |
Thanks, I understand a bit more now. I guess the first thing to mention is that it's only really a curiosity of Python packaging that allows loading an application as a library ( So I'm not sure what your integration is but if you can use any of the supported methods then it might do better - or of course If you prefer the hackier approach though:
import os, sys
sys.path.insert(0, '/home/david/quodlibet')
import quodlibet
quodlibet.init()
from quodlibet import library
lib = library.init(os.path.join(quodlibet.get_user_dir(), "songs"))
|
Thanks for your suggestions. I won't get back to this for a while, but will check it out. Cheers! |
@davidSchlosser: Don’t know if this helps, but my little bash script # Get QL saved searches file location.
# We query QL for that since there are so many possibilities.
queriesfile=$(python3 -c "import os.path; from quodlibet import get_user_dir; print(os.path.join(get_user_dir(), 'lists', 'queries.saved'))")
if [ $? -ne 0 ] || [ ! -r "${queriesfile}" ] ; then
echo "$me: Couldn't read Quod Libet's saved searches file. Aborting." >&2
exit 1
fi |
Closing this for now, as plugins are the supported entry point. |
The proposed change
Allow stand-alone Python script access to the Quodlibet library as @lazka described in #1939 for Quodlibet 3.6
With Quodlibet 4.6.1 this script fails with the following:
Benefits of this change
I'll continue to use a script in newer Quodlibet versions to obtain & work with the song tag values extracted from the Quodlibet library, to support remote Quodlibet operation with simplified query creation from a mobile phone or tablet.
Any issues this might cause
I'm not sure if this is a documentation request for the Development Guide or FAQ, or a code change would be required.
The text was updated successfully, but these errors were encountered: