You are not logged in.

#26 2018-09-25 13:13:48

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

@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

#27 2018-09-25 14:05:51

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

arnaudv6 wrote:

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

#28 2018-10-04 23:37:28

watsonalgas
Member
Registered: 2007-01-15
Posts: 88

Re: lizzy (music player) python script that feeds your music to mpv

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

#29 2018-10-05 07:42:26

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

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

#30 2018-10-05 11:58:23

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

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

#31 2018-10-05 13:44:25

watsonalgas
Member
Registered: 2007-01-15
Posts: 88

Re: lizzy (music player) python script that feeds your music to mpv

You're right, I've never seen that screen.  The key returned is ^?

I'm using tmux within urxvtc.

Offline

#32 2018-10-05 15:18:55

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

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

#33 2018-10-05 17:02:48

watsonalgas
Member
Registered: 2007-01-15
Posts: 88

Re: lizzy (music player) python script that feeds your music to mpv

Yeah, that works now.

It looks like .jpg files are shown in the results list, though.

Offline

#34 2018-10-05 17:19:52

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

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

#35 2018-11-09 21:01:23

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

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

#36 2018-11-13 18:04:14

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

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

#37 2018-11-14 17:43:00

Sirsurthur
Member
Registered: 2009-02-02
Posts: 122

Re: lizzy (music player) python script that feeds your music to mpv

Thanks Arnaud for these updates.

I only use lizzy as music player since few months now. Works great !

Offline

#38 2018-11-19 19:09:24

whitie
Member
Registered: 2011-03-13
Posts: 17

Re: lizzy (music player) python script that feeds your music to mpv

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

#39 2018-11-28 08:18:16

arnaudv6
Member
Registered: 2016-02-25
Posts: 49

Re: lizzy (music player) python script that feeds your music to mpv

@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

Board footer

Powered by FluxBB