feat(rclone): Google Drive entegrasyonu ekle
Dockerfile ve docker-compose yapılandırması Rclone ve FUSE için güncellendi. Backend API'leri Rclone durumunu, ayarlarını, yetkilendirmesini ve mount işlemlerini yönetmek için eklendi. İndirmeler tamamlandığında (Torrent, YouTube, Mail.ru) dosyaların otomatik veya manuel olarak Google Drive'a taşınması sağlandı. Dosya sistemi hem yerel hem de mount edilmiş GDrive yollarını destekleyecek şekilde güncellendi. Ayarlar ve Dosyalar arayüzüne ilgili kontroller eklendi.
This commit is contained in:
@@ -604,6 +604,27 @@
|
||||
refreshMovieCount();
|
||||
refreshTvShowCount();
|
||||
}
|
||||
|
||||
async function moveToGdrive(entry) {
|
||||
if (!entry?.name) return;
|
||||
const ok = confirm("Bu öğe GDrive'a taşınsın mı?");
|
||||
if (!ok) return;
|
||||
try {
|
||||
const resp = await apiFetch("/api/rclone/move", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ path: entry.name })
|
||||
});
|
||||
const data = await resp.json().catch(() => ({}));
|
||||
if (!resp.ok || !data?.ok) {
|
||||
alert(data?.error || "GDrive taşıma başarısız oldu.");
|
||||
return;
|
||||
}
|
||||
await loadFiles();
|
||||
} catch (err) {
|
||||
alert(err?.message || "GDrive taşıma başarısız oldu.");
|
||||
}
|
||||
}
|
||||
function formatSize(bytes) {
|
||||
if (!bytes) return "0 MB";
|
||||
if (bytes < 1e6) return (bytes / 1e3).toFixed(1) + " KB";
|
||||
@@ -1237,7 +1258,7 @@
|
||||
const button = event.currentTarget;
|
||||
const rect = button.getBoundingClientRect();
|
||||
const menuWidth = 160;
|
||||
const menuHeight = 140; // Yaklaşık menü yüksekliği
|
||||
const menuHeight = 180; // Yaklaşık menü yüksekliği
|
||||
|
||||
// Üç noktanın son noktası ile menünün sol kenarını hizala
|
||||
// Düğme genişliği 34px, son nokta sağ kenara yakın
|
||||
@@ -2389,6 +2410,14 @@
|
||||
</button>
|
||||
<div class="menu-divider"></div>
|
||||
{/if}
|
||||
<button
|
||||
class="menu-item"
|
||||
on:click|stopPropagation={() => moveToGdrive(activeMenu)}
|
||||
>
|
||||
<i class="fa-solid fa-cloud-arrow-up"></i>
|
||||
<span>GDrive'a Taşı</span>
|
||||
</button>
|
||||
<div class="menu-divider"></div>
|
||||
<button
|
||||
class="menu-item delete"
|
||||
on:click|stopPropagation={() => deleteFile(activeMenu)}
|
||||
|
||||
Reference in New Issue
Block a user