Search in sources :

Example 1 with Timeline

use of de.danoeh.antennapod.core.util.playback.Timeline in project AntennaPod by AntennaPod.

the class TimelineTest method testProcessShownotesAddTimecodeHHMMNoChapters.

public void testProcessShownotesAddTimecodeHHMMNoChapters() throws Exception {
    final String timeStr = "10:11";
    final long time = 3600 * 1000 * 10 + 60 * 1000 * 11;
    Playable p = newTestPlayable(null, "<p> Some test text with a timecode " + timeStr + " here.</p>");
    Timeline t = new Timeline(context, p);
    String res = t.processShownotes(true);
    checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
Also used : Timeline(de.danoeh.antennapod.core.util.playback.Timeline) Playable(de.danoeh.antennapod.core.util.playback.Playable)

Example 2 with Timeline

use of de.danoeh.antennapod.core.util.playback.Timeline in project AntennaPod by AntennaPod.

the class TimelineTest method testProcessShownotesAddTimecodeAngleBrackets.

public void testProcessShownotesAddTimecodeAngleBrackets() throws Exception {
    final String timeStr = "10:11";
    final long time = 3600 * 1000 * 10 + 60 * 1000 * 11;
    Playable p = newTestPlayable(null, "<p> Some test text with a timecode <" + timeStr + "> here.</p>");
    Timeline t = new Timeline(context, p);
    String res = t.processShownotes(true);
    checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
Also used : Timeline(de.danoeh.antennapod.core.util.playback.Timeline) Playable(de.danoeh.antennapod.core.util.playback.Playable)

Example 3 with Timeline

use of de.danoeh.antennapod.core.util.playback.Timeline in project AntennaPod by AntennaPod.

the class TimelineTest method testProcessShownotesAddTimecodeBrackets.

public void testProcessShownotesAddTimecodeBrackets() throws Exception {
    final String timeStr = "10:11";
    final long time = 3600 * 1000 * 10 + 60 * 1000 * 11;
    Playable p = newTestPlayable(null, "<p> Some test text with a timecode [" + timeStr + "] here.</p>");
    Timeline t = new Timeline(context, p);
    String res = t.processShownotes(true);
    checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
Also used : Timeline(de.danoeh.antennapod.core.util.playback.Timeline) Playable(de.danoeh.antennapod.core.util.playback.Playable)

Example 4 with Timeline

use of de.danoeh.antennapod.core.util.playback.Timeline in project AntennaPod by AntennaPod.

the class TimelineTest method testProcessShownotesAddTimecodeParentheses.

public void testProcessShownotesAddTimecodeParentheses() throws Exception {
    final String timeStr = "10:11";
    final long time = 3600 * 1000 * 10 + 60 * 1000 * 11;
    Playable p = newTestPlayable(null, "<p> Some test text with a timecode (" + timeStr + ") here.</p>");
    Timeline t = new Timeline(context, p);
    String res = t.processShownotes(true);
    checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
Also used : Timeline(de.danoeh.antennapod.core.util.playback.Timeline) Playable(de.danoeh.antennapod.core.util.playback.Playable)

Example 5 with Timeline

use of de.danoeh.antennapod.core.util.playback.Timeline in project AntennaPod by AntennaPod.

the class TimelineTest method testProcessShownotesAddTimecodeHHMMSSNoChapters.

public void testProcessShownotesAddTimecodeHHMMSSNoChapters() throws Exception {
    final String timeStr = "10:11:12";
    final long time = 3600 * 1000 * 10 + 60 * 1000 * 11 + 12 * 1000;
    Playable p = newTestPlayable(null, "<p> Some test text with a timecode " + timeStr + " here.</p>");
    Timeline t = new Timeline(context, p);
    String res = t.processShownotes(true);
    checkLinkCorrect(res, new long[] { time }, new String[] { timeStr });
}
Also used : Timeline(de.danoeh.antennapod.core.util.playback.Timeline) Playable(de.danoeh.antennapod.core.util.playback.Playable)

Aggregations

Timeline (de.danoeh.antennapod.core.util.playback.Timeline)6 Playable (de.danoeh.antennapod.core.util.playback.Playable)5 FeedItem (de.danoeh.antennapod.core.feed.FeedItem)1