mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
first commit
This commit is contained in:
310
utils/device-profiles.ts
Normal file
310
utils/device-profiles.ts
Normal file
@@ -0,0 +1,310 @@
|
||||
import { DeviceProfile } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
|
||||
const MediaTypes = {
|
||||
Audio: "Audio",
|
||||
Video: "Video",
|
||||
Photo: "Photo",
|
||||
Book: "Book",
|
||||
};
|
||||
|
||||
export const iPhone15Profile: DeviceProfile = {
|
||||
Name: "iPhone 15",
|
||||
Id: "iphone15-001",
|
||||
MaxStreamingBitrate: 5000000, // 5 Mbps
|
||||
MaxStaticBitrate: 10000000, // 10 Mbps
|
||||
MusicStreamingTranscodingBitrate: 320000, // 320 kbps
|
||||
MaxStaticMusicBitrate: 1411200, // CD Quality at 1,411.2 kbps
|
||||
DirectPlayProfiles: [
|
||||
{
|
||||
Container: "mp4",
|
||||
VideoCodec: "h264",
|
||||
AudioCodec: "aac",
|
||||
},
|
||||
],
|
||||
TranscodingProfiles: [
|
||||
{
|
||||
Container: "hls",
|
||||
Type: "Video",
|
||||
VideoCodec: "h265",
|
||||
Context: "Streaming",
|
||||
},
|
||||
],
|
||||
ContainerProfiles: [
|
||||
{
|
||||
Type: "Video",
|
||||
Container: "mp4",
|
||||
},
|
||||
{
|
||||
Type: "Video",
|
||||
Container: "mov",
|
||||
},
|
||||
],
|
||||
CodecProfiles: [
|
||||
{
|
||||
Type: "Video",
|
||||
Codec: "h264",
|
||||
Conditions: [
|
||||
{
|
||||
Condition: "LessThanEqual",
|
||||
Property: "VideoBitDepth",
|
||||
Value: "10",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
Type: "Video",
|
||||
Codec: "h265",
|
||||
Conditions: [
|
||||
{
|
||||
Condition: "LessThanEqual",
|
||||
Property: "VideoBitDepth",
|
||||
Value: "10",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
Type: "Audio",
|
||||
Codec: "aac",
|
||||
Conditions: [
|
||||
{
|
||||
Condition: "GreaterThanEqual",
|
||||
Property: "AudioChannels",
|
||||
Value: "2",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
SubtitleProfiles: [
|
||||
{
|
||||
Format: "srt",
|
||||
Method: "External",
|
||||
},
|
||||
{
|
||||
Format: "vtt",
|
||||
Method: "External",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const BaseProfile = {
|
||||
Name: "Expo Base Video Profile",
|
||||
MaxStaticBitrate: 100000000,
|
||||
MaxStreamingBitrate: 120000000,
|
||||
MusicStreamingTranscodingBitrate: 384000,
|
||||
CodecProfiles: [
|
||||
{
|
||||
Codec: "h264",
|
||||
Conditions: [
|
||||
{
|
||||
Condition: "NotEquals",
|
||||
IsRequired: false,
|
||||
Property: "IsAnamorphic",
|
||||
Value: "true",
|
||||
},
|
||||
{
|
||||
Condition: "EqualsAny",
|
||||
IsRequired: false,
|
||||
Property: "VideoProfile",
|
||||
Value: "high|main|baseline|constrained baseline",
|
||||
},
|
||||
{
|
||||
Condition: "LessThanEqual",
|
||||
IsRequired: false,
|
||||
Property: "VideoLevel",
|
||||
Value: "51",
|
||||
},
|
||||
{
|
||||
Condition: "NotEquals",
|
||||
IsRequired: false,
|
||||
Property: "IsInterlaced",
|
||||
Value: "true",
|
||||
},
|
||||
],
|
||||
Type: MediaTypes.Video,
|
||||
},
|
||||
{
|
||||
Codec: "hevc",
|
||||
Conditions: [
|
||||
{
|
||||
Condition: "NotEquals",
|
||||
IsRequired: false,
|
||||
Property: "IsAnamorphic",
|
||||
Value: "true",
|
||||
},
|
||||
{
|
||||
Condition: "EqualsAny",
|
||||
IsRequired: false,
|
||||
Property: "VideoProfile",
|
||||
Value: "main|main 10",
|
||||
},
|
||||
{
|
||||
Condition: "LessThanEqual",
|
||||
IsRequired: false,
|
||||
Property: "VideoLevel",
|
||||
Value: "183",
|
||||
},
|
||||
{
|
||||
Condition: "NotEquals",
|
||||
IsRequired: false,
|
||||
Property: "IsInterlaced",
|
||||
Value: "true",
|
||||
},
|
||||
],
|
||||
Type: MediaTypes.Video,
|
||||
},
|
||||
],
|
||||
ContainerProfiles: [],
|
||||
DirectPlayProfiles: [],
|
||||
ResponseProfiles: [
|
||||
{
|
||||
Container: "m4v",
|
||||
MimeType: "video/mp4",
|
||||
Type: MediaTypes.Video,
|
||||
},
|
||||
],
|
||||
SubtitleProfiles: [
|
||||
{
|
||||
Format: "vtt",
|
||||
Method: "Hls",
|
||||
},
|
||||
],
|
||||
TranscodingProfiles: [],
|
||||
};
|
||||
|
||||
export const iosProfile = {
|
||||
...BaseProfile,
|
||||
Name: "Expo iOS Video Profile",
|
||||
DirectPlayProfiles: [
|
||||
{
|
||||
AudioCodec: "aac,mp3,ac3,eac3,flac,alac",
|
||||
Container: "mp4,m4v",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "hevc,h264",
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac,mp3,ac3,eac3,flac,alac",
|
||||
Container: "mov",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "hevc,h264",
|
||||
},
|
||||
{
|
||||
Container: "mp3",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
Container: "aac",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
Container: "m4a",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
Container: "m4b",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
Container: "flac",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
Container: "alac",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "alac",
|
||||
Container: "m4a",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "alac",
|
||||
Container: "m4b",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
Container: "wav",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
],
|
||||
TranscodingProfiles: [
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
BreakOnNonKeyFrames: true,
|
||||
Container: "aac",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
MinSegments: "2",
|
||||
Protocol: "hls",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
Container: "aac",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "mp3",
|
||||
Container: "mp3",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "wav",
|
||||
Container: "wav",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "mp3",
|
||||
Container: "mp3",
|
||||
Context: "Static",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
Container: "aac",
|
||||
Context: "Static",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "wav",
|
||||
Container: "wav",
|
||||
Context: "Static",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac,mp3",
|
||||
BreakOnNonKeyFrames: true,
|
||||
Container: "ts",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
MinSegments: "2",
|
||||
Protocol: "hls",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "h264",
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac,mp3,ac3,eac3,flac,alac",
|
||||
Container: "mp4",
|
||||
Context: "Static",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "h264",
|
||||
},
|
||||
],
|
||||
};
|
||||
356
utils/jellyfin.ts
Normal file
356
utils/jellyfin.ts
Normal file
@@ -0,0 +1,356 @@
|
||||
import { Api } from "@jellyfin/sdk";
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import {
|
||||
getMediaInfoApi,
|
||||
getUserLibraryApi,
|
||||
getPlaystateApi,
|
||||
} from "@jellyfin/sdk/lib/utils/api";
|
||||
import { iosProfile } from "./device-profiles";
|
||||
|
||||
export const reportPlaybackProgress = async ({
|
||||
api,
|
||||
sessionId,
|
||||
itemId,
|
||||
positionTicks,
|
||||
}: {
|
||||
api: Api | null | undefined;
|
||||
sessionId: string | null | undefined;
|
||||
itemId: string | null | undefined;
|
||||
positionTicks: number | null | undefined;
|
||||
}) => {
|
||||
if (!api || !sessionId || !itemId || !positionTicks) {
|
||||
console.log("Missing required parameters", {
|
||||
api,
|
||||
sessionId,
|
||||
itemId,
|
||||
positionTicks,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await api.axiosInstance.post(
|
||||
`${api.basePath}/Sessions/Playing/Progress`,
|
||||
{
|
||||
ItemId: itemId,
|
||||
PlaySessionId: sessionId,
|
||||
IsPaused: false,
|
||||
PositionTicks: Math.round(positionTicks),
|
||||
CanSeek: true,
|
||||
MediaSourceId: itemId,
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
Authorization: `MediaBrowser DeviceId="${api.deviceInfo.id}", Token="${api.accessToken}"`,
|
||||
},
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("Failed to report playback progress", error);
|
||||
if (error.response) {
|
||||
console.error("Error data:", error.response.data);
|
||||
console.error("Error status:", error.response.status);
|
||||
console.error("Error headers:", error.response.headers);
|
||||
} else if (error.request) {
|
||||
console.error("No response received:", error.request);
|
||||
} else {
|
||||
console.error("Error message:", error.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Fetches the media info for a given item.
|
||||
*
|
||||
* @param {Api} api - The Jellyfin API instance.
|
||||
* @param {string} itemId - The ID of the media to fetch info for.
|
||||
* @param {string} userId - The ID of the user to fetch info for.
|
||||
*
|
||||
* @returns {Promise<BaseItemDto>} - The media info.
|
||||
*/
|
||||
export const getUserItemData = async ({
|
||||
api,
|
||||
itemId,
|
||||
userId,
|
||||
}: {
|
||||
api: Api | null | undefined;
|
||||
itemId: string | null | undefined;
|
||||
userId: string | null | undefined;
|
||||
}) => {
|
||||
if (!api || !itemId || !userId) {
|
||||
return null;
|
||||
}
|
||||
return (await getUserLibraryApi(api).getItem({ itemId, userId })).data;
|
||||
};
|
||||
|
||||
export const getPlaybackInfo = async (
|
||||
api?: Api | null | undefined,
|
||||
itemId?: string | null | undefined,
|
||||
userId?: string | null | undefined
|
||||
) => {
|
||||
if (!api || !itemId || !userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const a = await getMediaInfoApi(api).getPlaybackInfo({
|
||||
itemId,
|
||||
userId,
|
||||
});
|
||||
|
||||
return a.data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the playback URL for the given item ID and user ID.
|
||||
*
|
||||
* @param api - The Jellyfin API instance.
|
||||
* @param itemId - The ID of the media item to retrieve playback URL for.
|
||||
* @param userId - The ID of the user requesting the playback URL.
|
||||
* @returns The playback URL as a string.
|
||||
*/
|
||||
export const getPlaybackUrl = async (
|
||||
api: Api,
|
||||
itemId: string,
|
||||
userId: string
|
||||
): Promise<string> => {
|
||||
const playbackData = await getMediaInfoApi(api).getPlaybackInfo({
|
||||
itemId,
|
||||
userId,
|
||||
});
|
||||
|
||||
const mediaSources = playbackData.data?.MediaSources;
|
||||
if (!mediaSources || mediaSources.length === 0) {
|
||||
throw new Error(
|
||||
"No media sources available for the requested item and user."
|
||||
);
|
||||
}
|
||||
|
||||
const mediaSource = mediaSources[0];
|
||||
const transcodeUrl = mediaSource.TranscodingUrl;
|
||||
if (transcodeUrl) {
|
||||
return transcodeUrl;
|
||||
}
|
||||
|
||||
// Construct a fallback URL if the TranscodingUrl is not available
|
||||
const { Id, ETag } = mediaSource;
|
||||
if (!Id) {
|
||||
throw new Error("Media source ID is missing.");
|
||||
}
|
||||
|
||||
const queryParams = new URLSearchParams({
|
||||
videoBitRate: "4000",
|
||||
videoCodec: "h264",
|
||||
audioCodec: "aac",
|
||||
container: "mp4",
|
||||
SegmentContainer: "mp4",
|
||||
deviceId: api.deviceInfo?.id || "",
|
||||
api_key: api.accessToken || "",
|
||||
Tag: ETag || "",
|
||||
MediaSourceId: Id || "",
|
||||
});
|
||||
|
||||
return `/Videos/${Id}/stream?${queryParams}`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves an item by its ID from the API.
|
||||
*
|
||||
* @param api - The Jellyfin API instance.
|
||||
* @param itemId - The ID of the item to retrieve.
|
||||
* @returns The item object or undefined if no item matches the ID.
|
||||
*/
|
||||
export const getItemById = async (
|
||||
api?: Api | null | undefined,
|
||||
itemId?: string | null | undefined
|
||||
): Promise<BaseItemDto | undefined> => {
|
||||
if (!api || !itemId) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
try {
|
||||
const itemData = await getUserLibraryApi(api).getItem({ itemId });
|
||||
|
||||
const item = itemData.data;
|
||||
if (!item) {
|
||||
console.error("No items found with the specified ID:", itemId);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return item;
|
||||
} catch (error) {
|
||||
console.error("Failed to retrieve the item:", error);
|
||||
throw new Error(`Failed to retrieve the item due to an error: ${error}`);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves a stream URL for the given item ID and user ID.
|
||||
*
|
||||
* @param api - The Jellyfin API instance.
|
||||
* @param itemId - The ID of the media item to retrieve the stream URL for.
|
||||
* @param userId - The ID of the user requesting the stream URL.
|
||||
*/
|
||||
export const getStreamUrl = async ({
|
||||
api,
|
||||
item,
|
||||
userId,
|
||||
startTimeTicks = 0,
|
||||
maxStreamingBitrate = 140000000,
|
||||
}: {
|
||||
api: Api | null | undefined;
|
||||
item: BaseItemDto | null | undefined;
|
||||
userId: string | null | undefined;
|
||||
startTimeTicks: number;
|
||||
maxStreamingBitrate?: number;
|
||||
}) => {
|
||||
if (!api || !userId || !item?.Id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const itemId = item.Id;
|
||||
let url: string = "";
|
||||
|
||||
console.info(
|
||||
`Retrieving stream URL for item ID: ${item.Id} with start position: ${startTimeTicks}.`
|
||||
);
|
||||
|
||||
try {
|
||||
const response = await api.axiosInstance.post(
|
||||
`${api.basePath}/Items/${itemId}/PlaybackInfo`,
|
||||
{
|
||||
DeviceProfile: iosProfile,
|
||||
},
|
||||
{
|
||||
params: {
|
||||
itemId,
|
||||
userId,
|
||||
startTimeTicks,
|
||||
maxStreamingBitrate,
|
||||
mediaSourceId: itemId,
|
||||
enableTranscoding: true,
|
||||
autoOpenLiveStream: true,
|
||||
},
|
||||
headers: {
|
||||
Authorization: `MediaBrowser DeviceId="${api.deviceInfo.id}", Token="${api.accessToken}"`,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const data = response.data;
|
||||
|
||||
if (item.MediaSources?.[0].SupportsDirectPlay) {
|
||||
console.log("Direct play supported");
|
||||
}
|
||||
|
||||
if (
|
||||
item.MediaSources?.[0].SupportsTranscoding &&
|
||||
data.MediaSources?.[0].TranscodingUrl
|
||||
) {
|
||||
console.log("Supports transcoding");
|
||||
}
|
||||
|
||||
if (
|
||||
item.MediaSources?.[0].SupportsTranscoding &&
|
||||
!data.MediaSources?.[0].TranscodingUrl
|
||||
) {
|
||||
console.log("Supports transcoding, but no URL found");
|
||||
}
|
||||
|
||||
if (data.MediaSources?.[0].TranscodingUrl) {
|
||||
url = api.basePath + data.MediaSources?.[0].TranscodingUrl;
|
||||
} else {
|
||||
url = buildStreamUrl({
|
||||
apiKey: api.accessToken || "",
|
||||
sessionId: "",
|
||||
itemId: itemId,
|
||||
serverUrl: api.basePath || "",
|
||||
deviceId: "unique-device-id",
|
||||
mediaSourceId: data.MediaSources?.[0].Id || "",
|
||||
tag: data.MediaSources?.[0]?.ETag || "",
|
||||
}).toString();
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the backdrop image URL for a given item.
|
||||
*
|
||||
* @param api - The Jellyfin API instance.
|
||||
* @param item - The media item to retrieve the backdrop image URL for.
|
||||
* @param quality - The desired image quality (default: 10).
|
||||
*/
|
||||
export const getBackdrop = (
|
||||
api: Api | null | undefined,
|
||||
item: BaseItemDto | null | undefined,
|
||||
quality: number = 10
|
||||
) => {
|
||||
if (!api || !item) {
|
||||
console.warn("getBackdrop ~ Missing API or Item");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (item.BackdropImageTags && item.BackdropImageTags[0]) {
|
||||
return `${api.basePath}/Items/${item?.Id}/Images/Backdrop?quality=${quality}&tag=${item?.BackdropImageTags?.[0]}`;
|
||||
}
|
||||
|
||||
if (item.ImageTags && item.ImageTags.Primary) {
|
||||
return `${api.basePath}/Items/${item?.Id}/Images/Primary?quality=${quality}&tag=${item.ImageTags.Primary}`;
|
||||
}
|
||||
|
||||
if (item.ParentBackdropImageTags && item.ParentBackdropImageTags[0]) {
|
||||
return `${api.basePath}/Items/${item?.Id}/Images/Primary?quality=${quality}&tag=${item.ImageTags?.Primary}`;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Builds a stream URL for the given item ID, user ID, and other parameters.
|
||||
*
|
||||
* @param {object} options - Options to build the stream URL.
|
||||
* @param {string} options.deviceId - The device ID of the requesting client.
|
||||
* @param {string} options.apiKey - The API key used for authentication.
|
||||
* @param {string} options.sessionId - The session ID of the user requesting the stream.
|
||||
* @param {string} options.itemId - The ID of the media item to retrieve the stream URL for.
|
||||
* @param {string} options.serverUrl - The base URL of the Jellyfin server.
|
||||
* @param {string} options.mediaSourceId - The ID of the media source requested.
|
||||
* @param {string} options.tag - The ETag tag of the media source.
|
||||
*
|
||||
* @returns {URL} A URL that can be used to stream the media item.
|
||||
*/
|
||||
function buildStreamUrl({
|
||||
deviceId,
|
||||
apiKey,
|
||||
sessionId,
|
||||
itemId,
|
||||
serverUrl,
|
||||
mediaSourceId,
|
||||
tag,
|
||||
}: {
|
||||
deviceId: string;
|
||||
apiKey: string;
|
||||
sessionId: string;
|
||||
itemId: string;
|
||||
serverUrl: string;
|
||||
mediaSourceId: string;
|
||||
tag: string;
|
||||
}): URL {
|
||||
const streamParams = new URLSearchParams({
|
||||
Static: "true",
|
||||
deviceId,
|
||||
api_key: apiKey,
|
||||
playSessionId: sessionId,
|
||||
videoCodec: "h264",
|
||||
audioCodec: "aac,mp3,ac3,eac3,flac,alac",
|
||||
maxAudioChannels: "6",
|
||||
mediaSourceId,
|
||||
Tag: tag,
|
||||
});
|
||||
return new URL(
|
||||
`${serverUrl}/Videos/${itemId}/stream.mp4?${streamParams.toString()}`
|
||||
);
|
||||
}
|
||||
20
utils/time.ts
Normal file
20
utils/time.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Converts ticks to a formatted string of hours and minutes.
|
||||
* Assumes that ticks are in milliseconds.
|
||||
*
|
||||
* @param ticks The number of milliseconds.
|
||||
* @returns A string formatted as "Xh Ym" where X is hours and Y is minutes.
|
||||
*/
|
||||
export const runtimeTicksToMinutes = (
|
||||
ticks: number | null | undefined
|
||||
): string => {
|
||||
if (!ticks) return "0h 0m";
|
||||
|
||||
const ticksPerMinute = 600000000;
|
||||
const ticksPerHour = 36000000000;
|
||||
|
||||
const hours = Math.floor(ticks / ticksPerHour);
|
||||
const minutes = Math.floor((ticks % ticksPerHour) / ticksPerMinute);
|
||||
|
||||
return `${hours}h ${minutes}m`;
|
||||
};
|
||||
Reference in New Issue
Block a user