-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automatic skip only for Apps without Skip Button #208
Conversation
Eh. The auto skip option is the only way to have this plugin work with Jellyfin for Kodi. |
|
Thanks. Sorry, I was modifying a plugin to dump the I note that 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. |
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. |
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 |
OK I will add issue. And maybe in the future I will code it myself |
The point of that was actually to be patient. |
@@ -112,6 +112,12 @@ private void PlaybackTimer_Elapsed(object? sender, ElapsedEventArgs e) | |||
{ | |||
foreach (var session in _sessionManager.Sessions) | |||
{ | |||
// only need for official Android TV App and jellyfin-kodi | |||
if (session.Client != "Android TV" || session.Client != "Kodi") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s probably a good idea to auto-skip if injecting fails with an 'UnableToAddSkipButton' error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes thats a good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should also be a log printed that that is why it’s automatically skipping. You know that’ll be at least one post in the issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i did
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. |
#206