Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WebRadioPi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thorfin89
WebRadioPi
Commits
56417da9
Commit
56417da9
authored
Jan 13, 2023
by
Thorfin89
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Etude sur l'affichage des info de la radio
parent
48cd4c31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
README.md
README.md
+3
-0
main.py
main.py
+6
-4
webradiopi.cfg
webradiopi.cfg
+1
-1
No files found.
README.md
View file @
56417da9
...
@@ -13,6 +13,9 @@ Pour toute information : thorfin89@free.fr
...
@@ -13,6 +13,9 @@ Pour toute information : thorfin89@free.fr
-
https://www.youtube.com/watch?v=DMpq0Cot8YU
-
https://www.youtube.com/watch?v=DMpq0Cot8YU
-
https://www.youtube.com/watch?v=n1ucrkly2nc
-
https://www.youtube.com/watch?v=n1ucrkly2nc
#### Afficher les informations sur la radio
https://github.com/oaubert/python-vlc/issues/72
#### Doc tkinter :
#### Doc tkinter :
-
http://tkinter.fdex.eu/index.html
-
http://tkinter.fdex.eu/index.html
-
http://pascal.ortiz.free.fr/contents/tkinter/tkinter/
-
http://pascal.ortiz.free.fr/contents/tkinter/tkinter/
main.py
View file @
56417da9
...
@@ -2,17 +2,19 @@
...
@@ -2,17 +2,19 @@
# Fichier : main.py
# Fichier : main.py
# Auteur : Daniel SAZERAT (thorfin89@free.fr)
# Auteur : Daniel SAZERAT (thorfin89@free.fr)
# import vlc > sudo pip3 install python-vlc
# import ----------------------------------
# import ----------------------------------
from
rw_pupitre
import
Pupitre
from
rw_pupitre
import
Pupitre
import
vlc
# sudo pip3 install python-vlc
from
vlc
import
Instance
# classes ---------------------------------
# classes ---------------------------------
class
Radio
(
Pupitre
):
class
Radio
(
Pupitre
):
def
__init__
(
self
):
def
__init__
(
self
):
super
()
.
__init__
()
# constructeur de la classe parente
super
()
.
__init__
()
# constructeur de la classe parente
self
.
instance
=
vlc
.
Instance
()
self
.
instance
=
Instance
()
self
.
player
=
self
.
instance
.
media_player_new
()
self
.
player
=
self
.
instance
.
media_player_new
()
media
=
self
.
instance
.
media_new
(
"http://live.leanstream.co/CJOTFM-MP3"
)
media
=
self
.
instance
.
media_new
(
"http://live.leanstream.co/CJOTFM-MP3"
)
self
.
player
.
set_media
(
media
)
self
.
player
.
set_media
(
media
)
...
@@ -31,10 +33,10 @@ class Radio(Pupitre):
...
@@ -31,10 +33,10 @@ class Radio(Pupitre):
vol_audio
=
int
(
vol_potar
)
vol_audio
=
int
(
vol_potar
)
self
.
player
.
audio_set_volume
(
vol_audio
)
self
.
player
.
audio_set_volume
(
vol_audio
)
sauvegarde
=
open
(
"webradiopi.cfg"
,
"w"
)
sauvegarde
=
open
(
"webradiopi.cfg"
,
"w"
)
sauvegarde
.
write
(
vol_potar
)
# le niveau du volume est enregistré
sauvegarde
.
write
(
vol_potar
)
# le niveau du volume est enregistré
sauvegarde
.
close
()
sauvegarde
.
close
()
def
radio_mute
(
self
):
# coupure du son
def
radio_mute
(
self
):
# coupure du son
self
.
player
.
audio_set_volume
(
0
)
self
.
player
.
audio_set_volume
(
0
)
def
radio_sound
(
self
):
# rétablissement du son
def
radio_sound
(
self
):
# rétablissement du son
...
...
webradiopi.cfg
View file @
56417da9
68
43
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment