gsdf
This commit is contained in:
@@ -1133,7 +1133,7 @@
|
||||
let recObserver = null;
|
||||
|
||||
const renderVideoCard = (video, options = {}) => {
|
||||
const videoKey = (window.f0ckSession?.enable_item_slugs && video.slug) ? video.slug : video.id;
|
||||
const videoKey = (window.f0ckSession?.enable_item_slugs !== false && video.slug) ? video.slug : video.id;
|
||||
const rClass = video.rating_class || 'untagged';
|
||||
const blurNsfw = localStorage.getItem('blurNsfw') === 'true';
|
||||
const blurNsfl = localStorage.getItem('blurNsfl') === 'true';
|
||||
@@ -1160,11 +1160,20 @@
|
||||
let displayTitle = '';
|
||||
if (video.title && video.title.trim()) {
|
||||
displayTitle = video.title.trim();
|
||||
} else if (video.tags && video.tags.length > 0) {
|
||||
displayTitle = video.tags.map(t => '#' + t).join(' ');
|
||||
} else {
|
||||
const typeLabel = isAudio ? 'Audio' : (isVideo ? 'Video' : 'Image');
|
||||
displayTitle = `${typeLabel} #${video.id}`;
|
||||
} else if (video.tags) {
|
||||
const rawTags = Array.isArray(video.tags)
|
||||
? video.tags
|
||||
: (typeof video.tags === 'string' ? video.tags.split(',').map(s => s.trim()).filter(Boolean) : []);
|
||||
const formattedTags = rawTags
|
||||
.map(t => (typeof t === 'object' && t !== null ? (t.tag || t.name || '') : String(t)).trim())
|
||||
.filter(Boolean)
|
||||
.map(t => (t.startsWith('#') ? t : '#' + t));
|
||||
if (formattedTags.length > 0) {
|
||||
displayTitle = formattedTags.join(' ');
|
||||
}
|
||||
}
|
||||
if (!displayTitle) {
|
||||
displayTitle = `${videoKey}`;
|
||||
}
|
||||
|
||||
const isAnonGuest = window.f0ckSession?.guest_anonymize && !window.f0ckSession?.logged_in;
|
||||
|
||||
Reference in New Issue
Block a user