| 12345678910111213141516171819202122232425262728293031323334353637 |
- import { RemoteDriveType } from '../enums/RemoteDriveType';
- const BASE_LABEL = '网盘';
- export function getRemoteDriveBaseLabel(): string {
- return BASE_LABEL;
- }
- export function getRemoteDriveAccountLabel(): string {
- return `${BASE_LABEL}账户`;
- }
- export function getRemoteDriveProtocolLabel(type?: number): string {
- switch (type) {
- case RemoteDriveType.Smb:
- return 'SMB';
- case RemoteDriveType.Navidrome:
- return 'Navidrome';
- case RemoteDriveType.Ftp:
- return 'FTP';
- case RemoteDriveType.Baidu:
- return 'Baidu';
- case RemoteDriveType.WebDav:
- default:
- return 'WebDAV';
- }
- }
- export function getRemoteDriveDisplayLabel(type?: number): string {
- const protocol = getRemoteDriveProtocolLabel(type);
- return `${BASE_LABEL}${protocol ? `(${protocol})` : ''}`;
- }
- export function getRemoteDrivePlaylistPrefix(type?: number): string {
- const protocol = getRemoteDriveProtocolLabel(type);
- return `${BASE_LABEL}${protocol ? `-${protocol}` : ''}`;
- }
|