🚸 Include screening times and links in Movie.toString()
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 9 Feb 2024 22:01:51 +0000 (23:01 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 9 Feb 2024 22:02:09 +0000 (23:02 +0100)
src/main/java/net/pterodactylus/rhynodge/filters/webpages/savoy/Movie.java

index e3b8844..562c392 100644 (file)
@@ -6,6 +6,7 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 import java.util.function.Predicate;
+import java.util.stream.Collectors;
 
 /**
  * Information about a movie.
@@ -38,7 +39,7 @@ public class Movie {
 
        @Override
        public String toString() {
-               return format("%s (%d)", name, ticketLinks.size());
+               return format("%s (%s)", name, ticketLinks.stream().map(link -> String.format("%s: %s", link.getPresentationTime(), link.getLink())).collect(Collectors.joining(", ")));
        }
 
 }