Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShukeBta/MediaStationGo
/ functions
Functions
5,617 in github.com/ShukeBta/MediaStationGo
⨍
Functions
5,617
◇
Types & classes
739
↓ 1,671 callers
Method
Context
Context is canceled when the service container is closing.
internal/service/service.go:134
↓ 827 callers
Method
Error
()
internal/service/sse_hub.go:219
↓ 535 callers
Method
Set
(key string, page int, items []ExternalMediaResult)
internal/service/discover_section_cache.go:46
↓ 526 callers
Method
Create
Create produces a new hot backup via "VACUUM INTO".
internal/service/backup.go:69
↓ 328 callers
Method
Close
Close 释放 services 持有的任何资源(websocket hub, ffmpeg 转码, fsnotify, 后台轮询器)。
internal/service/service.go:161
↓ 268 callers
Function
New
New 将每个 repository 连接到单个 *gorm.DB。
internal/repository/repository.go:40
↓ 261 callers
Method
Write
(p []byte)
cmd/server/log_rotate.go:55
↓ 241 callers
Method
Get
Get returns the public view for a single provider, or nil.
internal/service/api_config.go:94
↓ 189 callers
Function
newServiceTestDB
(t *testing.T, models ...any)
internal/service/test_db_test.go:11
↓ 188 callers
Method
Unlock
()
internal/database/sqlite_runtime.go:72
↓ 180 callers
Method
FindByID
FindByID returns a single site or nil.
internal/service/site_crud.go:41
↓ 178 callers
Function
NewHub
NewHub builds a Hub. Caller must invoke Run in its own goroutine.
internal/service/ws_hub.go:37
↓ 169 callers
Method
Lock
(ctx context.Context)
internal/database/sqlite_runtime.go:55
↓ 162 callers
Method
Add
(path string, media *model.Media)
internal/service/scanner_local_write_batch.go:33
↓ 145 callers
Method
Set
Set upserts a setting value.
internal/repository/setting_repository.go:27
↓ 122 callers
Method
List
List returns the entries under dirID. An empty dirID means the root.
internal/service/cloud/cloud.go:67
↓ 121 callers
Method
Get
Get 返回指定通知渠道详情。
internal/handler/notify_handler.go:98
↓ 110 callers
Function
writeOrgFile
(t *testing.T, path, content string)
internal/service/organizer_directory_test.go:13
↓ 101 callers
Method
Find
Find returns the device row for (user, device), or (nil, nil) when absent.
internal/repository/bot_repo.go:104
↓ 101 callers
Method
get
(ctx context.Context, key string)
internal/service/notifier.go:54
↓ 97 callers
Function
categoryName
(categories map[string]string, key, fallback string)
internal/service/media_classifier_helpers.go:86
↓ 93 callers
Method
SetDefault
SetDefault sets a specific client as default and clears others.
internal/repository/download_client_repo.go:89
↓ 89 callers
Method
Count
Count returns the total number of non-deleted users.
internal/repository/user_repository.go:81
↓ 85 callers
Method
Create
Create 创建新的通知渠道。
internal/handler/notify_handler.go:44
↓ 85 callers
Function
NewOrganizerService
NewOrganizerService is the constructor.
internal/service/organizer.go:39
↓ 84 callers
Method
post
(ctx context.Context, path string, payload any, out any)
internal/handler/license_client.go:63
↓ 80 callers
Function
newOrganizerTestRepo
(t *testing.T)
internal/service/organizer_transfer_test.go:16
↓ 73 callers
Function
ParseCloudLibraryMount
(raw string)
internal/service/cloud_mount.go:48
↓ 67 callers
Function
episodeKey
(season, episode int)
internal/service/local_availability.go:151
↓ 64 callers
Method
Status
Status resolves live database-backed AI config for the UI.
internal/service/ai.go:72
↓ 61 callers
Function
NewDownloadService
NewDownloadService is the constructor.
internal/service/downloads.go:88
↓ 58 callers
Function
onChange
(key: string, value: string)
web/src/pages/SettingsPage.tsx:44
↓ 57 callers
Method
executeCommand
executeCommand parses and dispatches Telegram commands through a registry so adding a command does not grow a monolithic switch.
internal/service/telegram_commands.go:193
↓ 56 callers
Method
OrganizeDirectory
OrganizeDirectory organizes every video file found under opts.SourcePath into the destination root, applying dedup + 洗版 (resolution replacement).
internal/service/organizer_directory.go:39
↓ 56 callers
Method
Upsert
Upsert 创建或更新 API 配置,自动加密敏感字段。
internal/service/api_config_svc.go:72
↓ 53 callers
Method
ScanLibrary
ScanLibrary walks the library root and persists discovered media files.
internal/service/scanner_scan.go:16
↓ 50 callers
Function
NewScannerService
NewScannerService is the constructor.
internal/service/scanner.go:87
↓ 48 callers
Method
Delete
Delete removes a single backup file.
internal/service/backup.go:127
↓ 47 callers
Function
firstNonEmpty
(values ...string)
internal/service/download_views.go:190
↓ 47 callers
Function
readSTRM
(t *testing.T, path string)
internal/service/strm_svc_test.go:497
↓ 46 callers
Function
BuildCloudLibraryPath
(provider, scanDir, displayDir string)
internal/service/cloud_mount.go:27
↓ 45 callers
Function
AdminRequired
AdminRequired must run AFTER AuthRequired; it enforces role == "admin".
internal/middleware/roles.go:10
↓ 45 callers
Function
NewSTRMService
NewSTRMService 创建 STRM 服务。
internal/service/strm_svc.go:31
↓ 43 callers
Function
newBotTestService
(t *testing.T)
internal/service/bot_features_test.go:14
↓ 42 callers
Function
selectSiteSearchCandidates
(results []SearchResult, sub *model.Subscription, seenSet map[string]struct{}, availability ...LocalAvailabili
internal/service/subscription_planner.go:41
↓ 41 callers
Function
requirePermission
(svc *service.Container, key string)
internal/handler/permissions.go:19
↓ 41 callers
Function
sanitizeFilename
sanitizeFilename removes characters not safe for filesystem names.
internal/service/organizer_paths.go:9
↓ 40 callers
Function
NewScraperService
NewScraperService is the constructor.
internal/service/scraper_service.go:31
↓ 40 callers
Method
Remove
Remove 移除指定下载任务,deleteFiles 控制是否同时删除文件。
internal/service/download_adapter.go:25
↓ 39 callers
Function
normalizeOrganizeMediaType
(mediaType string)
internal/service/organizer_directory_source.go:120
↓ 37 callers
Method
Run
Run is the blocking event loop. Publish events with Hub.Publish.
internal/service/ws_hub.go:47
↓ 37 callers
Function
parseBoolSetting
(value string, fallback bool)
internal/service/runtime_settings.go:118
↓ 37 callers
Function
toString
toString converts a gin context value to a string, returning an empty string when the value is missing or of the wrong type.
internal/handler/util.go:6
↓ 36 callers
Function
NewCryptoService
NewCryptoService derives a 256-bit key from the given secret via SHA-256 and constructs an AES-GCM AEAD. Empty secrets yield a service whose Encrypt/D
internal/service/crypto.go:40
↓ 35 callers
Function
NewSubscriptionService
NewSubscriptionService is the constructor.
internal/service/subscription.go:48
↓ 35 callers
Function
NewTMDbProvider
NewTMDbProvider is the constructor. APIBase / image CDN can be overridden via secrets.tmdb_api_proxy + tmdb_image_proxy for users behind GFW. apiConfi
internal/service/tmdb.go:44
↓ 35 callers
Function
pathWithin
(path, root string)
internal/service/organizer_paths.go:158
↓ 35 callers
Function
registerEmbyRoutes
registerEmbyRoutes 在 r 上挂双前缀("" + "/emby")的 Emby 兼容路由。
internal/handler/emby_routes.go:13
↓ 34 callers
Function
NewMediaService
NewMediaService is the constructor.
internal/service/media.go:53
↓ 34 callers
Method
Register
Register creates a new user. The first registered user is auto-promoted to admin to support fresh installs that did not run SeedAdmin.
internal/service/auth.go:88
↓ 32 callers
Method
GenerateFromTree
(ctx context.Context, opts GenerateSTRMTreeOptions)
internal/service/strm_tree_import.go:58
↓ 32 callers
Function
embyEmptyItemsHandler
(_ *service.Container)
internal/handler/emby_static.go:104
↓ 31 callers
Function
set
(key: keyof typeof form, value: string | boolean)
web/src/components/MetadataEditDialog.tsx:78
↓ 30 callers
Function
NewImageProxy
NewImageProxy is the constructor.
internal/service/image_proxy.go:51
↓ 30 callers
Function
normalizeOrganizeCategoryKey
(value string)
internal/service/organizer_library_classification.go:113
↓ 29 callers
Method
Items
Items paginates media in Emby's hierarchy. Episodic libraries are exposed as Series -> Season -> Episode so Infuse/Vidhub/SenPlayer stop treating ever
internal/service/emby_compat.go:133
↓ 29 callers
Function
containsAnyText
(text string, needles ...string)
internal/service/media_classifier_helpers.go:29
↓ 28 callers
Method
Enabled
Enabled reports whether the AI integration is configured.
internal/service/ai.go:55
↓ 28 callers
Method
Update
Update 更新 STRM 记录。
internal/service/strm_svc.go:110
↓ 28 callers
Function
confirmAction
(options: ConfirmOptions)
web/src/components/confirmAction.tsx:5
↓ 28 callers
Method
now
()
internal/service/device_service.go:266
↓ 28 callers
Function
signedTestToken
(t *testing.T, secret string)
internal/handler/emby_test_helpers_test.go:12
↓ 27 callers
Method
AddDownloadWithMeta
(ctx context.Context, userID, urlStr, savePath string, meta DownloadTaskMeta)
internal/service/download_add.go:44
↓ 27 callers
Method
Publish
Publish sends an event to every interested subscriber. Non-blocking: the event is dropped if the hub is full to avoid stalling the producer.
internal/service/ws_hub.go:75
↓ 27 callers
Function
mediaVisibilityForRequest
(c *gin.Context, svc *service.Container)
internal/handler/visibility.go:19
↓ 26 callers
Function
CleanQuery
CleanQuery converts a filename like "Inception.2010.1080p.BluRay.x264.mkv" into a TMDb-friendly title plus an optional year hint.
internal/service/scraper_query_clean.go:70
↓ 26 callers
Function
Error
Error 返回错误响应。
internal/handler/response.go:55
↓ 26 callers
Function
NewEmbyService
NewEmbyService is the constructor.
internal/service/emby_compat.go:75
↓ 26 callers
Function
ParseEpisode
ParseEpisode tries to extract (season, episode) from an arbitrary filename. Returns (0, 0) when nothing recognisable is found.
internal/service/episode_parser.go:43
↓ 26 callers
Function
escapeHTML
(s string)
internal/service/notifier.go:142
↓ 26 callers
Function
newTestEmbyService
(t *testing.T)
internal/service/emby_compat_test.go:16
↓ 26 callers
Function
normalizeMediaType
(mediaType, title, category string)
internal/service/media_classifier.go:164
↓ 26 callers
Function
resolveMappedDestinationPath
(path string)
internal/service/media_paths.go:128
↓ 26 callers
Function
strr
strr is a tiny helper to avoid importing fmt.Sprint just to coerce interface{} → string. (Named "strr" so it doesn't collide with the notify channel's
internal/service/storage_config.go:243
↓ 25 callers
Function
CloudLibraryAutoCategory
(lib model.Library)
internal/service/cloud_auto_category.go:31
↓ 25 callers
Method
SetScraper
SetScraper wires the scraper so directory organize can resolve TMDb/Bangumi metadata before it decides the final folder and filename.
internal/service/organizer.go:50
↓ 25 callers
Function
firstQueryValue
(c *gin.Context, keys ...string)
internal/handler/emby_auth_request.go:167
↓ 25 callers
Function
newTestScraper
(t *testing.T)
internal/service/scraper_test_helpers_test.go:28
↓ 25 callers
Function
nfoPath
(media string)
internal/service/nfo.go:116
↓ 25 callers
Method
telegramBinding
(ctx context.Context, telegramUserID int)
internal/service/telegram_binding.go:13
↓ 24 callers
Function
New
New constructs a provider of the given type from a free-form config map (as persisted by StorageConfigService). The client is shared so callers can in
internal/service/cloud/cloud.go:91
↓ 24 callers
Function
NewStorageConfigService
NewStorageConfigService is the constructor.
internal/service/storage_config.go:36
↓ 24 callers
Method
Save
Save persists the user permission patch (admin only — caller checks).
internal/service/permission.go:118
↓ 24 callers
Method
SetStorageConfig
SetStorageConfig wires cloud-disk storage access into the scanner. It is set after service construction because StorageConfigService depends on Crypto
internal/service/scanner.go:115
↓ 24 callers
Function
mediaSeriesKey
(media model.Media)
internal/service/media_series_key.go:14
↓ 23 callers
Method
Save
Save inserts or updates the config row.
internal/service/storage_config.go:107
↓ 23 callers
Function
newAuthTestServices
(t *testing.T)
internal/service/auth_user_limits_test.go:22
↓ 22 callers
Function
AllModels
AllModels returns the slice consumed by gorm.AutoMigrate.
internal/model/model.go:33
↓ 22 callers
Function
cleanXMLText
(value string)
internal/service/local_metadata_helpers.go:41
↓ 22 callers
Function
str
str coerces a config value to a trimmed string.
internal/service/cloud/cloud.go:113
next →
1–100 of 5,617, ranked by callers