intro-skipper
intro-skipper copied to clipboard
automatic skip only for Apps without Skip Button
#206
Eh. The auto skip option is the only way to have this plugin work with Jellyfin for Kodi.
Eh. The auto skip option is the only way to have this plugin work with Jellyfin for Kodi.
~~whats the ClientName?~~ Already found it
Thanks. Sorry, I was modifying a plugin to dump the SessionInfo for something played by my Android TV device running Kodi.
I note that DeviceName is what I renamed my Kodi instance running on said device to via the Jellyfin admin web interface. Would looking at session.Client, which still reports "Kodi", be possible instead?
e: Thanks!
Why not future proof it? Android TV and Kodi can be your defaults and allow entry of user defined values. This also allows you to add new values in the future by simply updating a list.
Good idea. I would go one step further and let the user choose the client from his known clients list.
PoC:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Drag and Drop Multiple Items</title>
<style>
.container {
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
margin-top: 50px;
}
ul {
list-style-type: none;
padding: 0;
width: 200px;
height: 300px;
border: 1px solid #ccc;
overflow-y: auto;
}
li {
padding: 10px;
cursor: pointer;
border-bottom: 1px solid #ccc;
user-select: none;
}
li:hover {
background-color: #f0f0f0;
}
li.selected {
background-color: #d0e0ff;
}
</style>
</head>
<body>
<div class="container">
<ul id="leftList">
<li draggable="true">Jellyfin Web</li>
<li draggable="true">Jellyfin Android</li>
<li draggable="true">Findroid</li>
<li draggable="true">Jellyfin Media Player</li>
</ul>
<ul id="rightList">
<li draggable="true">Android TV</li>
<li draggable="true">Kodi</li>
</ul>
</div>
<script>
document.querySelectorAll('ul').forEach(list => {
list.addEventListener('click', function(event) {
if (event.target.tagName === 'LI') {
event.target.classList.toggle('selected');
}
});
list.addEventListener('dragstart', function(event) {
if (event.target.tagName === 'LI') {
const selectedItems = list.querySelectorAll('li.selected');
if (!selectedItems.length) {
event.target.classList.add('selected');
}
event.dataTransfer.setData('text/plain', null);
}
});
list.addEventListener('dragover', function(event) {
event.preventDefault();
});
list.addEventListener('drop', function(event) {
event.preventDefault();
const selectedItems = document.querySelectorAll('.selected');
selectedItems.forEach(item => {
list.appendChild(item);
item.classList.remove('selected');
});
});
});
document.querySelectorAll('li').forEach(item => {
item.setAttribute('draggable', 'true');
});
</script>
</body>
</html>
Findroid uses the plugin API and displays a native button. (To avoid confusion later)
Add the option to auto skip when the player isn't currently active, for example when the user watch through pip. Is that even possible to detect?
It depends on the situation. In a native app, pip is handled by the app. On a website, it's handled by the browser. The browser would expose that information to JavaScript. The app may not.
https://stackoverflow.com/questions/61507068/checking-whether-or-not-a-video-is-picture-in-picture-mode
The app version don't support pip, and from what you sent the web client can detect it, so it something that you can do?
The app version don't support pip, and from what you sent the web client can detect it, so it something that you can do?
#208 (this) is the PR for the feature. It’s still a draft. It will depend on whether jumoog wants to add Browser (PiP) as an option here or leave that to be a separate option.
OK I will add issue. And maybe in the future I will code it myself
OK I will add issue. And maybe in the future I will code it myself
The point of that was actually to be patient.
Why not future proof it? Android TV and Kodi can be your defaults and allow entry of user defined values. This also allows you to add new values in the future by simply updating a list.
will do this in another PR. Im not in the mood for frontend today 😆
The frontend will no doubt attract more posts about possible selections anyway, so keeping them separate will make it more manageable.