public static int durationStringShortToMs(String input, boolean durationIsInHours) {
        String[] parts = input.split(":");
        if (parts.length != 2) {
            return 0;
        }

        int modifier = durationIsInHours ? 60 : 1;

        return Integer.parseInt(parts[0]) * 60 * 1000 * modifier
                + Integer.parseInt(parts[1]) * 1000 * modifier;
    }
@Test
    public void testDurationStringShortToMs() {
        String input = "8:30";
        assertEquals(30600000, Converter.durationStringShortToMs(input, true));
        assertEquals(510000, Converter.durationStringShortToMs(input, false));
    }