Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…salMediaServer into main-transcoding-profiles
  • Loading branch information
SubJunk committed Jul 17, 2024
2 parents be4438a + 5edde9a commit 2db3af0
Show file tree
Hide file tree
Showing 33 changed files with 304 additions and 67 deletions.
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"command": "yarn && yarn dev",
"name": "Launch web interface",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}/react-client"
},
{
"type": "java",
"name": "Launch Current File",
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

### Dependencies
- Bump `@mantine/core` from 7.10.2 to 7.11.2 ([#4818](https://github.com/UniversalMediaServer/UniversalMediaServer/pull/4818))

- Bump `@mantine/dropzone` from 7.10.2 to 7.11.2 ([#4818](https://github.com/UniversalMediaServer/UniversalMediaServer/pull/4818))
- Bump `@mantine/form` from 7.10.2 to 7.11.2 ([#4818](https://github.com/UniversalMediaServer/UniversalMediaServer/pull/4818))
- Bump `@mantine/hooks` from 7.10.2 to 7.11.2 ([#4818](https://github.com/UniversalMediaServer/UniversalMediaServer/pull/4818))
- Bump `@mantine/modals` from 7.10.2 to 7.11.2 ([#4818](https://github.com/UniversalMediaServer/UniversalMediaServer/pull/4818))
- Bump `@mantine/notifications` from 7.10.2 to 7.11.2 ([#4818](https://github.com/UniversalMediaServer/UniversalMediaServer/pull/4818))
- Bump `eslint-plugin-react-refresh` from 0.4.7 to 0.4.8 ([#4817](https://github.com/UniversalMediaServer/UniversalMediaServer/pull/4817))
- Bump `org.apache.maven.plugins:maven-surefire-plugin` from 3.3.0 to 3.3.1 ([#4816](https://github.com/UniversalMediaServer/UniversalMediaServer/pull/4816))

## [14.2.1](https://github.com/UniversalMediaServer/UniversalMediaServer/compare/14.2.0...14.2.1) (2024-07-11)

### General
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

<project.binaries-base>https://www.universalmediaserver.com/svn/binaries</project.binaries-base>

<binary-revision>191</binary-revision>
<binary-revision>192</binary-revision>

<exec-maven-plugin-version>3.3.0</exec-maven-plugin-version>
<maven-antrun-plugin-version>3.1.0</maven-antrun-plugin-version>
Expand Down Expand Up @@ -107,9 +107,9 @@
- su.litvak.chromecast:api-v2
- fm.last:coverartarchive-api
-->
<jackson.version>2.17.1</jackson.version>
<jackson.version>2.17.2</jackson.version>

<surefire-version>3.3.0</surefire-version>
<surefire-version>3.3.1</surefire-version>

<!--
net.java.dev.jna:jna-platform is shared with
Expand Down
2 changes: 1 addition & 1 deletion react-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"eslint": "8.57.0",
"eslint-plugin-react": "7.34.3",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react-refresh": "0.4.7",
"eslint-plugin-react-refresh": "0.4.8",
"typescript": "5.5.2",
"typescript-eslint": "7.13.1",
"vite": "5.3.1"
Expand Down
10 changes: 5 additions & 5 deletions react-client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2095,12 +2095,12 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-react-refresh@npm:0.4.7":
version: 0.4.7
resolution: "eslint-plugin-react-refresh@npm:0.4.7"
"eslint-plugin-react-refresh@npm:0.4.8":
version: 0.4.8
resolution: "eslint-plugin-react-refresh@npm:0.4.8"
peerDependencies:
eslint: ">=7"
checksum: 10c0/78600fe6b10905e7a068a377a381f315c962e3cb7c0575ffcb2136a1fe3dd6936bdfabb56c8f053a581b322a8fbffd7b7ec4b6fa7e227e5470f38fbe9bb170ee
checksum: 10c0/5ed0c1a59c09baf072fb6db4eb18cb72977f0d0f32f77f78fb82f6cca5385e236a3c19a7ef4821cacbc9f7ae19ecb9f5e7b064d7b11f690c1bfcd8fe20288a5c
languageName: node
linkType: hard

Expand Down Expand Up @@ -4717,7 +4717,7 @@ __metadata:
eslint: "npm:8.57.0"
eslint-plugin-react: "npm:7.34.3"
eslint-plugin-react-hooks: "npm:4.6.2"
eslint-plugin-react-refresh: "npm:0.4.7"
eslint-plugin-react-refresh: "npm:0.4.8"
jwt-decode: "npm:4.0.0"
lodash: "npm:4.17.21"
react: "npm:18.3.1"
Expand Down
Binary file modified scripts/dependencies/gon
Binary file not shown.
56 changes: 56 additions & 0 deletions src/main/external-resources/renderers/Sony-Bravia.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#---------------------------------------------------------------------------------------------------
# Profile for Sony Bravia
# See DefaultRenderer.conf for descriptions of all the available options.

RendererName = Sony Bravia
RendererIcon = Sony-BraviaXD.png

# =================================================================================
# This is a generic profile to provide better support for BRAVIA TVs that we do not
# explicitly recognize. Ideally, this will NOT be used, because a more specific
# one should exist.
# It is a clone of Sony-Bravia-XR.conf because that should provide good support for
# TVs from 2021 onwards.
# =================================================================================

UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = BRAVIA
UpnpDetailsSearch = BRAVIA

SeekByTime = true
DLNALocalizationRequired = true
TranscodeVideo = MPEGTS-H264-AC3
TranscodeAudio = WAV
KeepAspectRatioTranscoding = true
MuxNonMod4Resolution = true
H264LevelLimit = 5.1
SupportedVideoBitDepths = 8,10
ForceJPGThumbnails = true
ThumbnailAsResource = true
CreateDLNATreeFaster = true
SendDLNAOrgFlags = false

# Supported video formats:
Supported = f:3gp|3g2 v:h264|mp4 a:aac-lc|he-aac|ac3|eac3|mpa m:video/3gpp
Supported = f:avi v:divx|h264|h265|mjpeg|mp4 a:aac-lc|he-aac|ac3|dts|eac3|mp3|mpa m:video/avi
Supported = f:mkv v:divx|h264|mp4|vp8|vp9 a:aac-lc|he-aac|ac3|dts|eac3|mpa|vorbis si:ASS|SUBRIP m:video/x-matroska
Supported = f:mkv v:h265 a:aac-lc|he-aac|ac3|dts|eac3 si:ASS|SUBRIP m:video/x-matroska
Supported = f:mov v:h264|mjpeg|mp4 a:aac-lc|he-aac|ac3|dts|eac3|lpcm|mpa si:ASS|SUBRIP m:video/quicktime
Supported = f:mp4 v:h264|mp4 a:aac-lc|he-aac|ac3|ac4|dts|eac3|lpcm|mpa m:video/mp4
Supported = f:mp4 v:h265 a:aac-lc|he-aac|ac3|ac4|dts|eac3|lpcm m:video/mp4
Supported = f:mpegps v:mpeg1|mpeg2 a:ac3|lpcm|mpa m:video/mpeg
Supported = f:mpegts v:h264|h265|mpeg2 a:aac-lc|he-aac|ac3|eac3|mpa m:video/vnd.dlna.mpeg-tts
Supported = f:webm v:vp8|vp9 a:vorbis m:video/webm
Supported = f:wmv|asf v:vc1 a:wma m:video/x-ms-wmv

# Supported audio formats:
Supported = f:3g2a m:audio/3gpp2
Supported = f:3ga m:audio/3gpp
Supported = f:m4a a:aac-lc|he-aac m:audio/x-m4a
Supported = f:flac a:flac m:audio/flac
Supported = f:mp3 n:2 m:audio/mpeg s:48000
Supported = f:wav a:dts|lpcm m:audio/wav
Supported = f:wma m:audio/x-ms-wma

# Supported subtitles formats:
SupportedExternalSubtitlesFormats = ASS,SUBRIP
3 changes: 2 additions & 1 deletion src/main/external-resources/renderers/Sony-BraviaEX.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ RendererIcon = braviaex.png

UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = (BRAVIA KDL.+EX[3457])|(BRAVIA KDL.+[CN]X[578])
UpnpDetailsSearch = Sony , (KDL.+EX[3457])|(KDL.+[CN]X[578])
UpnpDetailsSearch = (KDL.+EX[3457])|(KDL.+[CN]X[578])
LoadingPriority = 2

SeekByTime = true
DLNALocalizationRequired = true
Expand Down
3 changes: 2 additions & 1 deletion src/main/external-resources/renderers/Sony-BraviaHX.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RendererIcon = braviahx.png

UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = BRAVIA KDL.+HX
UpnpDetailsSearch = Sony , KDL.+HX
UpnpDetailsSearch = KDL.+HX
LoadingPriority = 2

SeekByTime = true
DLNALocalizationRequired = true
Expand Down
3 changes: 2 additions & 1 deletion src/main/external-resources/renderers/Sony-BraviaW.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ RendererIcon = braviaw.png

UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = BRAVIA KDL-[0-9][0-9]W(6|7|8|9)[0-9][0-9](A|B|C)
UpnpDetailsSearch = Sony , KDL-[0-9][0-9]W(6|7|8|9)[0-9][0-9](A|B|C)
UpnpDetailsSearch = KDL-[0-9][0-9]W(6|7|8|9)[0-9][0-9](A|B|C)
LoadingPriority = 2

SeekByTime = true
DLNALocalizationRequired = true
Expand Down
4 changes: 3 additions & 1 deletion src/main/external-resources/renderers/Sony-BraviaX.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ RendererIcon = Sony-BraviaX.png

UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = (KD|FW)-[0-9][0-9](S|X|Z)[0-9]{1,4}D
UpnpDetailsSearch = Sony , (KD|FW)-[0-9][0-9](S|X|Z)[0-9]{1,4}D
UpnpDetailsSearch = (KD|FW)-[0-9][0-9](S|X|Z)[0-9]{1,4}D

LoadingPriority = 2

# Supported video formats:
Supported = f:3gp|3g2 v:h264|mp4 a:aac-lc|he-aac|ac3|eac3|mpa m:video/3gpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RendererIcon = braviaxbr.png
UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = XBR-[0-9][0-9]A1
UpnpDetailsSearch = XBR-[0-9][0-9]A1
LoadingPriority = 2
LoadingPriority = 3

SeekByTime = true
TranscodeVideo = MPEGTS-H264-AC3
Expand Down
3 changes: 2 additions & 1 deletion src/main/external-resources/renderers/Sony-BraviaXBR.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ RendererIcon = braviaxbr.png

UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = BRAVIA XBR-[0-9][0-9]
UpnpDetailsSearch = Sony , XBR-[0-9][0-9]
UpnpDetailsSearch = XBR-[0-9][0-9]
LoadingPriority = 2

SeekByTime = true
DLNALocalizationRequired = true
Expand Down
59 changes: 59 additions & 0 deletions src/main/external-resources/renderers/Sony-BraviaXR.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#---------------------------------------------------------------------------------------------------
# Profile for Sony Bravia XR
# See DefaultRenderer.conf for descriptions of all the available options.

RendererName = Sony Bravia XR
RendererIcon = Sony-BraviaXD.png

# =================================================================================
# This renderer has sent the following string/s:
#
# X-av-client-info: av=5.0; cn="Sony Corporation"; mn="BRAVIA XR-55X90K"; mv="3.0";
# X-av-physical-unit-info: pa="BRAVIA XR-55X90K";
#
# Manual: https://helpguide.sony.net/tv/jusltn1/v1/en-003/04-01-03_03.html
# Naming convention from https://en.tab-tv.com/identification-tv-sony-2012-2015-year/
# =================================================================================

UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = (XR)-\\d{2}|K-\\d{2}XR\\d{2}
UpnpDetailsSearch = (XR)-\\d{2}|K-\\d{2}XR\\d{2}
LoadingPriority = 2

SeekByTime = true
DLNALocalizationRequired = true
TranscodeVideo = MPEGTS-H264-AC3
TranscodeAudio = WAV
KeepAspectRatioTranscoding = true
MuxNonMod4Resolution = true
H264LevelLimit = 5.1
SupportedVideoBitDepths = 8,10
ForceJPGThumbnails = true
ThumbnailAsResource = true
CreateDLNATreeFaster = true
SendDLNAOrgFlags = false

# Supported video formats:
Supported = f:3gp|3g2 v:h264|mp4 a:aac-lc|he-aac|ac3|eac3|mpa m:video/3gpp
Supported = f:avi v:divx|h264|h265|mjpeg|mp4 a:aac-lc|he-aac|ac3|dts|eac3|mp3|mpa m:video/avi
Supported = f:mkv v:divx|h264|mp4|vp8|vp9 a:aac-lc|he-aac|ac3|dts|eac3|mpa|vorbis si:ASS|SUBRIP m:video/x-matroska
Supported = f:mkv v:h265 a:aac-lc|he-aac|ac3|dts|eac3 si:ASS|SUBRIP m:video/x-matroska
Supported = f:mov v:h264|mjpeg|mp4 a:aac-lc|he-aac|ac3|dts|eac3|lpcm|mpa si:ASS|SUBRIP m:video/quicktime
Supported = f:mp4 v:h264|mp4 a:aac-lc|he-aac|ac3|ac4|dts|eac3|lpcm|mpa m:video/mp4
Supported = f:mp4 v:h265 a:aac-lc|he-aac|ac3|ac4|dts|eac3|lpcm m:video/mp4
Supported = f:mpegps v:mpeg1|mpeg2 a:ac3|lpcm|mpa m:video/mpeg
Supported = f:mpegts v:h264|h265|mpeg2 a:aac-lc|he-aac|ac3|eac3|mpa m:video/vnd.dlna.mpeg-tts
Supported = f:webm v:vp8|vp9 a:vorbis m:video/webm
Supported = f:wmv|asf v:vc1 a:wma m:video/x-ms-wmv

# Supported audio formats:
Supported = f:3g2a m:audio/3gpp2
Supported = f:3ga m:audio/3gpp
Supported = f:m4a a:aac-lc|he-aac m:audio/x-m4a
Supported = f:flac a:flac m:audio/flac
Supported = f:mp3 n:2 m:audio/mpeg s:48000
Supported = f:wav a:dts|lpcm m:audio/wav
Supported = f:wma m:audio/x-ms-wma

# Supported subtitles formats:
SupportedExternalSubtitlesFormats = ASS,SUBRIP
3 changes: 2 additions & 1 deletion src/main/external-resources/renderers/Sony-X-Series-TV.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RendererIcon = Sony-BraviaX.png

UserAgentAdditionalHeader = X-AV-Client-Info
UserAgentAdditionalHeaderSearch = (KD|FW)-[0-9][0-9]X[0-9][0-9]
UpnpDetailsSearch = Sony , (KD|FW)-[0-9][0-9]X[0-9][0-9]
UpnpDetailsSearch = (KD|FW)-[0-9][0-9]X[0-9][0-9]
LoadingPriority = 2

SeekByTime = true
TranscodeVideo = MPEGTS-H264-AC3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ public static synchronized List<WebSource> getWebSourcesFromConfiguration() {
try {
switch (sourceType) {
case "imagefeed", "videofeed", "audiofeed" -> {
// Convert YouTube channel URIs to their feed URIs
if (uri.contains("youtube.com/channel/")) {
uri = uri.replaceAll("youtube.com/channel/", "youtube.com/feeds/videos.xml?channel_id=");
}
resourceName = Feed.getFeedTitle(uri);
}
case "videostream", "audiostream" -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ private static JsonObject getBrowsePage(WebGuiRenderer renderer, String id, Stri
resources.get(0).getParent() != null &&
resources.get(0).getParent().isFolder()) {
StoreContainer thisResourceFromResources = resources.get(0).getParent();
if (thisResourceFromResources.isSorted()) {
if (thisResourceFromResources.isChildrenSorted()) {
StoreResourceSorter.sortResourcesByDefault(resources, lang);
}

Expand Down
20 changes: 16 additions & 4 deletions src/main/java/net/pms/store/StoreContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class StoreContainer extends StoreResource {

protected String name;
protected String thumbnailIcon;
protected boolean isSorted = false;
private boolean isChildrenSorted = false;

private boolean allChildrenAreContainers = true;
private boolean discovered = false;
Expand Down Expand Up @@ -457,7 +457,7 @@ private void addGlobalRepo(StoreResource resource) {
}

protected void sortChildrenIfNeeded() {
if (isSorted) {
if (isChildrenSorted()) {
StoreResourceSorter.sortResourcesByDefault(children);
}
}
Expand Down Expand Up @@ -508,6 +508,14 @@ public String getName() {
return name;
}

/**
* @param name the name to set
* @since 1.50
*/
protected void setName(String name) {
this.name = name;
}

/**
* Returns true in this case, as this is a folder.
*
Expand Down Expand Up @@ -806,8 +814,12 @@ public void setDiscovered(boolean discovered) {
this.discovered = discovered;
}

public boolean isSorted() {
return isSorted;
protected void setChildrenSorted(boolean isChildrenSorted) {
this.isChildrenSorted = isChildrenSorted;
}

public boolean isChildrenSorted() {
return isChildrenSorted;
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/pms/store/StoreItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected StoreItem(Renderer renderer) {
protected StoreItem(Renderer renderer, int specificType) {
super(renderer);
setSpecificType(specificType);
this.isSortable = true;
setSortable(true);
}

@Override
Expand Down
10 changes: 1 addition & 9 deletions src/main/java/net/pms/store/container/Feed.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void parse() throws Exception {
byte[] b = HTTPResource.downloadAndSendBinary(url);
if (b != null) {
SyndFeed feed = input.build(new XmlReader(new ByteArrayInputStream(b)));
name = feed.getTitle();
setName(feed.getTitle());
if (feed.getCategories() != null && !feed.getCategories().isEmpty()) {
SyndCategory category = feed.getCategories().get(0);
tempCategory = category.getName();
Expand Down Expand Up @@ -209,14 +209,6 @@ protected void setTempItemThumbURL(String tempItemThumbURL) {
this.tempItemThumbURL = tempItemThumbURL;
}

/**
* @param name the name to set
* @since 1.50
*/
protected void setName(String name) {
this.name = name;
}

@Override
protected void resolveOnce() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public LocalizedStoreContainer(Renderer renderer, String i18nName, String thumbn
this.formatStrings = null;
}
if (i18nName != null) {
this.name = String.format(Messages.getString(i18nName), (Object[]) this.formatStrings);
setName(String.format(Messages.getString(i18nName), (Object[]) this.formatStrings));
}
}

Expand Down
Loading

0 comments on commit 2db3af0

Please sign in to comment.