Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
fix: enhanced title normalization and bump v1.6.7
This commit is contained in:
@@ -607,6 +607,20 @@ async function register({ getRouter, registerSetting, settingsManager, peertubeH
|
||||
return false;
|
||||
}
|
||||
|
||||
function normalizeTitleForMatch(str) {
|
||||
if (!str) return '';
|
||||
return String(str)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/'/g, "'")
|
||||
.replace(/"/g, '"')
|
||||
.replace(/[\u2010-\u2015]/g, '-')
|
||||
.replace(/\s*[\(\[](official|video|music|audio|clip|4k|hd|lyrics|sözleri|visualizer)[^\)\]]*[\)\]]/gi, '')
|
||||
.replace(/[^a-zA-Z0-9\u00C0-\u024F\u1E00-\u1EFF]/g, ' ')
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim()
|
||||
.toLocaleLowerCase('tr');
|
||||
}
|
||||
|
||||
// Helper to enrich YouTube results with existing local PeerTube videos via DB
|
||||
async function enrichResultsWithLocalStatus(results) {
|
||||
try {
|
||||
@@ -643,10 +657,18 @@ async function register({ getRouter, registerSetting, settingsManager, peertubeH
|
||||
};
|
||||
}
|
||||
|
||||
const normalizedTitle = (item.title || '').toLowerCase().trim();
|
||||
const rawItemTitle = (item.title || '').toLowerCase().trim();
|
||||
const normItemTitle = normalizeTitleForMatch(item.title);
|
||||
|
||||
const matchedLocal = localVideos.find(lv => {
|
||||
const lvName = (lv.name || '').toLowerCase().trim();
|
||||
return lvName === normalizedTitle || (lvName.length > 5 && normalizedTitle.includes(lvName));
|
||||
const rawLv = (lv.name || '').toLowerCase().trim();
|
||||
if (rawLv === rawItemTitle) return true;
|
||||
const normLv = normalizeTitleForMatch(lv.name);
|
||||
return (
|
||||
normLv &&
|
||||
(normLv === normItemTitle ||
|
||||
(normLv.length > 5 && (normItemTitle.includes(normLv) || normLv.includes(normItemTitle))))
|
||||
);
|
||||
});
|
||||
|
||||
if (matchedLocal) {
|
||||
|
||||
Reference in New Issue
Block a user