read_series: Read series subtitles

read_subtitles_seasonR Documentation

Read series subtitles

Description

These functions read one or several subtitles files organized in directories. They are designed to import subtitles of series with multiple episodes.

Usage

read_subtitles_season(
  dir,
  format = "auto",
  bind = TRUE,
  detect.meta = TRUE,
  quietly = FALSE,
  ...
)

read_subtitles_serie(
  dir,
  format = "auto",
  bind = TRUE,
  detect.meta = TRUE,
  quietly = FALSE,
  ...
)

read_subtitles_multiseries(
  dir,
  format = "auto",
  bind = TRUE,
  detect.meta = TRUE,
  quietly = FALSE,
  ...
)

Arguments

dir

the name of the directory which the subtitles are to be read from (see Details).

format

a character string specifying the format of the subtitles (default is "auto", see read_subtitles for details).

bind

a logical. If TRUE (default), subtitles are bound with bind_subtitles

detect.meta

a logical. If TRUE (default), the function tries to automatically detect metadata (Serie, Season and Episode) from file names. This will override user metadata with the same name.

quietly

a logical. If FALSE (default), a message indicating the number of imported files is printed.

...

further arguments to be passed to read_subtitles.

Details

These functions read subtitles files at different levels from a 3-levels directory (see the tree below). The function read_subtitles_multiseries reads everything recursively from "Series_Collection". The function read_subtitles_serie reads everything recursively from a serie folder (e.g. "Serie_A"). The function read_subtitles_season reads everything from a season folder (e.g. "Season_1"). To read a specific episode file (e.g. "Episode_1.srt), use read_subtitles.

Series_Collection
|-- Serie_A
|   |-- Season_1
|   |   |-- Episode_1.srt
|-- Serie_B
|   |-- Season_1
|   |   |-- Episode_1.srt
|   |-- Season_2
|   |   |-- Episode_1.srt
|   |   |-- Episode_2.srt

Value

If bind is set on TRUE a subtitles object, otherwise an object of class multisubtitles; i.e. a list of subtitles objects.


subtools documentation built on March 24, 2026, 5:07 p.m.