commit | author | age
|
60719c
|
1 |
/* |
U |
2 |
AV-Direktor - Control OMXPlayer on Raspberry Pi via HTTP |
|
3 |
Copyright (C) 2021 Ulrich Hilger |
|
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as |
|
7 |
published by the Free Software Foundation, either version 3 of the |
|
8 |
License, or (at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <https://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
|
63b711
|
19 |
package de.uhilger.avdirektor.handler; |
U |
20 |
|
|
21 |
import com.sun.net.httpserver.HttpExchange; |
|
22 |
import java.util.logging.Level; |
|
23 |
import java.util.logging.Logger; |
|
24 |
|
|
25 |
/** |
|
26 |
* |
|
27 |
* @author ulrich |
|
28 |
*/ |
|
29 |
public class SeekHandler extends PlayHandler { |
|
30 |
|
|
31 |
private static final Logger logger = Logger.getLogger(SeekHandler.class.getName()); |
|
32 |
|
|
33 |
public SeekHandler(String cmd) { |
|
34 |
super(cmd); |
|
35 |
} |
|
36 |
|
|
37 |
@Override |
|
38 |
protected String process(HttpExchange t, String params) { |
b6a8f0
|
39 |
String antwort = abspielen( |
63b711
|
40 |
getParam(map, "titel"), params, getParam(map, "r"), "1"); |
U |
41 |
logger.log(Level.FINE, antwort); |
|
42 |
return antwort; |
|
43 |
} |
|
44 |
|
|
45 |
protected StringBuilder buildParams(HttpExchange t) { |
|
46 |
StringBuilder params = super.buildParams(t); |
|
47 |
params.append(" --pos "); |
852f20
|
48 |
params.append(getParam(map, "pos")); |
63b711
|
49 |
return params; |
U |
50 |
} |
|
51 |
|
|
52 |
} |