1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #4157 from nielsvanvelzen/leftover-likes

Remove like/dislike filter
This commit is contained in:
Bill Thornton 2022-11-15 14:22:57 -05:00 committed by GitHub
commit cabb268940
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 73 deletions

View file

@ -69,8 +69,6 @@ import template from './filterdialog.template.html';
if (options.mode === 'livetvchannels') {
context.querySelector('.chkFavorite').checked = query.IsFavorite === true;
context.querySelector('.chkLikes').checked = query.IsLiked === true;
context.querySelector('.chkDislikes').checked = query.IsDisliked === true;
} else {
for (const elem of context.querySelectorAll('.chkStandardFilter')) {
const filters = `,${query.Filters || ''}`;
@ -237,19 +235,6 @@ import template from './filterdialog.template.html';
for (const elem of context.querySelectorAll('.chkFavorite')) {
elem.addEventListener('change', () => this.onFavoriteChange(elem));
}
const chkLikes = context.querySelector('.chkLikes');
chkLikes.addEventListener('change', () => {
query.StartIndex = 0;
query.IsLiked = chkLikes.checked ? true : null;
triggerChange(this);
});
const chkDislikes = context.querySelector('.chkDislikes');
chkDislikes.addEventListener('change', () => {
query.StartIndex = 0;
query.IsDisliked = chkDislikes.checked ? true : null;
triggerChange(this);
});
} else {
for (const elem of context.querySelectorAll('.chkStandardFilter')) {
elem.addEventListener('change', () => this.onStandardFilterChange(elem));

View file

@ -23,15 +23,6 @@
data-filter="IsFavorite" />
<span>${Favorites}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkStandardFilter chkLikes" data-filter="Likes" />
<span>${OptionLikes}</span>
</label>
<label>
<input type="checkbox" is="emby-checkbox" class="chkStandardFilter chkDislikes"
data-filter="Dislikes" />
<span>${OptionDislikes}</span>
</label>
<label class="episodeFilter hide">
<input type="checkbox" is="emby-checkbox" id="chkSpecialEpisode" />
<span>${OptionSpecialEpisode}</span>

View file

@ -9,8 +9,6 @@ import ServerConnections from '../ServerConnections';
const userDataMethods = {
markPlayed: markPlayed,
markDislike: markDislike,
markLike: markLike,
markFavorite: markFavorite
};
@ -138,40 +136,6 @@ function markFavorite(link) {
}
}
function markLike(link) {
const id = link.getAttribute('data-itemid');
const serverId = link.getAttribute('data-serverid');
if (!link.classList.contains('btnUserDataOn')) {
likes(id, serverId, true);
link.classList.add('btnUserDataOn');
} else {
clearLike(id, serverId);
link.classList.remove('btnUserDataOn');
}
link.parentNode.querySelector('.btnDislike').classList.remove('btnUserDataOn');
}
function markDislike(link) {
const id = link.getAttribute('data-itemid');
const serverId = link.getAttribute('data-serverid');
if (!link.classList.contains('btnUserDataOn')) {
likes(id, serverId, false);
link.classList.add('btnUserDataOn');
} else {
clearLike(id, serverId);
link.classList.remove('btnUserDataOn');
}
link.parentNode.querySelector('.btnLike').classList.remove('btnUserDataOn');
}
function markPlayed(link) {
const id = link.getAttribute('data-itemid');
const serverId = link.getAttribute('data-serverid');
@ -187,11 +151,6 @@ function markPlayed(link) {
}
}
function likes(id, serverId, isLiked) {
const apiClient = ServerConnections.getApiClient(serverId);
return apiClient.updateUserItemRating(apiClient.getCurrentUserId(), id, isLiked);
}
function played(id, serverId, isPlayed) {
const apiClient = ServerConnections.getApiClient(serverId);
@ -206,12 +165,6 @@ function favorite(id, serverId, isFavorite) {
return apiClient.updateFavoriteStatus(apiClient.getCurrentUserId(), id, isFavorite);
}
function clearLike(id, serverId) {
const apiClient = ServerConnections.getApiClient(serverId);
return apiClient.clearUserItemRating(apiClient.getCurrentUserId(), id);
}
export default {
fill: fill,
destroy: destroy,

View file

@ -1199,7 +1199,6 @@
"OptionDatePlayed": "Date Played",
"OptionDisableUser": "Disable this user",
"OptionDisableUserHelp": "The server will not allow any connections from this user. Existing connections will be abruptly ended.",
"OptionDislikes": "Dislikes",
"OptionDisplayFolderView": "Display a folder view to show plain media folders",
"OptionDisplayFolderViewHelp": "Display folders alongside your other media libraries. This can be useful if you'd like to have a plain folder view.",
"OptionDvd": "DVD",
@ -1228,7 +1227,6 @@
"OptionImdbRating": "IMDb Rating",
"OptionIsHD": "HD",
"OptionIsSD": "SD",
"OptionLikes": "Likes",
"OptionLoginAttemptsBeforeLockout": "Determine how many incorrect login tries can be made before lockout occurs.",
"OptionLoginAttemptsBeforeLockoutHelp": "A value of zero means inheriting the default of three tries for normal users and five for administrators. Setting this to -1 will disable the feature.",
"OptionMax": "Max",