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

Add keybinds configuration file #55

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

Conversation

lecler-i
Copy link

@lecler-i lecler-i commented Feb 18, 2019

Delete of Providers config file.
Added a qtwebflix.conf conf file that will have contain the providers and the new keybinds section.

Keybinds

The syntax will be as follow :

action=shortcut

Availabe actions :

fullscreen-toggle quit speed-up speed-down speed-default reload play pause play-pause next-episode

Shortcuts are formatted as in https://doc.qt.io/qt-5/qkeysequence.html (as string literal)

You can give multiple shortcuts to one action, they have to be separated by whitespace ( or \t) :

[keybinds]
play-pause=p
next-episode=> n Ctrl+l t,]

The last example t,] will be a sequential execution of the key t then ].

Providers

As before

[providers]
netflix=http://netflix.com
youtube=http://youtube.com

This is my first time working on a Qt project so check the code troughly, maybe I did some bad stuff that I am not aware of.

`

@gort818
Copy link
Owner

gort818 commented Feb 19, 2019

Wow thanks for the pull request, I will definitely be taking a look!

`keybinds` and `providers` config are now under the same
`qtwebflix.conf` file
@gort818
Copy link
Owner

gort818 commented Mar 2, 2019

I like it a lot but two things.

  1. We should have default key binds to play-pause etc. and write them to the conf file if they do not exist.
  2. You removed the functionality of the right click context menu it no longer changes the provider.

@lecler-i lecler-i closed this Jun 10, 2019
@lecler-i lecler-i reopened this Jun 10, 2019
@lecler-i
Copy link
Author

Hey, sorry for the long time !

I did some little refractoring for better handling of the keybinds.

The issue with the context menu not working anymore is no fixed.

About your point 1., are you sure you want to edit the config file ? It's better we just provide default keybinds in the provided default config file, but overriting / modifying a config file (that is for.. human read) is always a tricky thing and something i personally wouldn't want to happend...

@lecler-i
Copy link
Author

I have delete netflix specific code to change rate of the video in the class MainWindow as it should be implemeted in mpris intreface.

Will open a new PR with new implementation of netflix setRate mpris interface.

Delete netflix specific setRate functions
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.

2 participants