Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
623e1d55b2 | ||
|
|
54b522101d | ||
|
|
dc92e8adba | ||
|
|
9de0d60bb8 | ||
|
|
5cd1f020fd | ||
|
|
1285d79538 | ||
|
|
05128ebc7e | ||
|
|
3bad812e96 | ||
|
|
1872a744a7 | ||
|
|
83441a3c4f | ||
|
|
49ad41c3f6 |
@@ -16,7 +16,7 @@
|
|||||||
<a is="emby-linkbutton" class="raised raised-mini emby-button" style="margin-left: 2em;"
|
<a is="emby-linkbutton" class="raised raised-mini emby-button" style="margin-left: 2em;"
|
||||||
target="_blank" href="https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced">
|
target="_blank" href="https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced">
|
||||||
<i class="md-icon button-icon button-icon-left secondaryText"></i>
|
<i class="md-icon button-icon button-icon-left secondaryText"></i>
|
||||||
<span>Help</span>
|
<span>${Help}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<hr style="max-width: 800px; margin: 1em 0;">
|
<hr style="max-width: 800px; margin: 1em 0;">
|
||||||
@@ -109,20 +109,27 @@
|
|||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<label class="inputLabel inputLabelUnfocused" for="CustomMediaIds">Media/Collection/Playlist
|
<label class="inputLabel inputLabelUnfocused" for="CustomMediaIds">Media/Collection/Playlist
|
||||||
IDs
|
IDs
|
||||||
(Comma or Newline separated)</label>
|
(Newline or Comma separated)</label>
|
||||||
<textarea is="emby-textarea" id="CustomMediaIds" name="CustomMediaIds"
|
<textarea is="emby-textarea" id="CustomMediaIds" name="CustomMediaIds"
|
||||||
style="width: 100%; height: 150px; font-family: monospace;"></textarea>
|
style="width: 100%; height: 150px; font-family: monospace;"></textarea>
|
||||||
<div class="fieldDescription" id="customMediaIdsDesc">Enter the IDs of the items you want to
|
<div class="fieldDescription" id="customMediaIdsDesc">Enter the IDs of the items you want to show in the slideshow.
|
||||||
show in the slideshow.
|
You can separate them by new line or comma.
|
||||||
You can separate them by comma or new line.
|
<br><br>
|
||||||
|
<b>Manual Trailer Override:</b> You can specify a YouTube URL for an item by adding it in
|
||||||
|
brackets: <br> <code>e.g. ID DESCRIPTION [https://youtu.be/...]</code> or <code>ID [https://youtu.be/...] DESCRIPTION</code>
|
||||||
|
<br><br>
|
||||||
You can also add a description after the ID using any separator like space, pipe
|
You can also add a description after the ID using any separator like space, pipe
|
||||||
(|) or dash (-) (e.g. <code>ID | Description</code>).
|
(|) or dash (-): <br>e.g. <code>ID DESCRIPTION</code> or <code>ID | DESCRIPTION</code>
|
||||||
Note: The separator MUST NOT be a hex character (0-9, a-f).</div>
|
<br><br>
|
||||||
|
<b>Note:</b> If using a <b>Collection Name</b> (instead of an ID) combined with a description, you <b>MUST</b> use
|
||||||
|
the pipe (|) separator.
|
||||||
|
<br>
|
||||||
|
<b>Note:</b> The separator <b>MUST NOT</b> be a hex character (0-9, a-f).</div>
|
||||||
<div class="fieldDescription" id="seasonalMediaIdsDesc" style="display: none;">
|
<div class="fieldDescription" id="seasonalMediaIdsDesc" style="display: none;">
|
||||||
<b>Seasonal Mode Enabled:</b> Define lines with date ranges (Format: DD.MM-DD.MM |
|
<b>Seasonal Mode Enabled:</b> Define lines with date ranges (Format: DD.MM-DD.MM |
|
||||||
<i>name</i> | <i>IDs</i>).<br>
|
<i>name</i> | <i>IDs</i>).<br>
|
||||||
Example:<br>
|
Example:<br>
|
||||||
<code>20.10-31.10 | Halloween | ID1, ID2</code><br>
|
<code>20.10-31.10 | Halloween | ID1, ID2 [https://youtu.be/...]</code><br>
|
||||||
<code>01.12-26.12 | Christmas | ID3, ID4</code><br>
|
<code>01.12-26.12 | Christmas | ID3, ID4</code><br>
|
||||||
<i>Only lines matching the current date will be used. If no line matches, it will try to
|
<i>Only lines matching the current date will be used. If no line matches, it will try to
|
||||||
fetch the list.txt or use random items.</i>
|
fetch the list.txt or use random items.</i>
|
||||||
@@ -131,7 +138,7 @@
|
|||||||
Example:
|
Example:
|
||||||
<code>https://your-jellyfin-url/web/#/details?id=<b style="color:red;">your-item-id</b>&serverId=your-server-id</code><br><br>
|
<code>https://your-jellyfin-url/web/#/details?id=<b style="color:red;">your-item-id</b>&serverId=your-server-id</code><br><br>
|
||||||
You can also insert a name of a collection or playlist to fetch the IDs of all items in
|
You can also insert a name of a collection or playlist to fetch the IDs of all items in
|
||||||
it (will take the first hit.<br>Note: there is currently no feedback if the name
|
it (will take the first hit.<br><b>Note:</b> there is currently no feedback if the name
|
||||||
resolution succeeded, you will have to look if the bar displays the correct items.).
|
resolution succeeded, you will have to look if the bar displays the correct items.).
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||||
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
||||||
<Authors>CodeDevMLH</Authors>
|
<Authors>CodeDevMLH</Authors>
|
||||||
<Version>1.2.3.7</Version>
|
<Version>1.3.0.3</Version>
|
||||||
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ const STATE = {
|
|||||||
videoPlayers: {},
|
videoPlayers: {},
|
||||||
sponsorBlockInterval: null,
|
sponsorBlockInterval: null,
|
||||||
isMuted: CONFIG.startMuted,
|
isMuted: CONFIG.startMuted,
|
||||||
|
customTrailerUrls: {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -344,6 +345,7 @@ const resetSlideshowState = () => {
|
|||||||
STATE.slideshow.itemIds = [];
|
STATE.slideshow.itemIds = [];
|
||||||
STATE.slideshow.loadedItems = {};
|
STATE.slideshow.loadedItems = {};
|
||||||
STATE.slideshow.createdSlides = {};
|
STATE.slideshow.createdSlides = {};
|
||||||
|
STATE.slideshow.customTrailerUrls = {};
|
||||||
STATE.slideshow.totalItems = 0;
|
STATE.slideshow.totalItems = 0;
|
||||||
STATE.slideshow.isLoading = false;
|
STATE.slideshow.isLoading = false;
|
||||||
};
|
};
|
||||||
@@ -1429,7 +1431,11 @@ const SlideCreator = {
|
|||||||
let trailerUrl = null;
|
let trailerUrl = null;
|
||||||
|
|
||||||
// 1. Check for Remote Trailers (YouTube)
|
// 1. Check for Remote Trailers (YouTube)
|
||||||
if (item.RemoteTrailers && item.RemoteTrailers.length > 0) {
|
// Priority: Custom Config URL > Metadata RemoteTrailer
|
||||||
|
if (STATE.slideshow.customTrailerUrls && STATE.slideshow.customTrailerUrls[itemId]) {
|
||||||
|
trailerUrl = STATE.slideshow.customTrailerUrls[itemId];
|
||||||
|
console.log(`Using custom trailer URL for ${itemId}: ${trailerUrl}`);
|
||||||
|
} else if (item.RemoteTrailers && item.RemoteTrailers.length > 0) {
|
||||||
trailerUrl = item.RemoteTrailers[0].Url;
|
trailerUrl = item.RemoteTrailers[0].Url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2576,9 +2582,24 @@ const SlideshowManager = {
|
|||||||
parseCustomIds() {
|
parseCustomIds() {
|
||||||
if (!CONFIG.enableSeasonalContent) {
|
if (!CONFIG.enableSeasonalContent) {
|
||||||
return CONFIG.customMediaIds
|
return CONFIG.customMediaIds
|
||||||
.split(/[\n,]/) // Split by comma or newline
|
.split(/[\n,]/).map((line) => {
|
||||||
.map((id) => id.trim()) // Remove whitespace
|
const urlMatch = line.match(/\[(.*?)\]/);
|
||||||
.filter((id) => id); // Remove empty strings
|
let id = line;
|
||||||
|
if (urlMatch) {
|
||||||
|
const url = urlMatch[1];
|
||||||
|
id = line.replace(/\[.*?\]/, '').trim();
|
||||||
|
const guidMatch = id.match(/([0-9a-f]{32})/i);
|
||||||
|
if (guidMatch) {
|
||||||
|
id = guidMatch[1];
|
||||||
|
} else {
|
||||||
|
id = id.split('|')[0].trim();
|
||||||
|
}
|
||||||
|
STATE.slideshow.customTrailerUrls[id] = url;
|
||||||
|
}
|
||||||
|
return id.trim();
|
||||||
|
})
|
||||||
|
.map((id) => id.trim())
|
||||||
|
.filter((id) => id);
|
||||||
} else {
|
} else {
|
||||||
return this.parseSeasonalIds();
|
return this.parseSeasonalIds();
|
||||||
}
|
}
|
||||||
@@ -2635,7 +2656,22 @@ const SlideshowManager = {
|
|||||||
|
|
||||||
if (isInRange) {
|
if (isInRange) {
|
||||||
console.log(`Seasonal match found: ${line}`);
|
console.log(`Seasonal match found: ${line}`);
|
||||||
const ids = idsPart.split(/[,]/).map(id => id.trim()).filter(id => id);
|
const ids = idsPart.split(/[,]/).map(line => {
|
||||||
|
const urlMatch = line.match(/\[(.*?)\]/);
|
||||||
|
let id = line;
|
||||||
|
if (urlMatch) {
|
||||||
|
const url = urlMatch[1];
|
||||||
|
id = line.replace(/\[.*?\]/, '').trim();
|
||||||
|
const guidMatch = id.match(/([0-9a-f]{32})/i);
|
||||||
|
if (guidMatch) {
|
||||||
|
id = guidMatch[1];
|
||||||
|
} else {
|
||||||
|
id = id.split('|')[0].trim();
|
||||||
|
}
|
||||||
|
STATE.slideshow.customTrailerUrls[id] = url;
|
||||||
|
}
|
||||||
|
return id.trim();
|
||||||
|
}).filter(id => id);
|
||||||
rawIds.push(...ids);
|
rawIds.push(...ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,6 +144,9 @@ Configure the plugin via **Dashboard** > **Plugins** > **Media Bar Enhanced**.
|
|||||||
Define exactly what shows up in your bar.
|
Define exactly what shows up in your bar.
|
||||||
|
|
||||||
* **Enable Custom Media IDs**: Restrict the slideshow to a specific list of IDs.
|
* **Enable Custom Media IDs**: Restrict the slideshow to a specific list of IDs.
|
||||||
|
* **Manual Trailer Override**: Add `[YouTube_URL]` after an ID to force a specific trailer.
|
||||||
|
* Example ID: `a1b2c3d4e5... [https://www.youtube.com/watch?v=VIDEO_ID]`
|
||||||
|
* Example Collection Name: `Halloween Collection [https://...] | My Description` (Note: Use `|` to separate description from name if using a name instead of an ID)
|
||||||
* **Enable Seasonal Content Mode**: Advanced date-based scheduling.
|
* **Enable Seasonal Content Mode**: Advanced date-based scheduling.
|
||||||
* Format: `DD.MM-DD.MM | Name | ID1, ID2, ID3`
|
* Format: `DD.MM-DD.MM | Name | ID1, ID2, ID3`
|
||||||
* Example: `20.10-31.10 | Halloween | <ID_OF_HALLOWEEN_COLLECTION>`
|
* Example: `20.10-31.10 | Halloween | <ID_OF_HALLOWEEN_COLLECTION>`
|
||||||
|
|||||||
@@ -8,6 +8,14 @@
|
|||||||
"category": "General",
|
"category": "General",
|
||||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "1.3.0.3",
|
||||||
|
"changelog": "- feat: Enhance custom media ID functionality with manual trailer override support",
|
||||||
|
"targetAbi": "10.11.0.0",
|
||||||
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.3.0.3/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
|
"checksum": "1d9e0a8342d46f84aed3f7bd1bee32d3",
|
||||||
|
"timestamp": "2026-02-04T01:41:35Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "1.2.3.7",
|
"version": "1.2.3.7",
|
||||||
"changelog": "- Fixes the issue where buttons were cut off on smaller screens such as on S24/S25.\n- Update mediaBarEnhanced.js and mediaBarEnhanced.css with version 3.0.9 from original repo",
|
"changelog": "- Fixes the issue where buttons were cut off on smaller screens such as on S24/S25.\n- Update mediaBarEnhanced.js and mediaBarEnhanced.css with version 3.0.9 from original repo",
|
||||||
|
|||||||
Reference in New Issue
Block a user