Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wrgallo authored Jan 7, 2025
2 parents 150c162 + 12537b0 commit 83c17de
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 153 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
- [Connor Smith](https://github.com/ConnorS1110)
- [iFraan](https://github.com/iFraan)
- [Ali](https://github.com/bu3alwa)
- [K. Kyle Puchkov](https://github.com/kepper104)

## Emby Contributors

Expand Down
62 changes: 30 additions & 32 deletions src/components/apphost.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ import profileBuilder from '../scripts/browserDeviceProfile';

const appName = 'Jellyfin Web';

const BrowserName = {
tizen: 'Samsung Smart TV',
web0s: 'LG Smart TV',
operaTv: 'Opera TV',
xboxOne: 'Xbox One',
ps4: 'Sony PS4',
chrome: 'Chrome',
edgeChromium: 'Edge Chromium',
edge: 'Edge',
firefox: 'Firefox',
opera: 'Opera',
safari: 'Safari'
};

function getBaseProfileOptions(item) {
const disableHlsVideoAudioCodecs = [];

Expand Down Expand Up @@ -132,42 +146,26 @@ function getDeviceId() {
}

function getDeviceName() {
if (!deviceName) {
if (browser.tizen) {
deviceName = 'Samsung Smart TV';
} else if (browser.web0s) {
deviceName = 'LG Smart TV';
} else if (browser.operaTv) {
deviceName = 'Opera TV';
} else if (browser.xboxOne) {
deviceName = 'Xbox One';
} else if (browser.ps4) {
deviceName = 'Sony PS4';
} else if (browser.chrome) {
deviceName = 'Chrome';
} else if (browser.edgeChromium) {
deviceName = 'Edge Chromium';
} else if (browser.edge) {
deviceName = 'Edge';
} else if (browser.firefox) {
deviceName = 'Firefox';
} else if (browser.opera) {
deviceName = 'Opera';
} else if (browser.safari) {
deviceName = 'Safari';
} else {
deviceName = 'Web Browser';
}
if (deviceName) {
return deviceName;
}

if (browser.ipad) {
deviceName += ' iPad';
} else if (browser.iphone) {
deviceName += ' iPhone';
} else if (browser.android) {
deviceName += ' Android';
deviceName = 'Web Browser'; // Default device name

for (const key in BrowserName) {
if (browser[key]) {
deviceName = BrowserName[key];
break;
}
}

if (browser.ipad) {
deviceName += ' iPad';
} else if (browser.iphone) {
deviceName += ' iPhone';
} else if (browser.android) {
deviceName += ' Android';
}
return deviceName;
}

Expand Down
4 changes: 3 additions & 1 deletion src/strings/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1989,5 +1989,7 @@
"MediaSegmentSkipPrompt": "{0} überspringen",
"MediaSegmentAction.AskToSkip": "Vor dem Überspringen nachfragen",
"Anime": "Anime",
"MoviesAndShows": "Filme und Serien"
"MoviesAndShows": "Filme und Serien",
"HeaderNextEpisode": "Nächste Episode",
"HeaderNextVideo": "Nächstes Video"
}
Loading

0 comments on commit 83c17de

Please sign in to comment.