mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2025-12-30 18:30:47 -06:00
Add some docs
This commit is contained in:
@@ -5,12 +5,27 @@ import { QueuingType } from "../enums/queuing-type";
|
||||
import { getImageApi } from "@jellyfin/sdk/lib/utils/api";
|
||||
import Client from "../api/client";
|
||||
import { isUndefined } from "lodash";
|
||||
import { runOnRuntime } from "react-native-reanimated";
|
||||
import { backgroundRuntime } from "../App";
|
||||
|
||||
// TODO: Make this configurable
|
||||
/**
|
||||
* The container that the Jellyfin server will attempt to transcode to
|
||||
*
|
||||
* This is set to `ts` (MPEG-TS), as that is what HLS relies upon
|
||||
*
|
||||
* Finamp and Jellyfin Web also have this set to `ts`
|
||||
* @see https://jmshrv.com/posts/jellyfin-api/#playback-in-the-case-of-music
|
||||
*/
|
||||
const transcodingContainer = "ts";
|
||||
|
||||
/**
|
||||
* A mapper function that can be used to get a RNTP `Track` compliant object
|
||||
* from a Jellyfin server `BaseItemDto`. Applies a queuing type to the track
|
||||
* object so that it can be referenced later on for determining where to place
|
||||
* the track in the queue
|
||||
*
|
||||
* @param item The `BaseItemDto` of the track
|
||||
* @param queuingType The type of queuing we are performing
|
||||
* @returns A `JellifyTrack`, which represents a Jellyfin library track queued in the player
|
||||
*/
|
||||
export function mapDtoToTrack(item: BaseItemDto, queuingType?: QueuingType) : JellifyTrack {
|
||||
const urlParams = {
|
||||
"Container": item.Container!,
|
||||
|
||||
Reference in New Issue
Block a user