Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
astabeamer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
42loop
astabeamer
Commits
b1e5ea18
Commit
b1e5ea18
authored
5 years ago
by
42loop
Browse files
Options
Downloads
Patches
Plain Diff
added some style, fixed 'current' display
parent
82824cb8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
assets/init.js
+2
-2
2 additions, 2 deletions
assets/init.js
assets/style.css
+2
-0
2 additions, 0 deletions
assets/style.css
hbue.py
+12
-3
12 additions, 3 deletions
hbue.py
with
16 additions
and
5 deletions
assets/init.js
+
2
−
2
View file @
b1e5ea18
...
...
@@ -122,7 +122,7 @@ function noimage(sender)
});
getimages
();
setTimeout
(()
=>
{
sender
.
style
.
background
=
"
darkgray
"
;
},
500
);
document
.
getElementById
(
"
currentimage
"
).
innerHTML
=
""
;
}
...
...
@@ -139,7 +139,7 @@ function novideo(sender)
});
getvideos
();
setTimeout
(()
=>
{
sender
.
style
.
background
=
"
darkgray
"
;
},
500
);
document
.
getElementById
(
"
currentvideo
"
).
innerHTML
=
""
;
}
function
setcron
()
...
...
This diff is collapsed.
Click to expand it.
assets/style.css
+
2
−
0
View file @
b1e5ea18
...
...
@@ -18,6 +18,8 @@
padding
:
10px
;
height
:
20px
;
width
:
42px
;
border-style
:
solid
;
border-radius
:
5px
;
}
.selectmedia
{
...
...
This diff is collapsed.
Click to expand it.
hbue.py
+
12
−
3
View file @
b1e5ea18
...
...
@@ -283,7 +283,10 @@ class MyHandler(http.server.BaseHTTPRequestHandler):
return
elif
page
==
'
/novideo
'
:
print
(
"
have novideo
"
)
os
.
system
(
"
pkill -f omxplayer
"
)
os
.
system
(
"
rm /home/pi/video/*
"
)
currentvideo
=
""
return
...
...
@@ -291,6 +294,7 @@ class MyHandler(http.server.BaseHTTPRequestHandler):
print
(
"
have noimage
"
)
currentimage
=
""
os
.
system
(
"
pkill -f pngview
"
)
os
.
system
(
"
rm /home/pi/image/*
"
)
return
elif
page
==
'
/getcurrent
'
:
...
...
@@ -298,8 +302,13 @@ class MyHandler(http.server.BaseHTTPRequestHandler):
self
.
send_response
(
200
)
self
.
send_header
(
'
Content-type
'
,
'
text/plain; charset=UTF-8
'
)
self
.
end_headers
()
currentvideo
=
""
currentimage
=
""
try
:
currentimage
=
os
.
listdir
(
"
/home/pi/image
"
)[
0
]
currentvideo
=
os
.
listdir
(
"
/home/pi/video
"
)[
0
]
except
:
pass
self
.
wfile
.
write
(
bytes
((
currentimage
+
"
|
"
+
currentvideo
),
encoding
=
'
utf8
'
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment