updated
This commit is contained in:
parent
cb768902db
commit
e88ab819a5
@ -1581,12 +1581,22 @@ namespace WinFormsApp1
|
||||
await HandleFileCleanup(item, modelname, filename);
|
||||
}
|
||||
|
||||
// =======================================================
|
||||
// 4) HandleStoppedProcess: Doppel-Advance vermeiden & MFC-Sequenz anstoßen
|
||||
// =======================================================
|
||||
async Task HandleStoppedProcess(System.Windows.Forms.ListViewItem item, string url, string modelname, string filename, int procId, string status)
|
||||
{
|
||||
await ProcessFile(modelname, filename);
|
||||
await UpdateStoppedStatus(item, modelname);
|
||||
await CheckAndRemoveOfflineItem(item, modelname);
|
||||
|
||||
// NEU: generisches Weiterschalten NUR, wenn nicht gleich die MFC-Sequenz greift
|
||||
string providerEarly = GetStreamProviderModelname(modelname);
|
||||
bool isMFCEarly = providerEarly == validProvider.Keys.ElementAt(1);
|
||||
if (!(isMFCEarly && checkBox_checkMFCModels.Checked))
|
||||
{
|
||||
await CheckNextFavLikeItemIfNeeded(item);
|
||||
}
|
||||
|
||||
if (!ProcessIsStillRunning(procId))
|
||||
{
|
||||
@ -1598,10 +1608,8 @@ namespace WinFormsApp1
|
||||
|
||||
bool isOnline = modelDetails.TryGetValue(modelname, out var details) &&
|
||||
isOnlineStatus.Contains(details.room_status!);
|
||||
|
||||
bool isHidden = modelDetails.TryGetValue(modelname, out var det) &&
|
||||
isHiddenStatus.Contains(det.room_status!);
|
||||
|
||||
bool isOffline = modelDetails.TryGetValue(modelname, out var d) &&
|
||||
!isOnlineStatus.Contains(d.room_status!);
|
||||
|
||||
@ -1609,71 +1617,61 @@ namespace WinFormsApp1
|
||||
bool above1000Tries = stoppedCounter.ContainsKey(modelname) && stoppedCounter[modelname] > 1000;
|
||||
bool pinned = isPinnedItem(item);
|
||||
|
||||
// 🟢 1. Chaturbate + API + Online → HandleApiUsage
|
||||
// 🟢 1. Chaturbate + API + Online → HandleApiUsage (unverändert)
|
||||
if (checkBox_useCBApi.Checked && isChaturbate && isOnline)
|
||||
{
|
||||
await HandleApiUsage(item, modelname, url);
|
||||
}
|
||||
|
||||
// 🔁 2. Status ist weiterhin online (z. B. "Public", "Private") → gehe zum nächsten
|
||||
// 🔁 2. Status weiterhin "Hidden" → zum nächsten (unverändert)
|
||||
else if (isHidden)
|
||||
{
|
||||
await CheckNextFavLikeItem(item);
|
||||
}
|
||||
|
||||
// ❌ 3. Chaturbate + API + Offline → Entfernen
|
||||
else if (checkBox_useCBApi.Checked && isChaturbate && ((!pinned && isOffline && belowMaxTries) || (pinned && isOffline && checkBox_RemoveItemsAfter1000Tries.Checked && above1000Tries)))
|
||||
// ❌ 3. CB + API + Offline → Entfernen (unverändert)
|
||||
else if (checkBox_useCBApi.Checked && isChaturbate &&
|
||||
((!pinned && isOffline && belowMaxTries) ||
|
||||
(pinned && isOffline && checkBox_RemoveItemsAfter1000Tries.Checked && above1000Tries)))
|
||||
{
|
||||
await RemoveItemFromDownloadlist(item, modelname);
|
||||
}
|
||||
|
||||
// ✅ 4. MyFreeCams → Immer versuchen zu starten
|
||||
// ✅ 4. MyFreeCams → nur Favoriten mit ☑ in Sequenz bewegen
|
||||
else if (isMFC)
|
||||
{
|
||||
bool isFavoriteItem = isFavoritedItem(modelname);
|
||||
bool isWatched = IsFavoriteWatched(url); // NEU
|
||||
|
||||
if (checkBox_useCBApi.Checked && checkBox_checkMFCModels.Checked && isFavoriteItem)
|
||||
if (checkBox_useCBApi.Checked && checkBox_checkMFCModels.Checked && isFavoriteItem && isWatched)
|
||||
{
|
||||
if (!fileExists)
|
||||
await RemoveItemFromDownloadlist(item, modelname);
|
||||
|
||||
// gezielt nur die MFC-Favoriten-Sequenz anstoßen
|
||||
if (await modelAccessLock.WaitAsync(0))
|
||||
{
|
||||
try
|
||||
{
|
||||
await CheckMfcFavoritesSequentialAsync();
|
||||
}
|
||||
try { await CheckMfcFavoritesSequentialAsync(); }
|
||||
finally { modelAccessLock.Release(); }
|
||||
}
|
||||
return; // wichtig: nichts anderes mehr tun
|
||||
}
|
||||
// Nicht-Favoriten oder Checkbox aus → Standardfluss
|
||||
// Nicht-Favoriten oder nicht-☑ → Standardfluss
|
||||
}
|
||||
|
||||
// ✅ 6. Kein API → StartDownloadIfNeeded
|
||||
// ✅ 6. Kein API → Standard (unverändert)
|
||||
else if (!checkBox_useCBApi.Checked)
|
||||
{
|
||||
await StartDownloadIfNeeded(item, modelname, status);
|
||||
|
||||
if (!fileExists && !ProcessIsStillRunning(procId))
|
||||
{
|
||||
await CheckNextFavLikeItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
// 🧹 Cleanup (nur wenn erlaubt)
|
||||
// 🧹 Cleanup (nur wenn erlaubt) – unverändert
|
||||
if (!isOnline && !isHidden && isOffline &&
|
||||
(
|
||||
(!pinned && checkBox_useCBApi.Checked) ||
|
||||
(pinned && checkBox_RemoveItemsAfter1000Tries.Checked && above1000Tries)
|
||||
))
|
||||
((!pinned && checkBox_useCBApi.Checked) ||
|
||||
(pinned && checkBox_RemoveItemsAfter1000Tries.Checked && above1000Tries)))
|
||||
{
|
||||
await RemoveItemFromDownloadlist(item, modelname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2649,6 +2647,9 @@ namespace WinFormsApp1
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================
|
||||
// 5) StartDownload: Bei MFC-Fehlstart gezielt MFC-Sequenz weiterschieben
|
||||
// =======================================================
|
||||
private async Task StartDownload(System.Windows.Forms.ListViewItem item)
|
||||
{
|
||||
string url = item.SubItems[1].Text;
|
||||
@ -2657,7 +2658,7 @@ namespace WinFormsApp1
|
||||
|
||||
try
|
||||
{
|
||||
if (status != "Live" && status != "Waiting" && !String.IsNullOrEmpty(url) && await IsValidURL(url).ConfigureAwait(false))
|
||||
if (status != "Live" && status != "Waiting" && !string.IsNullOrEmpty(url) && await IsValidURL(url).ConfigureAwait(false))
|
||||
{
|
||||
string filename = modelname + "_" + DateTime.Now.ToString("MM_dd_yyyy__HH-mm-ss") + recordingFileFormat;
|
||||
this.BeginInvoke(new MethodInvoker(() => item.SubItems[2].Text = filename));
|
||||
@ -2687,21 +2688,18 @@ namespace WinFormsApp1
|
||||
proc.StartInfo.EnvironmentVariables["PATH"] = baseDir + ";" + currentPath;
|
||||
|
||||
string outFile = System.IO.Path.Combine(recordingpath!.FullName, filename);
|
||||
// Nur URL + -o (Recorder ruft ffmpeg selbst auf)
|
||||
proc.StartInfo.Arguments = $"\"{url}\" -o \"{outFile}\"";
|
||||
}
|
||||
else if (isCB)
|
||||
{
|
||||
// Bisheriger Weg
|
||||
proc.StartInfo.Arguments = url + " best -o \"" + System.IO.Path.Combine(recordingpath!.FullName, filename) + "\" -f";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback: bisheriger Weg
|
||||
proc.StartInfo.Arguments = url + " best -o \"" + System.IO.Path.Combine(recordingpath!.FullName, filename) + "\" -f";
|
||||
}
|
||||
|
||||
// deine bestehende Startverzögerung
|
||||
// Start-Verzögerung
|
||||
this.Invoke(new MethodInvoker(delegate () { selectedSpeed = comboBox_checkSpeed.SelectedIndex; }));
|
||||
switch (selectedSpeed)
|
||||
{
|
||||
@ -2715,39 +2713,33 @@ namespace WinFormsApp1
|
||||
|
||||
await Task.Run(() => proc.Start());
|
||||
|
||||
// PID ins Item schreiben
|
||||
// PID
|
||||
if (listView_Downloads.InvokeRequired)
|
||||
listView_Downloads.Invoke(new MethodInvoker(() => item.SubItems[6].Text = proc.Id.ToString()));
|
||||
else
|
||||
item.SubItems[6].Text = proc.Id.ToString();
|
||||
|
||||
// ➜ NEU: Wenn CB-API aktiv und MFC, kurz prüfen ob eine Datei wirklich angelegt wird
|
||||
// MFC: prüfen, ob Output wirklich entsteht
|
||||
if (checkBox_useCBApi.Checked && isMFC)
|
||||
{
|
||||
string outFile = System.IO.Path.Combine(recordingpath!.FullName, filename);
|
||||
bool ok = await WaitForOutputOrExitAsync(outFile, proc.Id, TimeSpan.FromSeconds(15));
|
||||
if (!ok)
|
||||
{
|
||||
// kein Output => offline/privat o.ä.: Versuch beenden, Eintrag löschen, nächstes Model
|
||||
try { if (!proc.HasExited) proc.Kill(true); } catch { /* ignore */ }
|
||||
await UpdateItemStatus(item, "Stopped");
|
||||
await RemoveItemFromDownloadlist(item, modelname);
|
||||
|
||||
// nur wenn deine neue Checkbox aktiv ist → nächstes MFC-Favoriten-Model prüfen
|
||||
if (checkBox_checkMFCModels.Checked)
|
||||
// Nur wenn deine MFC-Checkbox aktiv ist und Favorit überwacht → zum nächsten MFC-☑
|
||||
if (checkBox_checkMFCModels.Checked && IsFavoriteWatched(url))
|
||||
{
|
||||
// optional gegen Doppelaufrufe im selben Tick absichern:
|
||||
if (await modelAccessLock.WaitAsync(0))
|
||||
{
|
||||
try
|
||||
{
|
||||
await CheckMfcFavoritesSequentialAsync();
|
||||
}
|
||||
try { await CheckMfcFavoritesSequentialAsync(); }
|
||||
finally { modelAccessLock.Release(); }
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2756,6 +2748,43 @@ namespace WinFormsApp1
|
||||
catch { /* optional logging */ }
|
||||
}
|
||||
|
||||
// =======================================================
|
||||
// 6) Helper: "Ist dieses Favoriten-Item überwacht (☑)?"
|
||||
// =======================================================
|
||||
private bool IsFavoriteWatched(string url)
|
||||
{
|
||||
const int WATCH_COL = 6; // ggf. anpassen
|
||||
foreach (System.Windows.Forms.ListViewItem it in listView_Favorites.Items)
|
||||
{
|
||||
if (string.Equals(it.SubItems[1].Text, url, StringComparison.OrdinalIgnoreCase))
|
||||
return it.SubItems.Count > WATCH_COL && it.SubItems[WATCH_COL].Text == "☑";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsLikeWatched(string url)
|
||||
{
|
||||
const int WATCH_COL = 6; // ggf. anpassen
|
||||
foreach (System.Windows.Forms.ListViewItem it in listView_Likes.Items)
|
||||
{
|
||||
if (string.Equals(it.SubItems[1].Text, url, StringComparison.OrdinalIgnoreCase))
|
||||
return it.SubItems.Count > WATCH_COL && it.SubItems[WATCH_COL].Text == "☑";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// =======================================================
|
||||
// 7) Helper: Finde Download-Item zu URL
|
||||
// =======================================================
|
||||
private System.Windows.Forms.ListViewItem? FindDownloadItemByUrl(string url)
|
||||
{
|
||||
foreach (System.Windows.Forms.ListViewItem it in listView_Downloads.Items)
|
||||
if (string.Equals(it.SubItems[1].Text, url, StringComparison.OrdinalIgnoreCase))
|
||||
return it;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private bool isDuplicateFile(FileInfo _file, System.Windows.Forms.ListView _listview)
|
||||
{
|
||||
try
|
||||
@ -2832,24 +2861,25 @@ namespace WinFormsApp1
|
||||
}
|
||||
}
|
||||
|
||||
// Sucht in Favorites das nächste MyFreeCams-Model (MFC) und stößt den Start an.
|
||||
// Wenn ein Download für dieses Model bereits "Live" ist, wird sofort zum nächsten gewechselt.
|
||||
// ========================================================================
|
||||
// 2) MFC-Favoriten nacheinander prüfen (nur „Überwachen = ☑“, immer wrap)
|
||||
// ========================================================================
|
||||
private async Task CheckMfcFavoritesSequentialAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Nur im gewünschten Modus arbeiten
|
||||
if (!checkBox_useCBApi.Checked)
|
||||
// Nur im gewünschten Modus arbeiten (MFC-Loop über Checkbox steuern)
|
||||
if (!checkBox_checkMFCModels.Checked)
|
||||
return;
|
||||
|
||||
if (listView_Favorites.Items.Count == 0)
|
||||
return;
|
||||
|
||||
// Nächstes MFC-Item in den Favoriten finden (ab current+1, ggf. loop)
|
||||
// Nächstes MFC-☑-Item finden (ab current+1, IMMER loopen)
|
||||
var nextMfcFav = await GetNextMfcFavoriteOnly(
|
||||
listView_Favorites,
|
||||
(checkFavorites_CurrentItem?.Index ?? -1) + 1,
|
||||
checkBox_loopFavorites.Checked
|
||||
true
|
||||
);
|
||||
|
||||
if (nextMfcFav == null)
|
||||
@ -2861,26 +2891,26 @@ namespace WinFormsApp1
|
||||
string favUrl = nextMfcFav.SubItems[1].Text;
|
||||
string model = GetModelnameFromURL(favUrl);
|
||||
|
||||
// Läuft dieses Model bereits und ist "Live"? → sofort zum nächsten
|
||||
// Läuft dieses Model bereits und ist "Live"? → sofort noch ein Schritt weiter
|
||||
var existingDl = FindDownloadItemByUrl(favUrl);
|
||||
if (existingDl != null && string.Equals(existingDl.SubItems[3].Text, "Live", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
await CheckNextFavLikeItem(nextMfcFav);
|
||||
return;
|
||||
// nächstes MFC-☑ ab diesem Index suchen
|
||||
var skipLive = await GetNextMfcFavoriteOnly(listView_Favorites, nextMfcFav.Index + 1, true);
|
||||
if (skipLive == null) return;
|
||||
checkFavorites_CurrentItem = skipLive;
|
||||
nextMfcFav = skipLive;
|
||||
favUrl = nextMfcFav.SubItems[1].Text;
|
||||
model = GetModelnameFromURL(favUrl);
|
||||
}
|
||||
|
||||
// In die Downloadliste einreihen (falls noch nicht vorhanden) – Status "Queued"
|
||||
await Task.Run(() => CheckItem(nextMfcFav, "Queued"));
|
||||
|
||||
// Den soeben (oder bereits vorhandenen) Download-Eintrag finden …
|
||||
// Download-Eintrag suchen & direkt starten
|
||||
existingDl = FindDownloadItemByUrl(favUrl);
|
||||
if (existingDl != null)
|
||||
{
|
||||
// … und jetzt direkt starten (so muss man nicht auf den nächsten Tick warten)
|
||||
await StartDownloadIfNeeded(existingDl, model, "Queued");
|
||||
// Falls der Start nicht gelingt, erledigt deine StartDownload()-Logik (WaitForOutputOrExitAsync)
|
||||
// das Beenden/Entfernen und springt mit CheckNextFavLikeItem automatisch weiter.
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -2888,12 +2918,19 @@ namespace WinFormsApp1
|
||||
}
|
||||
}
|
||||
|
||||
// Nur MFC-Favoriten vorwärts durchsuchen; Einträge, die bereits "Live" in Downloads sind, werden übersprungen.
|
||||
private async Task<System.Windows.Forms.ListViewItem?> GetNextMfcFavoriteOnly(System.Windows.Forms.ListView listView, int startIndex, bool allowLoop)
|
||||
|
||||
|
||||
// ========================================================================
|
||||
// 3) Nur MFC-Favoriten mit Überwachen=☑ iterieren; "Live" überspringen
|
||||
// ========================================================================
|
||||
private async Task<System.Windows.Forms.ListViewItem?> GetNextMfcFavoriteOnly(
|
||||
System.Windows.Forms.ListView listView, int startIndex, bool allowLoop)
|
||||
{
|
||||
if (listView.InvokeRequired)
|
||||
return await listView.Invoke(async () => await GetNextMfcFavoriteOnly(listView, startIndex, allowLoop));
|
||||
|
||||
const int WATCH_COL = 6; // <- ggf. anpassen, wenn "Überwachen"-Spalte anders ist
|
||||
|
||||
int itemCount = listView.Items.Count;
|
||||
int index = startIndex;
|
||||
bool wrapped = false;
|
||||
@ -2905,25 +2942,25 @@ namespace WinFormsApp1
|
||||
{
|
||||
if (index >= itemCount)
|
||||
{
|
||||
if (allowLoop && !wrapped)
|
||||
{
|
||||
index = 0;
|
||||
wrapped = true;
|
||||
}
|
||||
if (allowLoop && !wrapped) { index = 0; wrapped = true; }
|
||||
else break;
|
||||
}
|
||||
|
||||
var it = listView.Items[index];
|
||||
bool watched = it.SubItems.Count > WATCH_COL && it.SubItems[WATCH_COL].Text == "☑";
|
||||
if (watched)
|
||||
{
|
||||
string url = it.SubItems[1].Text;
|
||||
string provider = GetStreamProviderURL(url);
|
||||
|
||||
if (provider == mfcKey)
|
||||
{
|
||||
// Wenn dieser URL bereits in Downloads mit Status "Live" existiert → überspringen
|
||||
// Bereits "Live" in Downloads? → überspringen
|
||||
var dl = FindDownloadItemByUrl(url);
|
||||
if (dl == null || !string.Equals(dl.SubItems[3].Text, "Live", StringComparison.OrdinalIgnoreCase))
|
||||
return it;
|
||||
}
|
||||
}
|
||||
|
||||
index++;
|
||||
visited++;
|
||||
@ -2932,18 +2969,10 @@ namespace WinFormsApp1
|
||||
return null;
|
||||
}
|
||||
|
||||
// Hilfsfunktion: passenden Download-ListViewItem zu einer URL finden
|
||||
private System.Windows.Forms.ListViewItem? FindDownloadItemByUrl(string url)
|
||||
{
|
||||
foreach (System.Windows.Forms.ListViewItem it in listView_Downloads.Items)
|
||||
if (string.Equals(it.SubItems[1].Text, url, StringComparison.OrdinalIgnoreCase))
|
||||
return it;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// =======================================================
|
||||
// 1) TIMER: Einmal pro Tick MFC-Favoriten prüfen (nach foreach)
|
||||
// =======================================================
|
||||
private async void timer_getProcessInfo_Tick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
@ -2959,38 +2988,36 @@ namespace WinFormsApp1
|
||||
foreach (System.Windows.Forms.ListViewItem download_item in listView_Downloads.Items)
|
||||
{
|
||||
string status = download_item.SubItems[3].Text;
|
||||
if (!String.IsNullOrEmpty(status) || isOnlineStatus.Contains(status) || isHiddenStatus.Contains(status))
|
||||
if (!string.IsNullOrEmpty(status) || isOnlineStatus.Contains(status) || isHiddenStatus.Contains(status))
|
||||
{
|
||||
getProcessInfo_CurrentItem = download_item;
|
||||
await checkDownloadItem(download_item);
|
||||
// nur wenn Checkbox aktiv
|
||||
listView_Downloads.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WICHTIG: Erst jetzt freigeben – danach genau einmal pro Tick MFC prüfen
|
||||
getProcessInfo_CurrentItem = null;
|
||||
|
||||
// Nur wenn MFC-Checkbox aktiv: genau EIN Aufruf pro Tick, unabhängig von Downloads
|
||||
if (checkBox_checkMFCModels.Checked)
|
||||
{
|
||||
// verhindert Mehrfachaufrufe im selben Tick
|
||||
if (await modelAccessLock.WaitAsync(0))
|
||||
if (await modelAccessLock.WaitAsync(0)) // verhindert Mehrfachaufrufe im selben Tick
|
||||
{
|
||||
try
|
||||
{
|
||||
await CheckMfcFavoritesSequentialAsync();
|
||||
}
|
||||
finally
|
||||
{
|
||||
modelAccessLock.Release();
|
||||
finally { modelAccessLock.Release(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
listView_Downloads.Refresh();
|
||||
}
|
||||
}
|
||||
getProcessInfo_CurrentItem = null;
|
||||
|
||||
// TODO
|
||||
//await Task.Run(() => VerifyRunningProcesses());
|
||||
|
||||
// (Rest deines Timers bleibt unverändert)
|
||||
// TODO: await Task.Run(() => VerifyRunningProcesses());
|
||||
if (checkBox_warnFreeDiskSpace.Checked)
|
||||
{
|
||||
await getFreeDriveSpace(System.IO.Path.GetPathRoot(recordingpath.FullName)!);
|
||||
|
||||
if (checkBox_warnFreeDiskSpace_StopDownloads.Checked && freeSpacePerc <= (double)numericUpDown_warnFreeDiskSpace.Value)
|
||||
{
|
||||
isLoop = false;
|
||||
@ -2999,9 +3026,7 @@ namespace WinFormsApp1
|
||||
await SaveDatabaseAsync();
|
||||
timer_getProcessInfo.Stop();
|
||||
if (comboBox_AutoShutdownAction.SelectedIndex == 0 && checkBox_AutoShutdown.Checked && shutdown)
|
||||
{
|
||||
System.Windows.Forms.Application.Exit();
|
||||
}
|
||||
if (comboBox_AutoShutdownAction.SelectedIndex == 1 && checkBox_AutoShutdown.Checked && shutdown)
|
||||
{
|
||||
using (Process proc = new Process())
|
||||
@ -3015,19 +3040,17 @@ namespace WinFormsApp1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (listView_Downloads.Items.Count > 0 && GetActiveDownloads() == 0 && checkBox_AutoShutdown.Checked && shutdown)
|
||||
{
|
||||
listView_Downloads.Items.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (drive.IsReady && drive.AvailableFreeSpace <= 5000000000)
|
||||
{
|
||||
foreach (System.Windows.Forms.ListViewItem item in listView_Downloads.Items)
|
||||
{
|
||||
//item.SubItems[3].Text = "Stopped";
|
||||
await UpdateItemStatus(item, "Stopped");
|
||||
}
|
||||
|
||||
if (!isStopped)
|
||||
{
|
||||
isStopped = true;
|
||||
@ -3042,6 +3065,7 @@ namespace WinFormsApp1
|
||||
popup.AddText("Unzureichender Speicherplatz! Bitte Speicher freigeben!");
|
||||
}
|
||||
}
|
||||
|
||||
if (checkBox_AutoShutdown.Checked && (listView_Downloads.Items.Count == 0 || GetActiveDownloads() == 0) && shutdown && !triggeredShutdown)
|
||||
{
|
||||
triggeredShutdown = true;
|
||||
@ -3050,9 +3074,7 @@ namespace WinFormsApp1
|
||||
await SaveDatabaseAsync();
|
||||
timer_getProcessInfo.Stop();
|
||||
if (comboBox_AutoShutdownAction.SelectedIndex == 0 && checkBox_AutoShutdown.Checked && triggeredShutdown)
|
||||
{
|
||||
System.Windows.Forms.Application.Exit();
|
||||
}
|
||||
if (comboBox_AutoShutdownAction.SelectedIndex == 1 && checkBox_AutoShutdown.Checked && triggeredShutdown)
|
||||
{
|
||||
using (Process proc = new Process())
|
||||
@ -3065,6 +3087,7 @@ namespace WinFormsApp1
|
||||
System.Windows.Forms.Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
if ((checkBox_dateTime_AutoShutdown.Checked && shutdownTime != null && DateTime.Compare(DateTime.Now, (DateTime)shutdownTime) >= 0) && !triggeredShutdown)
|
||||
{
|
||||
triggeredShutdown = true;
|
||||
@ -3073,9 +3096,7 @@ namespace WinFormsApp1
|
||||
await SaveDatabaseAsync();
|
||||
timer_getProcessInfo.Stop();
|
||||
if (comboBox_dateTimePicker_AutoShutdown.SelectedIndex == 0 && checkBox_dateTime_AutoShutdown.Checked && triggeredShutdown)
|
||||
{
|
||||
System.Windows.Forms.Application.Exit();
|
||||
}
|
||||
if (comboBox_dateTimePicker_AutoShutdown.SelectedIndex == 1 && checkBox_dateTime_AutoShutdown.Checked && triggeredShutdown)
|
||||
{
|
||||
using (Process proc = new Process())
|
||||
@ -3088,6 +3109,7 @@ namespace WinFormsApp1
|
||||
System.Windows.Forms.Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
getDownloadItemCount();
|
||||
}
|
||||
getProcessInfoRunning = false;
|
||||
@ -3097,10 +3119,10 @@ namespace WinFormsApp1
|
||||
getProcessInfo_CurrentItem = null;
|
||||
backgroundWorker_getProcessInfo.CancelAsync();
|
||||
getProcessInfoRunning = false;
|
||||
//System.Windows.Forms.MessageBox.Show(ex.Message, "timer_getProcessInfo_Tick");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async Task CheckWatchedModels(ListView listView)
|
||||
{
|
||||
List<string> modelUrlsToAdd;
|
||||
@ -6258,6 +6280,8 @@ namespace WinFormsApp1
|
||||
srcItem.UseItemStyleForSubItems = false;
|
||||
srcItem.Text = "♥";
|
||||
srcItem.SubItems[0].ForeColor = Color.Red;
|
||||
bool isWatched = IsFavoriteWatched(url) || IsLikeWatched(url);
|
||||
string mark = isWatched ? "☑" : "☐";
|
||||
|
||||
// Neuen Eintrag in Likes anlegen
|
||||
var lvi = new ListViewItem("♥") { UseItemStyleForSubItems = false };
|
||||
@ -6267,7 +6291,7 @@ namespace WinFormsApp1
|
||||
lvi.SubItems.Add(GetStreamProviderURL(url));
|
||||
lvi.SubItems.Add(lastStream);
|
||||
lvi.SubItems.Add(id);
|
||||
lvi.SubItems.Add("☐");
|
||||
lvi.SubItems.Add(mark);
|
||||
listView_Likes.Items.Add(lvi);
|
||||
|
||||
// Falls dieser URL in Favorites war → entfernen
|
||||
@ -6403,6 +6427,8 @@ namespace WinFormsApp1
|
||||
srcItem.UseItemStyleForSubItems = false;
|
||||
srcItem.Text = "★";
|
||||
srcItem.SubItems[0].ForeColor = Color.Gold;
|
||||
bool isWatched = IsFavoriteWatched(url) || IsLikeWatched(url);
|
||||
string mark = isWatched ? "☑" : "☐";
|
||||
|
||||
var lvi = new ListViewItem("★") { UseItemStyleForSubItems = false };
|
||||
lvi.SubItems[0].ForeColor = Color.Gold;
|
||||
@ -6411,7 +6437,7 @@ namespace WinFormsApp1
|
||||
lvi.SubItems.Add(GetStreamProviderURL(url));
|
||||
lvi.SubItems.Add(lastStream);
|
||||
lvi.SubItems.Add(id);
|
||||
lvi.SubItems.Add("☐");
|
||||
lvi.SubItems.Add(mark);
|
||||
listView_Favorites.Items.Add(lvi);
|
||||
|
||||
// Aus Likes raus
|
||||
@ -7173,11 +7199,11 @@ namespace WinFormsApp1
|
||||
}
|
||||
}
|
||||
|
||||
if (isFavoritedItem(modelname))
|
||||
if (isFavoritedItem(modelname) && favoriteCheckRunning)
|
||||
{
|
||||
this.BeginInvoke(new MethodInvoker(() => label_checkFavoritesStatus.Text = itemToCheck.Index + 1 + " / " + listView_Favorites.Items.Count));
|
||||
}
|
||||
else if (isLikedItem(modelname))
|
||||
else if (isLikedItem(modelname) && likesCheckRunning)
|
||||
{
|
||||
this.BeginInvoke(new MethodInvoker(() => label_checkLikesStatus.Text = itemToCheck.Index + 1 + " / " + listView_Likes.Items.Count));
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>True|2025-10-24T10:49:33.3476720Z||;True|2025-10-24T12:45:56.3409114+02:00||;True|2025-10-24T12:37:06.7053780+02:00||;True|2025-10-24T12:21:52.0779529+02:00||;True|2025-10-24T11:39:34.0711190+02:00||;True|2025-10-24T11:32:06.8084304+02:00||;True|2025-10-24T10:49:19.8451151+02:00||;True|2025-10-24T10:35:58.7368296+02:00||;True|2025-09-22T09:12:21.1738434+02:00||;True|2025-09-22T08:41:28.2063145+02:00||;True|2025-09-11T09:25:26.7487573+02:00||;True|2025-09-05T10:35:16.3265491+02:00||;True|2025-08-13T07:12:45.6489499+02:00||;True|2025-08-08T07:25:38.8935816+02:00||;True|2025-08-08T07:19:07.3835648+02:00||;True|2025-08-06T07:38:46.3420158+02:00||;True|2025-07-16T07:41:34.3557961+02:00||;True|2025-07-15T11:01:48.5566218+02:00||;True|2025-07-07T14:59:37.1240379+02:00||;False|2025-07-07T14:57:39.0613209+02:00||;True|2025-07-07T06:29:53.8853096+02:00||;True|2025-07-06T23:39:21.1017631+02:00||;True|2025-07-06T23:24:37.7792733+02:00||;False|2025-07-06T23:19:52.7135594+02:00||;True|2025-07-06T05:55:51.5281444+02:00||;True|2025-07-06T05:14:26.6590895+02:00||;True|2025-07-06T05:07:43.4335057+02:00||;False|2025-07-06T05:06:42.5442365+02:00||;True|2025-06-27T09:56:34.6625992+02:00||;True|2025-06-27T09:55:33.6399545+02:00||;True|2025-06-27T09:35:44.7409289+02:00||;True|2025-06-27T09:35:11.7955472+02:00||;True|2025-06-27T09:23:44.1433728+02:00||;True|2025-06-27T09:10:34.1084041+02:00||;True|2025-06-27T09:06:49.8646149+02:00||;True|2025-06-27T08:55:00.3110860+02:00||;True|2025-06-27T08:47:18.4476580+02:00||;True|2025-06-11T14:42:56.1622930+02:00||;True|2025-06-11T12:33:26.7419370+02:00||;True|2025-06-11T07:48:58.3963584+02:00||;True|2025-06-11T07:42:53.0277862+02:00||;False|2025-06-11T07:39:31.7470335+02:00||;True|2025-06-03T19:58:59.1868907+02:00||;True|2025-06-03T14:33:55.4389500+02:00||;True|2025-06-03T14:16:34.6963918+02:00||;True|2025-06-03T13:26:58.4834917+02:00||;True|2025-06-02T19:01:22.1305699+02:00||;True|2025-06-02T18:27:48.1629252+02:00||;True|2025-06-02T18:12:01.0339452+02:00||;True|2025-04-25T14:02:07.8958669+02:00||;True|2025-04-24T07:32:32.3215936+02:00||;True|2025-04-23T14:24:27.8051379+02:00||;True|2025-04-22T07:23:33.4961515+02:00||;True|2025-04-22T07:16:30.0019927+02:00||;True|2025-04-17T07:35:19.5003910+02:00||;True|2025-04-16T07:51:44.2105982+02:00||;True|2025-04-15T17:39:22.9354819+02:00||;True|2025-04-15T13:59:38.1491035+02:00||;True|2025-04-15T13:26:09.1911007+02:00||;False|2025-04-15T13:24:05.8283613+02:00||;True|2025-04-15T12:05:53.7928484+02:00||;True|2025-04-14T11:46:19.0213400+02:00||;True|2025-04-14T11:19:57.9110025+02:00||;False|2025-04-14T11:18:49.2970157+02:00||;True|2025-04-14T10:56:19.4313583+02:00||;True|2025-04-14T10:09:57.0472222+02:00||;True|2025-04-11T09:36:58.9281719+02:00||;True|2025-04-11T07:56:15.1143584+02:00||;True|2025-04-10T08:08:20.7849097+02:00||;True|2025-04-09T12:56:06.8510589+02:00||;True|2025-04-09T12:39:21.5101756+02:00||;True|2025-04-09T12:35:02.6306664+02:00||;True|2025-04-09T07:53:00.7307516+02:00||;True|2025-04-07T15:17:24.3233000+02:00||;True|2025-04-04T18:09:18.8844877+02:00||;True|2025-04-03T12:27:18.9922316+02:00||;True|2025-04-03T09:48:50.2518754+02:00||;True|2025-03-31T13:53:07.3910797+02:00||;True|2025-03-31T12:46:18.3638787+02:00||;True|2025-03-31T11:01:06.0182900+02:00||;True|2025-03-31T10:55:30.7399322+02:00||;True|2025-03-31T10:41:08.8975919+02:00||;True|2025-03-31T10:15:29.6315309+02:00||;True|2025-03-31T08:53:20.4511304+02:00||;True|2025-03-29T14:23:34.4407251+01:00||;True|2025-03-29T13:42:06.7348581+01:00||;True|2025-03-28T18:06:37.5932036+01:00||;True|2025-03-27T13:26:13.4721799+01:00||;True|2025-03-27T11:19:53.3525657+01:00||;True|2025-03-27T10:09:53.9177515+01:00||;True|2025-03-27T07:56:40.2542279+01:00||;True|2025-03-26T16:58:27.4112741+01:00||;True|2025-03-26T15:03:46.9772542+01:00||;True|2025-03-25T11:14:58.7342381+01:00||;True|2025-03-25T09:57:45.7084482+01:00||;True|2025-03-25T07:43:59.3237279+01:00||;True|2025-03-24T14:10:05.5099691+01:00||;True|2025-03-24T13:48:18.7826715+01:00||;True|2025-03-24T08:45:04.4414362+01:00||;True|2025-03-24T08:09:16.9512603+01:00||;</History>
|
||||
<History>True|2025-11-07T06:27:09.2818809Z||;True|2025-10-28T07:54:43.4835993+01:00||;True|2025-10-28T07:49:48.9691140+01:00||;False|2025-10-28T07:48:40.9934972+01:00||;True|2025-10-28T07:41:40.9364570+01:00||;True|2025-10-28T07:34:30.3216200+01:00||;True|2025-10-27T07:38:02.5307378+01:00||;True|2025-10-24T12:49:33.3476720+02:00||;True|2025-10-24T12:45:56.3409114+02:00||;True|2025-10-24T12:37:06.7053780+02:00||;True|2025-10-24T12:21:52.0779529+02:00||;True|2025-10-24T11:39:34.0711190+02:00||;True|2025-10-24T11:32:06.8084304+02:00||;True|2025-10-24T10:49:19.8451151+02:00||;True|2025-10-24T10:35:58.7368296+02:00||;True|2025-09-22T09:12:21.1738434+02:00||;True|2025-09-22T08:41:28.2063145+02:00||;True|2025-09-11T09:25:26.7487573+02:00||;True|2025-09-05T10:35:16.3265491+02:00||;True|2025-08-13T07:12:45.6489499+02:00||;True|2025-08-08T07:25:38.8935816+02:00||;True|2025-08-08T07:19:07.3835648+02:00||;True|2025-08-06T07:38:46.3420158+02:00||;True|2025-07-16T07:41:34.3557961+02:00||;True|2025-07-15T11:01:48.5566218+02:00||;True|2025-07-07T14:59:37.1240379+02:00||;False|2025-07-07T14:57:39.0613209+02:00||;True|2025-07-07T06:29:53.8853096+02:00||;True|2025-07-06T23:39:21.1017631+02:00||;True|2025-07-06T23:24:37.7792733+02:00||;False|2025-07-06T23:19:52.7135594+02:00||;True|2025-07-06T05:55:51.5281444+02:00||;True|2025-07-06T05:14:26.6590895+02:00||;True|2025-07-06T05:07:43.4335057+02:00||;False|2025-07-06T05:06:42.5442365+02:00||;True|2025-06-27T09:56:34.6625992+02:00||;True|2025-06-27T09:55:33.6399545+02:00||;True|2025-06-27T09:35:44.7409289+02:00||;True|2025-06-27T09:35:11.7955472+02:00||;True|2025-06-27T09:23:44.1433728+02:00||;True|2025-06-27T09:10:34.1084041+02:00||;True|2025-06-27T09:06:49.8646149+02:00||;True|2025-06-27T08:55:00.3110860+02:00||;True|2025-06-27T08:47:18.4476580+02:00||;True|2025-06-11T14:42:56.1622930+02:00||;True|2025-06-11T12:33:26.7419370+02:00||;True|2025-06-11T07:48:58.3963584+02:00||;True|2025-06-11T07:42:53.0277862+02:00||;False|2025-06-11T07:39:31.7470335+02:00||;True|2025-06-03T19:58:59.1868907+02:00||;True|2025-06-03T14:33:55.4389500+02:00||;True|2025-06-03T14:16:34.6963918+02:00||;True|2025-06-03T13:26:58.4834917+02:00||;True|2025-06-02T19:01:22.1305699+02:00||;True|2025-06-02T18:27:48.1629252+02:00||;True|2025-06-02T18:12:01.0339452+02:00||;True|2025-04-25T14:02:07.8958669+02:00||;True|2025-04-24T07:32:32.3215936+02:00||;True|2025-04-23T14:24:27.8051379+02:00||;True|2025-04-22T07:23:33.4961515+02:00||;True|2025-04-22T07:16:30.0019927+02:00||;True|2025-04-17T07:35:19.5003910+02:00||;True|2025-04-16T07:51:44.2105982+02:00||;True|2025-04-15T17:39:22.9354819+02:00||;True|2025-04-15T13:59:38.1491035+02:00||;True|2025-04-15T13:26:09.1911007+02:00||;False|2025-04-15T13:24:05.8283613+02:00||;True|2025-04-15T12:05:53.7928484+02:00||;True|2025-04-14T11:46:19.0213400+02:00||;True|2025-04-14T11:19:57.9110025+02:00||;False|2025-04-14T11:18:49.2970157+02:00||;True|2025-04-14T10:56:19.4313583+02:00||;True|2025-04-14T10:09:57.0472222+02:00||;True|2025-04-11T09:36:58.9281719+02:00||;True|2025-04-11T07:56:15.1143584+02:00||;True|2025-04-10T08:08:20.7849097+02:00||;True|2025-04-09T12:56:06.8510589+02:00||;True|2025-04-09T12:39:21.5101756+02:00||;True|2025-04-09T12:35:02.6306664+02:00||;True|2025-04-09T07:53:00.7307516+02:00||;True|2025-04-07T15:17:24.3233000+02:00||;True|2025-04-04T18:09:18.8844877+02:00||;True|2025-04-03T12:27:18.9922316+02:00||;True|2025-04-03T09:48:50.2518754+02:00||;True|2025-03-31T13:53:07.3910797+02:00||;True|2025-03-31T12:46:18.3638787+02:00||;True|2025-03-31T11:01:06.0182900+02:00||;True|2025-03-31T10:55:30.7399322+02:00||;True|2025-03-31T10:41:08.8975919+02:00||;True|2025-03-31T10:15:29.6315309+02:00||;True|2025-03-31T08:53:20.4511304+02:00||;True|2025-03-29T14:23:34.4407251+01:00||;True|2025-03-29T13:42:06.7348581+01:00||;True|2025-03-28T18:06:37.5932036+01:00||;True|2025-03-27T13:26:13.4721799+01:00||;True|2025-03-27T11:19:53.3525657+01:00||;True|2025-03-27T10:09:53.9177515+01:00||;True|2025-03-27T07:56:40.2542279+01:00||;True|2025-03-26T16:58:27.4112741+01:00||;True|2025-03-26T15:03:46.9772542+01:00||;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -1,9 +1,10 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -13,12 +14,12 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+16a186c861d0d320ef3678e21094f715761e7854")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cb768902db892aec7d2121d17113b796d46be334")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows10.0.19041.0")]
|
||||
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows10.0.19041.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
// Von der MSBuild WriteCodeFragment-Klasse generiert.
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+16a186c861d0d320ef3678e21094f715761e7854")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cb768902db892aec7d2121d17113b796d46be334")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+16a186c861d0d320ef3678e21094f715761e7854")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cb768902db892aec7d2121d17113b796d46be334")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("WinFormsApp1")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user