mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-04 09:54:16 +02:00
ToString overrides
This commit is contained in:
@ -10,8 +10,5 @@ public class MangaTag(string tag)
|
|||||||
[Required]
|
[Required]
|
||||||
public string Tag { get; init; } = tag;
|
public string Tag { get; init; } = tag;
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString() => Tag;
|
||||||
{
|
|
||||||
return $"{Tag}";
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -45,7 +45,7 @@ public class Notification : Identifiable
|
|||||||
this.IsSent = isSent;
|
this.IsSent = isSent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString() => $"{base.ToString()} {Urgency} {Title}";
|
public override string ToString() => $"{base.ToString()} {Urgency} {Title} {Message}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum NotificationUrgency : byte
|
public enum NotificationUrgency : byte
|
||||||
|
@ -79,4 +79,6 @@ public class NotificationConnector(string name, string url, Dictionary<string, s
|
|||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{GetType().Name} {Name}";
|
||||||
}
|
}
|
@ -35,4 +35,6 @@ public abstract class TrangaBaseContext<T> : DbContext where T : DbContext
|
|||||||
return (false, e.Message);
|
return (false, e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{GetType().Name} {typeof(T).Name}";
|
||||||
}
|
}
|
@ -172,10 +172,12 @@ public class DownloadChapterFromMangaconnectorWorker(MangaConnectorId<Chapter> c
|
|||||||
if (requestResult.result == Stream.Null)
|
if (requestResult.result == Stream.Null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
FileStream fs = new (savePath, FileMode.Create, FileAccess.Write, FileShare.None);
|
FileStream fs = new(savePath, FileMode.Create, FileAccess.Write, FileShare.None);
|
||||||
requestResult.result.CopyTo(fs);
|
requestResult.result.CopyTo(fs);
|
||||||
fs.Close();
|
fs.Close();
|
||||||
ProcessImage(savePath);
|
ProcessImage(savePath);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{base.ToString()} {MangaConnectorId}";
|
||||||
}
|
}
|
@ -17,4 +17,6 @@ public class DownloadCoverFromMangaconnectorWorker(MangaConnectorId<Manga> mcId,
|
|||||||
DbContext.Sync();
|
DbContext.Sync();
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{base.ToString()} {MangaConnectorId}";
|
||||||
}
|
}
|
@ -28,4 +28,6 @@ public class RetrieveMangaChaptersFromMangaconnectorWorker(MangaConnectorId<Mang
|
|||||||
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{base.ToString()} {MangaConnectorId}";
|
||||||
}
|
}
|
@ -44,4 +44,6 @@ public class MoveFileOrFolderWorker(string toLocation, string fromLocation, IEnu
|
|||||||
{
|
{
|
||||||
File.Move(from.FullName, toLocation);
|
File.Move(from.FullName, toLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{base.ToString()} {FromLocation} {ToLocation}";
|
||||||
}
|
}
|
@ -15,4 +15,6 @@ public class MoveMangaLibraryWorker(Manga manga, FileLibrary toLibrary, IService
|
|||||||
|
|
||||||
return manga.Chapters.Select(c => new MoveFileOrFolderWorker(c.FullArchiveFilePath, oldPath[c])).ToArray<BaseWorker>();
|
return manga.Chapters.Select(c => new MoveFileOrFolderWorker(c.FullArchiveFilePath, oldPath[c])).ToArray<BaseWorker>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{base.ToString()} {manga} {toLibrary}";
|
||||||
}
|
}
|
@ -16,4 +16,6 @@ public class UpdateChaptersDownloadedWorker(Manga manga, TimeSpan? interval = nu
|
|||||||
DbContext.Sync();
|
DbContext.Sync();
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString() => $"{base.ToString()} {manga}";
|
||||||
}
|
}
|
Reference in New Issue
Block a user