Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
78fddbd
proof of concept : add media support to openhab core
lo92fr Mar 30, 2025
bc96cd3
proof of concept : add media support to openhab core
lo92fr Mar 30, 2025
ffe0409
proof of concept : add media support to openhab core
lo92fr Mar 31, 2025
b9e66dd
add rest media endpoint
lo92fr Mar 31, 2025
38203c8
add mediaService to media rest
lo92fr Mar 31, 2025
0a69c41
add temp ignore
lo92fr Mar 31, 2025
deec590
add classpath/project files
lo92fr Mar 31, 2025
c5c192c
add MediaCollection node for Generic Collection
lo92fr Mar 31, 2025
6a21918
add MediaListenner interface
lo92fr Apr 1, 2025
fac6d1c
add mediaListenner interface, progress on core modifications
lo92fr Apr 4, 2025
f96915b
add MediaBrowser to xsd
lo92fr Apr 4, 2025
a9c3676
add MediaBrowser
lo92fr Apr 4, 2025
2fc1907
add proxy feature for internal Upnp ressource
lo92fr Apr 5, 2025
4786567
div fixes on upnp browsing
lo92fr Apr 5, 2025
08d40c5
enhance media api to return real data
lo92fr Apr 8, 2025
05f6a42
first working version with playback to spotify !
lo92fr Apr 8, 2025
11c4740
finally remove MediaBrowserItem, will concentrate evolution on existi…
lo92fr Apr 9, 2025
d29733c
Move MediaType to complexType so we can differentiate different type …
lo92fr Apr 12, 2025
dac8419
start adding MediaSink support to enable selecting output rendering d…
lo92fr Jun 18, 2025
63f07b1
add preliminary support for target device change
lo92fr Jun 19, 2025
7d2f05e
add binding info to MediaSinkDTO
lo92fr Jun 19, 2025
3aaea50
introduce extended MediaType state on Player item to handle complex s…
lo92fr Jun 21, 2025
0ad7a3b
add a first quick fix for PlayerItemTest failure, need review
lo92fr Jun 23, 2025
3664eb2
adding proxy image stuff for UI layer
lo92fr Jun 25, 2025
3c37fba
litlle fix on proxying function
lo92fr Jun 25, 2025
25257d4
implements paging and lazy loading on MediaCollection (for now only t…
lo92fr Jun 26, 2025
099fff9
div fixes on base media classes
lo92fr Jun 28, 2025
224e995
first working version for searchbar (only working currently with spot…
lo92fr Jun 28, 2025
7ebe6da
first working version for searchbar (only working currently with spot…
lo92fr Jun 28, 2025
8a45248
first working version of global player widget
lo92fr Jul 2, 2025
e6f9c6c
review search functionnalities (WIP)
lo92fr Jul 3, 2025
c3825df
code cleanup : introduce MediaCommandType & MediaStateType
lo92fr Jul 3, 2025
e11020d
add getStreamUri signature
lo92fr Oct 13, 2025
b79d8a8
review pom on rest.media
lo92fr Oct 13, 2025
7f1839f
spotless:apply
lo92fr Oct 13, 2025
8923014
mvn spotless:apply
lo92fr Oct 13, 2025
91409ac
temp fix for PlayerItemTest : need review
lo92fr Oct 13, 2025
e25c09a
try to fix test
lo92fr Oct 14, 2025
787ed88
fix event drop in eventReceived when we use embedded device
lo92fr Oct 15, 2025
9c23df1
review MediaStateType
lo92fr Oct 15, 2025
09c88f9
add primary support for Media Queue
lo92fr Oct 19, 2025
38747f1
code refactoring to remove duplicate code between addon that use medi…
lo92fr Oct 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Californium.properties

generated/
userdata/

4 changes: 2 additions & 2 deletions bundles/org.openhab.core.io.rest.core/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="annotationpath" value="target/dependency"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="annotationpath" value="target/dependency"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
Expand Down
42 changes: 42 additions & 0 deletions bundles/org.openhab.core.io.rest.media/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
<attributes>
<attribute name="annotationpath" value="target/dependency"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="annotationpath" value="target/dependency"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
23 changes: 23 additions & 0 deletions bundles/org.openhab.core.io.rest.media/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.core.io.rest.media</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
40 changes: 40 additions & 0 deletions bundles/org.openhab.core.io.rest.media/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openhab.core.bundles</groupId>
<artifactId>org.openhab.core.reactor.bundles</artifactId>
<version>5.1.0-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.core.io.rest.media</artifactId>

<name>openHAB Core :: Bundles :: Media REST Interface</name>

<dependencies>
<dependency>
<groupId>org.openhab.core.bundles</groupId>
<artifactId>org.openhab.core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.core.bundles</groupId>
<artifactId>org.openhab.core.media</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.core.bundles</groupId>
<artifactId>org.openhab.core.thing</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.core.bundles</groupId>
<artifactId>org.openhab.core.io.rest</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2010-2025 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.core.io.rest.media.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;

/**
* A DTO that is used on the REST API to provide infos about {@link AudioSource} to UIs.
*
* @author Laurent Arnal - Initial contribution
*/
@NonNullByDefault
public class MediaDTO {
public String id;
public String path;
public String type;
public @Nullable String artUri;
public @Nullable String label;
public @Nullable String complement;

public MediaDTO(String id, String path, String type, String label) {
this.id = id;
this.path = path;
this.type = type;
this.label = label;
}

public void setArtUri(String artUri) {
this.artUri = artUri;
}

public void setComplement(String complement) {
this.complement = complement;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.openhab.core.io.rest.media.internal;
Copy link

Copilot AI Jul 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing copyright header and class documentation.

Copilot uses AI. Check for mistakes.


import java.util.ArrayList;
import java.util.List;

public class MediaDTOCollection extends MediaDTO {
private final List<MediaDTO> childs;

public MediaDTOCollection(String id, String path, String type, String label) {
super(id, path, type, label);
childs = new ArrayList<>();
}

public void addMediaDTO(MediaDTO mediaDTO) {
childs.add(mediaDTO);
}

public List<MediaDTO> getChilds() {
return childs;
}
}
Loading