You are not logged in.
@watsonalgas
Meanwhile I would very much value your experience and your opinion if you keep on using m over lizzy: I want to improve and optimize every little bit of the workflow in lizzy.
Offline
you can select '/', as long as you don't type a filter string. Am I clear?
or, if you have this line in your profile in ~/.local/share/lizzy/config.ini
libraryIsSlash = no
then simply press [^a] when on left pane.
Again, am I clear?
Offline
I meant to just simply type "m -o hello" and it would play the first match, so yeah, the command line without going into the program.
What I like about "m" is the speed of just typing and it'll play it, fast. I like lizzy too, I just usually have something specific I want to play and don't need to look at a list.
On another note, when I type on the search line and hit backspace, it does nothing. I have to use a back arrow and hit delete to be able to delete what I typed. Am I doing something wrong?
Last edited by watsonalgas (2018-10-04 23:37:55)
Offline
Thanks for your return, @watsonalgas!
You're doing nothing wrong but I must be.
If backspace don't work, you must have never seen the like of this screen, one of the two features I wanted bad enough to write lizzy.
Please help me debug this:
What locale do you use?
Can you uncomment lines 611 to 614 (inclusive), and press backspace in lizzy: which key is reported at the top? Does your filter-pattern string get altered in any way?
Offline
I just flashed:
this certainly is a problem of "backspace terminal convention".... let off my question about the locale:
if you would just tell me the name of your terminal, and the key returned when uncommenting lines 611 to 614 (inclusive), and pressing backspace....
Thanks
edit: "your terminal" -> "the name of your terminal'
Last edited by arnaudv6 (2018-10-05 12:18:20)
Offline
You're right, I've never seen that screen. The key returned is ^?
I'm using tmux within urxvtc.
Offline
OK, this should work now?! (version 2018.10.5)
Again, thanks @watsonalgas for reporting. There indeed was a backspace compatibility issue.
I installed xfce4-terminal because I know it can emulate multiple terminal types, but I didn't even have to go and play with them: the default config showed this bug:
I guess it affected all vte-based terminals also... Simple but nasty bug.
Offline
Yeah, that works now.
It looks like .jpg files are shown in the results list, though.
Offline
Yeah, the "excluded extensions" are just not added with their parent directory, but should you select a file, it works...
At least that is the actual behaviour.
Maybe I'll consider changing this: adding per profile extensions (or banned extensions)...
I don't know if some use lizzy as an image viewer in conjunction with mpv-image-viewer?
My images are mostly my camera photos, never renamed, I don't use mpv-image-viewer, and though I don't rely on musics id3 tags, I still rely on pictures metadata for search: lizzy is no-go for me here.
I still have to think those workflow through.
Offline
Juste tagged a release of Lizzy. I deem it worth mentionning since lizzy should now work in TTYs.
As the changelog states, this is a mixed feelings bag: much remains to be done.
Still the code is in much better state. If you disregard the long comment blocks of "todo: notes to self".
Offline
Just tagged a much cleaner code, with functional youtube-dl... I don't intend to advertise coming versions here. Those waiting on either
[ctrl]+[arrows] to work in TTY
[ctrl]+[c] to interrupt youtube-dl current download
please stay tuned in the repository.
Offline
Thanks Arnaud for these updates.
I only use lizzy as music player since few months now. Works great !
Offline
Just some thoughts about pythonic programming: Please read https://www.python.org/dev/peps/pep-0008/. Classes should be named MixedCase, functions and variables lower_case_with_underscores. Your 'sessionConfObj' is an useless use of a class, a dict would make the job. For your commandline arguments look at the argparse modul. It can also generate your help message. In various functions you have one letter variable names, this is horrible to read. Variable names should tell the reader what content the variable have. Path name concatenation should be done with os.path.join, not with +.
Whitie
Offline
@Sirsurthur: glad you like it! Thanks
@whitie: Well you certainly gave some critics: thanks. And thanks for reading the code in the first place.
You're the whitie on bitbucket I guess from all the python projects there?
I checked my code against http://pep8online.com meticulously, and feel left-down because when re-reading this PEP it is in contradiction sometimes...
I wrote to the owner of that service to tell him.
Classes should be named MixedCase
Done
functions and variables lower_case_with_underscores
Done
Your 'sessionConfObj' is an useless use of a class, a dict would make the job.
Done
And thanks for the tip: as a matter of fact, when searching for a way to avoid globals, my first google match was the like of this[1], so I failed to see the obvious way.
[1] https://www.quora.com/How-can-I-avoid-u … ython-code
For your commandline arguments look at the argparse modul. It can also generate your help message.
I know about argparse but have you read my comment?
In various functions you have one letter variable names, this is horrible to read.
Done
Path name concatenation should be done with os.path.join, not with +.
Done
I feel like the code is in much better shape to be read, and I've progressed: thanks whitie
Last edited by arnaudv6 (2018-11-28 08:19:45)
Offline
@arnaudv6: Yes, I am the whitie from bitbucket. The Code looks much better now. Some minor things:
Constants should be upper (HELP, SCRIPT_REVISION),
print('Could not load startup playlist file:' + startup_playlist)
should be
print('Could not load startup playlist file:', startup_playlist)
Functions like this
def make_nice_dir_names_list(settings):
""" generate comprehensive list of directories for browser mode.
This has good results against code-speed and readability. """
# 12 is arbitrary. Make it the average folders basename length?
settings['nice_dir_names_list'] = [
nice_dir_name(dir_path) for dir_path, _ in settings['music_db_list']
if dir_path.endswith('/') and dir_path.rfind('/', 0, -1) < 12
]
are better written
def make_nice_dir_names_list(music_db_list):
return [
nice_dir_name(dir_path) for dir_path, _ in music_db_list
if dir_path.endswith('/') and dir_path.rfind('/', 0, -1) < 12
]
# In the code
settings['nice_dir_names_list'] = make_nice_dir_names_list(settings['music_db_list'])
Don't give all the settings to every function when only two or three are used. Simply return the result and assign it to the settings dict.
Edit: Line 1088 ff
# If music collection is not default-one, use separate index file.
if profile is 'DEFAULT':
profile = ''
if defaultPath == settings['userMusicsPath']:
settings['music_db_file'] = os.path.join(
settings['xdg_data_home'], 'collection.idx')
else:
settings['music_db_file'] = os.path.join(
settings['xdg_data_home'], profile + 'collection.idx')
can be written
# If music collection is not default-one, use separate index file.
if profile == 'DEFAULT':
profile = ''
settings['music_db_file'] = os.path.join(
settings['xdg_data_home'], '{}collection.idx'.format(profile))
Whitie
Last edited by whitie (2018-12-12 08:23:29)
Offline
@Whitie: thanks again for your time.
Done
Done
Done, thanks, that was a legacy of how -when thinking this feature through- I thought I'd reuse de default index file as much as possible across profiles.
@community: I just tagged a new version, with
Added scrollbars
Better coloring accross terminals
Working key-bindings accross terminals
Fixed overlapping notifications
With this version, lizzy changes default filenames in ~/.local/share/lizzy
collection.idx -> DEFAULTcollection.idx
session.m3u -> DEFAULTsession.m3u
Last edited by arnaudv6 (2018-12-15 07:54:41)
Offline
...just actually committed the changes in default filenames. sorry for the false start
Offline
New release published, with only 2 colors, down from 4. So:
better readability and compatibility across terminals
now respecting terminals color schemes, which should please the solarized enthusiasts
Offline
Nice. Lizzy is now perfect for my use.
Arch is home!
https://github.com/Docbroke
Offline
Version bump,
added support for URLs (radio streams, files outside collection, drag'n'drop....)
corrected a bug where lizzy would not play one's entire collection
Offline
Thanks Arnaud. Lizzy has become my main music player.
Offline
Hey thanks, @Docbroke, @Sirsurthur
That's always nice to hear.
Offline
lizzy just grew a very nice feature, that was just at hand:
if -instead of giving a M3U playlist as argument to play its files-
user gives a simple list of musics to download them, lizzy will propose to download them all.
i.e. A friend gives you a list of titles he wants played at his party tonight:
just pass this file as an argument to lizzy,
select a track, and lizzy will propose to download selected track... together with each of the 153 other tracks in the list.
Also lizzy had the code cleansing and UX improvements you could expect since April,
Offline
Hi there!
/mode smiley on.
New version published 2 days ago ... I would much appreciate feedback :
from users that use lizzy through ssh/gnu-screen: if you uncomment lines 1127 to 1131 included of lizzy 2019.11.22, does lizzy refuse to launch?
from all users: any rough edges you spotted? Please report any bug. I'll strive to create tests to track any regression now. Also don't hesitate to say hi.
Thanks !
Offline
Hello,
Not a bug but a small syntax question :
/home/julien/.bin/lizzy:869: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if not key.startswith(('^', 'KEY_')) and key is not ' ':
/home/julien/.bin/lizzy:954: SyntaxWarning: "is not" with a literal. Did you mean "!="?
elif not key.startswith(('^', 'KEY_')) and key is not ' ':
Still use a lot Lizzy which is my favorite music player !
Best wishes
Offline