mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 22:55:46 +01:00
Will remove auto connected permissions (#1087)
This commit is contained in:
parent
6c0773ae07
commit
ed54b94603
6 changed files with 2 additions and 18 deletions
|
|
@ -54,9 +54,7 @@ App is not signed, you will get a warning when you install it. Select `More info
|
|||
```shell
|
||||
sudo apt-get install libportaudio2 libcanberra-gtk-module libcanberra-gtk3-module
|
||||
sudo snap install buzz
|
||||
sudo snap connect buzz:audio-record
|
||||
sudo snap connect buzz:password-manager-service
|
||||
sudo snap connect buzz:removable-media
|
||||
```
|
||||
|
||||
### Latest development version
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import os
|
||||
import logging
|
||||
import sounddevice
|
||||
import keyring
|
||||
from typing import Tuple, List, Optional
|
||||
from uuid import UUID
|
||||
|
|
@ -155,18 +154,13 @@ class MainWindow(QMainWindow):
|
|||
|
||||
self.transcription_viewer_widget = None
|
||||
|
||||
# TODO Move this to the first user interaction with OpenAI api Key field
|
||||
# that is the only place that needs access to password manager service
|
||||
if os.environ.get('SNAP_NAME', '') == 'buzz':
|
||||
logging.debug("Running in a snap environment")
|
||||
self.check_linux_permissions()
|
||||
|
||||
def check_linux_permissions(self):
|
||||
devices = sounddevice.query_devices()
|
||||
input_devices = [device for device in devices if device['max_input_channels'] > 0]
|
||||
|
||||
if len(input_devices) == 0:
|
||||
snap_notice = SnapNotice(self)
|
||||
snap_notice.show()
|
||||
|
||||
try:
|
||||
_ = keyring.get_password(APP_NAME, username="random")
|
||||
except Exception:
|
||||
|
|
|
|||
|
|
@ -18,9 +18,7 @@ class SnapNotice(QDialog):
|
|||
|
||||
self.text_edit = QTextEdit(self)
|
||||
self.text_edit.setPlainText(
|
||||
"sudo snap connect buzz:audio-record\n"
|
||||
"sudo snap connect buzz:password-manager-service\n"
|
||||
"sudo snap connect buzz:removable-media"
|
||||
)
|
||||
self.text_edit.setReadOnly(True)
|
||||
self.text_edit.setFixedHeight(80)
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ Download and run the `Buzz-x.y.z.exe` file.
|
|||
```shell
|
||||
sudo apt-get install libportaudio2 libcanberra-gtk-module libcanberra-gtk3-module
|
||||
sudo snap install buzz
|
||||
sudo snap connect buzz:audio-record
|
||||
sudo snap connect buzz:password-manager-service
|
||||
sudo snap connect buzz:removable-media
|
||||
```
|
||||
|
||||
[](https://snapcraft.io/buzz)
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@ brew install --cask buzz
|
|||
```shell
|
||||
sudo apt-get install libportaudio2 libcanberra-gtk-module libcanberra-gtk3-module
|
||||
sudo snap install buzz
|
||||
sudo snap connect buzz:audio-record
|
||||
sudo snap connect buzz:password-manager-service
|
||||
sudo snap connect buzz:removable-media
|
||||
```
|
||||
|
||||
[](https://snapcraft.io/buzz)
|
||||
|
|
|
|||
|
|
@ -53,9 +53,7 @@ brew install --cask buzz
|
|||
```shell
|
||||
sudo apt-get install libportaudio2 libcanberra-gtk-module libcanberra-gtk3-module
|
||||
sudo snap install buzz
|
||||
sudo snap connect buzz:audio-record
|
||||
sudo snap connect buzz:password-manager-service
|
||||
sudo snap connect buzz:removable-media
|
||||
```
|
||||
|
||||
### 最新开发者版本
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue