Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Hound-Media-Server/hound
/ functions
Functions
690 in github.com/Hound-Media-Server/hound
⨍
Functions
690
◇
Types & classes
130
↓ 35 callers
Function
failTask
(task *database.IngestTask, err error)
server/workers/download_workers.go:540
↓ 32 callers
Function
getUserIDFromContext
(c *gin.Context)
server/controllers/v1/helpers.go:26
↓ 21 callers
Function
getSourceIDFromParams
(tmdbParam string)
server/controllers/v1/helpers.go:42
↓ 14 callers
Function
DeleteCache
Deletes a key from the cache
server/database/cache.go:159
↓ 11 callers
Function
SetCache
Stores a key-value pair with TTL, update if key exists returns whether the key exists in bool
server/database/cache.go:80
↓ 11 callers
Function
getEnvString
(key string, defaultValue string)
server/config/config.go:90
↓ 10 callers
Function
GetCache
Retrieves a key and unmarshals JSON into the provided interface. Returns whether the key exists in bool Handles the error logging, since we don't usua
server/database/cache.go:105
↓ 7 callers
Function
getFallbackSubtitle
* Handles remote fetch failures and invalid requests with fallback subtitles. Currently, some players don't handle not being able to grab subtitles we
server/model/subtitles.go:100
↓ 7 callers
Function
handleStreamButtonClick
( season: number, episode: number, mode: string, episodeID: number, overrideStartTime?: nu
web/src/pages/MediaPage/MediaPageTV.tsx:172
↓ 5 callers
Method
Write
(p []byte)
server/workers/download_workers.go:36
↓ 5 callers
Function
cleanTitle
(raw string)
server/model/external_library.go:408
↓ 5 callers
Function
getCatalogKey
( catalog: Pick<Catalog, "catalog_source" | "catalog_id">, )
web/src/pages/Admin/HomeRows.tsx:730
↓ 5 callers
Function
getLimitOffset
returns -1 if empty params which can be taken as no limit/offset
server/controllers/v1/helpers.go:56
↓ 5 callers
Function
normalizeTitle
(title string)
server/model/external_library.go:421
↓ 5 callers
Function
updateRow
(nextRow: HomeRow)
web/src/pages/Admin/HomeRows.tsx:295
↓ 4 callers
Function
fetchProviders
( mediaType: string, mediaSource: string, sourceId: string, season?: number, episode?: number, pro
web/src/api/services/providers.ts:3
↓ 4 callers
Function
getEnvInt
(key string, defaultValue int)
server/config/config.go:78
↓ 4 callers
Method
getLock
(key string)
server/model/catalog.go:28
↓ 4 callers
Function
getMDBListURL
(catalogID: string)
web/src/pages/Admin/HomeRows.tsx:760
↓ 4 callers
Function
hashRecordTMDB
* Generate md5 hash from records Used to compare newly fetched data->internal library to see if there are changes to update/insert some flaws, credits
server/sources/tmdb.go:553
↓ 4 callers
Function
moveItem
(items: T[], fromIndex: number, toIndex: number)
web/src/pages/Admin/HomeRows.tsx:773
↓ 3 callers
Function
Color
(colorString string)
server/internal/errors.go:32
↓ 3 callers
Function
DeleteWatchProgress
Delete all watch progress before deleteBefore If nil, delete all watch progress
server/model/watch_progress.go:222
↓ 3 callers
Function
GetKeysWithPrefix
Returns all keys starting with the given prefix
server/database/cache.go:134
↓ 3 callers
Function
GetTVSeasonTMDB
(tmdbID int, seasonNumber int)
server/sources/tmdb.go:178
↓ 3 callers
Function
IsVideoFile
(filename string)
server/model/stream.go:249
↓ 3 callers
Function
NewSession
()
server/database/database.go:111
↓ 3 callers
Function
cancelTask
(task *database.IngestTask)
server/workers/download_workers.go:492
↓ 3 callers
Function
createCatalogFromAvailable
(catalog: AvailableCatalog)
web/src/pages/Admin/HomeRows.tsx:722
↓ 3 callers
Function
createGenericCatalogObjectfromMDBList
if fetching from tmdb fails, create a generic object. This loses genre, backdrop data
server/model/catalog.go:337
↓ 3 callers
Function
encodeJSONDB
returns json encoding for database nil for empty map, slices
server/database/media_records.go:315
↓ 3 callers
Function
extractYear
(input string)
server/model/external_library.go:426
↓ 3 callers
Function
getAuthSessionCacheKey
(sessionID string)
server/database/sessions.go:33
↓ 3 callers
Function
getBaseURL
(raw string)
server/providers/service_health.go:92
↓ 3 callers
Function
getHoundLibraryRecords
(limit int, offset int, mediaType string, genreIDs []int64)
server/model/catalog.go:230
↓ 3 callers
Function
getUserAuthSessionCacheKey
(userID int64, sessionID string)
server/database/sessions.go:29
↓ 3 callers
Function
handleClose
()
web/src/pages/Admin/Users.tsx:207
↓ 3 callers
Function
handleGetWatchHistory
(c *gin.Context, recordType string)
server/controllers/v1/watch_history.go:120
↓ 3 callers
Function
isUniqueViolation
(err error)
server/database/media_records.go:191
↓ 3 callers
Function
parseMDBListCatalogID
(value: string)
web/src/pages/Admin/HomeRows.tsx:736
↓ 3 callers
Function
updateCatalog
(nextCatalog: Catalog)
web/src/pages/Admin/HomeRows.tsx:482
↓ 3 callers
Function
useUnifiedStreamsMutation
()
web/src/api/hooks/providers.ts:42
↓ 2 callers
Function
CreateMediaRecordCatalogObject
(record database.MediaRecordGroup)
server/model/catalog.go:428
↓ 2 callers
Function
EncodeJsonStreamAES
* Encodes a stream into a string using AES This also protects api keys in urls from being exposed if hound link is shared For our purposes, we want a
server/providers/crypto.go:31
↓ 2 callers
Function
GetCatalog
TMDB catalogs are cached, internal isn't since db data can change (eg. new download)
server/model/catalog.go:34
↓ 2 callers
Function
GetErrorStatusCode
(err error)
server/internal/errors.go:40
↓ 2 callers
Function
GetTVShowFromIDTMDB
(tmdbID int)
server/sources/tmdb.go:137
↓ 2 callers
Function
GetUserRecommendations
* Gets recommendations based on user watch history Rough algorithm: 1. Get watched movies/shows from last 6 months 2. Shuffle and select a random subs
server/model/recommendations.go:39
↓ 2 callers
Function
GetWatchProgress
(userID int64, mediaType string, mediaSource string, sourceID string, seasonNumber *int)
server/model/watch_progress.go:66
↓ 2 callers
Function
InsertRewatchFromSourceID
only allow if previous rewatch isn't empty
server/model/watch_history.go:264
↓ 2 callers
Function
LogErrorWithMessage
LogErrorWithMessage returns original error after logging for handling purposes
server/internal/errors.go:69
↓ 2 callers
Function
PopulateGenresCache
* In Hound, genres are persisted to DB but also loaded to the cache for fast retrieval Might refactor to use in memory vars instead of cache to simpli
server/database/genres.go:43
↓ 2 callers
Function
UpsertMovieRecordTMDB
create a tmdb movie record to be inserted to the internal library
server/sources/tmdb.go:621
↓ 2 callers
Function
UpsertTVShowRecordTMDB
Triggers a full update attempt but quits early if hash matches first call/update is expensive since it fetches all seasons and episodes
server/sources/tmdb.go:713
↓ 2 callers
Function
cancelDownload
(taskID: number)
web/src/api/services/media.ts:61
↓ 2 callers
Function
convertDateToReadable
(date_str: any)
web/src/helpers/helpers.tsx:16
↓ 2 callers
Function
copyToClipboard
(text: string)
web/src/helpers/helpers.tsx:24
↓ 2 callers
Function
createCatalogObject
limit clamps the number of recommendations per source some things such as duration and logo image are missing
server/model/recommendations.go:144
↓ 2 callers
Function
decrypt
(encryptedText string)
server/providers/crypto.go:85
↓ 2 callers
Function
encrypt
(plaintext []byte)
server/providers/crypto.go:66
↓ 2 callers
Function
enqueueExternalPath
(path string, root externalLibraryRoot, isInitialScan bool)
server/workers/external_library_worker.go:200
↓ 2 callers
Function
enrichIngestTasks
this gets the movie record, or both the episode and show record for tv shows a bit computationally expensive, might need a better solution
server/database/ingest.go:182
↓ 2 callers
Function
extractTMDBID
(input string)
server/model/external_library.go:459
↓ 2 callers
Function
fetchMediaFiles
( mediaType: string, mediaSource: string, sourceID: string, season?: number | null, episode?: number
web/src/api/services/media.ts:66
↓ 2 callers
Function
getAESKey
(salt []byte)
server/providers/crypto.go:16
↓ 2 callers
Function
getDiscoverOptions
(mediaType string, discoverType string, query string)
server/sources/tmdb.go:1018
↓ 2 callers
Function
getEnvBool
(key string, defaultValue bool)
server/config/config.go:98
↓ 2 callers
Function
getExternalTMDBMatchCacheKey
(mediaType string, title string, year int)
server/model/external_library.go:392
↓ 2 callers
Function
getGenreCacheKey
(mediaSource, mediaType string, sourceID int64)
server/database/genres.go:59
↓ 2 callers
Function
getGenreCatalogDefinitions
()
server/model/catalog_definitions.go:307
↓ 2 callers
Function
getHTTPFilename
get filename from http url
server/workers/download_workers.go:377
↓ 2 callers
Function
getMDBListCatalogInternal
(listID string, limit int)
server/model/catalog.go:280
↓ 2 callers
Function
getMovieFromDB
(tmdbID int)
server/sources/tmdb.go:429
↓ 2 callers
Function
getNextWatchActionMovie
simply checks the progress table for the next watch action if there are no incomplete watches, there is no next action in the future, we might want to
server/model/continue_watching.go:152
↓ 2 callers
Function
getNextWatchActionTVShow
(userID int64, mediaSource string, showID string)
server/model/continue_watching.go:170
↓ 2 callers
Function
getNormalizedSeasonEpisodes
For TV shows, check if the season starts with episode 1 some shows in tmdb don't start in episode 1 eg. Season 1 has 20 episodes, Season 2 starts at e
server/providers/providers.go:311
↓ 2 callers
Function
getProvidersQueryMovie
(c *gin.Context)
server/controllers/v1/providers.go:256
↓ 2 callers
Function
getProvidersQueryTV
(c *gin.Context)
server/controllers/v1/providers.go:198
↓ 2 callers
Function
getSeasonFromDB
(showTMDBID int, seasonNumber int)
server/sources/tmdb.go:406
↓ 2 callers
Function
getTVShowFromDB
(tmdbID int)
server/sources/tmdb.go:390
↓ 2 callers
Function
getUserRecommendationsInternal
(userID int64, mediaType string, limit int)
server/model/recommendations.go:72
↓ 2 callers
Function
getWindowDimensions
()
web/src/helpers/useWindowDimensions.tsx:9
↓ 2 callers
Function
handleClose
()
web/src/pages/Admin/ProviderProfiles.tsx:213
↓ 2 callers
Function
handleClose
()
web/src/pages/Settings/GeneralSettings.tsx:52
↓ 2 callers
Function
handleDeletePlaybackProgress
(c *gin.Context)
server/controllers/v1/watch_progress.go:246
↓ 2 callers
Function
handleDeleteWatchHistory
(c *gin.Context, recordType string)
server/controllers/v1/watch_history.go:259
↓ 2 callers
Function
handleGetComments
(c *gin.Context, recordType string)
server/controllers/v1/comments.go:56
↓ 2 callers
Function
handleGetNextWatchAction
(c *gin.Context)
server/controllers/v1/continue_watching.go:44
↓ 2 callers
Function
handleGetPlaybackProgress
(c *gin.Context)
server/controllers/v1/watch_progress.go:168
↓ 2 callers
Function
handleHeaderPlayClick
(mode: string)
web/src/pages/MediaPage/MediaPageTV.tsx:277
↓ 2 callers
Function
handlePostComment
(c *gin.Context, recordType string)
server/controllers/v1/comments.go:166
↓ 2 callers
Function
handleSetPlaybackProgress
(c *gin.Context)
server/controllers/v1/watch_progress.go:51
↓ 2 callers
Function
handleStreamButtonClick
(mode: string)
web/src/pages/MediaPage/MediaPageMovie.tsx:157
↓ 2 callers
Function
loadGenreInternalIDsFromDB
* ------------------------------ HELPERS ------------------------------ */ loadGenreInternalIDsFromDB builds the in-memory source→internal ID maps fr
server/sources/tmdb.go:367
↓ 2 callers
Function
mapMediaFileToStreamObject
we don't need to include everything in the encode, since uri is usually enough re-add metadata for the json response
server/providers/local.go:96
↓ 2 callers
Function
removeP2PFiles
Having issues with this on windows, directory is removed on next startup
server/workers/workers.go:62
↓ 2 callers
Function
requestProviderStream
(startTime: number, encodedData: string)
web/src/pages/MediaPage/MediaPageTV.tsx:196
↓ 2 callers
Function
resolveTMDBGenreInternalIDs
checks if genres are missing from the memory mapping should be a rare case, but should be handled
server/sources/tmdb.go:493
↓ 2 callers
Function
scanExternalLibrary
(root externalLibraryRoot, isInitialScan bool)
server/workers/external_library_worker.go:125
↓ 2 callers
Function
useAddTVWatchHistoryMutation
()
web/src/api/hooks/watchHistory.ts:39
next →
1–100 of 690, ranked by callers