mirror of
https://github.com/stashapp/stash.git
synced 2025-12-15 04:44:28 +01:00
* api/urlbuilders/movie: Auto format. * graphql+pkg+ui: Implement scraping movies by URL. This patch implements the missing required boilerplate for scraping movies by URL, using performers and scenes as a reference. Although this patch contains a big chunck of ground work for enabling scraping movies by fragment, the feature would require additional changes to be completely implemented and was not tested. * graphql+pkg+ui: Scrape movie studio. Extends and corrects the movie model for the ability to store and dereference studio IDs with received studio string from the scraper. This was done with Scenes as a reference. For simplicity the duplication of having `ScrapedMovieStudio` and `ScrapedSceneStudio` was kept, which should probably be refactored to be the same type in the model in the future. * ui/movies: Add movie scrape dialog. Adds possibility to update existing movie entries with the URL scraper. For this the MovieScrapeDialog.tsx was implemented with Performers and Scenes as a reference. In addition DurationUtils needs to be called one time for converting seconds from the model to the string that is displayed in the component. This seemed the least intrusive to me as it kept a ScrapeResult<string> type compatible with ScrapedInputGroupRow.
197 lines
6.6 KiB
GraphQL
197 lines
6.6 KiB
GraphQL
"""The query root for this schema"""
|
|
type Query {
|
|
"""Find a scene by ID or Checksum"""
|
|
findScene(id: ID, checksum: String): Scene
|
|
findSceneByHash(input: SceneHashInput!): Scene
|
|
|
|
"""A function which queries Scene objects"""
|
|
findScenes(scene_filter: SceneFilterType, scene_ids: [Int!], filter: FindFilterType): FindScenesResultType!
|
|
|
|
findScenesByPathRegex(filter: FindFilterType): FindScenesResultType!
|
|
|
|
"""Return valid stream paths"""
|
|
sceneStreams(id: ID): [SceneStreamEndpoint!]!
|
|
|
|
parseSceneFilenames(filter: FindFilterType, config: SceneParserInput!): SceneParserResultType!
|
|
|
|
"""A function which queries SceneMarker objects"""
|
|
findSceneMarkers(scene_marker_filter: SceneMarkerFilterType filter: FindFilterType): FindSceneMarkersResultType!
|
|
|
|
"""Find a performer by ID"""
|
|
findPerformer(id: ID!): Performer
|
|
"""A function which queries Performer objects"""
|
|
findPerformers(performer_filter: PerformerFilterType, filter: FindFilterType): FindPerformersResultType!
|
|
|
|
"""Find a studio by ID"""
|
|
findStudio(id: ID!): Studio
|
|
"""A function which queries Studio objects"""
|
|
findStudios(studio_filter: StudioFilterType, filter: FindFilterType): FindStudiosResultType!
|
|
|
|
"""Find a movie by ID"""
|
|
findMovie(id: ID!): Movie
|
|
"""A function which queries Movie objects"""
|
|
findMovies(movie_filter: MovieFilterType, filter: FindFilterType): FindMoviesResultType!
|
|
|
|
findGallery(id: ID!): Gallery
|
|
findGalleries(gallery_filter: GalleryFilterType, filter: FindFilterType): FindGalleriesResultType!
|
|
|
|
findTag(id: ID!): Tag
|
|
findTags(tag_filter: TagFilterType, filter: FindFilterType): FindTagsResultType!
|
|
|
|
"""Retrieve random scene markers for the wall"""
|
|
markerWall(q: String): [SceneMarker!]!
|
|
"""Retrieve random scenes for the wall"""
|
|
sceneWall(q: String): [Scene!]!
|
|
|
|
"""Get marker strings"""
|
|
markerStrings(q: String, sort: String): [MarkerStringsResultType]!
|
|
"""Get the list of valid galleries for a given scene ID"""
|
|
validGalleriesForScene(scene_id: ID): [Gallery!]!
|
|
"""Get stats"""
|
|
stats: StatsResultType!
|
|
"""Organize scene markers by tag for a given scene ID"""
|
|
sceneMarkerTags(scene_id: ID!): [SceneMarkerTag!]!
|
|
|
|
logs: [LogEntry!]!
|
|
|
|
# Scrapers
|
|
|
|
"""List available scrapers"""
|
|
listPerformerScrapers: [Scraper!]!
|
|
listSceneScrapers: [Scraper!]!
|
|
listMovieScrapers: [Scraper!]!
|
|
|
|
"""Scrape a list of performers based on name"""
|
|
scrapePerformerList(scraper_id: ID!, query: String!): [ScrapedPerformer!]!
|
|
"""Scrapes a complete performer record based on a scrapePerformerList result"""
|
|
scrapePerformer(scraper_id: ID!, scraped_performer: ScrapedPerformerInput!): ScrapedPerformer
|
|
"""Scrapes a complete performer record based on a URL"""
|
|
scrapePerformerURL(url: String!): ScrapedPerformer
|
|
"""Scrapes a complete scene record based on an existing scene"""
|
|
scrapeScene(scraper_id: ID!, scene: SceneUpdateInput!): ScrapedScene
|
|
"""Scrapes a complete performer record based on a URL"""
|
|
scrapeSceneURL(url: String!): ScrapedScene
|
|
"""Scrapes a complete movie record based on a URL"""
|
|
scrapeMovieURL(url: String!): ScrapedMovie
|
|
|
|
"""Scrape a performer using Freeones"""
|
|
scrapeFreeones(performer_name: String!): ScrapedPerformer
|
|
"""Scrape a list of performers from a query"""
|
|
scrapeFreeonesPerformerList(query: String!): [String!]!
|
|
|
|
# Plugins
|
|
"""List loaded plugins"""
|
|
plugins: [Plugin!]
|
|
"""List available plugin operations"""
|
|
pluginTasks: [PluginTask!]
|
|
|
|
|
|
# Config
|
|
"""Returns the current, complete configuration"""
|
|
configuration: ConfigResult!
|
|
"""Returns an array of paths for the given path"""
|
|
directory(path: String): Directory!
|
|
|
|
# Metadata
|
|
|
|
jobStatus: MetadataUpdateStatus!
|
|
|
|
# Get everything
|
|
|
|
allPerformers: [Performer!]!
|
|
allStudios: [Studio!]!
|
|
allMovies: [Movie!]!
|
|
allTags: [Tag!]!
|
|
|
|
# Get everything with minimal metadata
|
|
|
|
allPerformersSlim: [Performer!]!
|
|
allStudiosSlim: [Studio!]!
|
|
allMoviesSlim: [Movie!]!
|
|
allTagsSlim: [Tag!]!
|
|
|
|
# Version
|
|
version: Version!
|
|
|
|
# LatestVersion
|
|
latestversion: ShortVersion!
|
|
}
|
|
|
|
type Mutation {
|
|
sceneUpdate(input: SceneUpdateInput!): Scene
|
|
bulkSceneUpdate(input: BulkSceneUpdateInput!): [Scene!]
|
|
sceneDestroy(input: SceneDestroyInput!): Boolean!
|
|
scenesDestroy(input: ScenesDestroyInput!): Boolean!
|
|
scenesUpdate(input: [SceneUpdateInput!]!): [Scene]
|
|
|
|
"""Increments the o-counter for a scene. Returns the new value"""
|
|
sceneIncrementO(id: ID!): Int!
|
|
"""Decrements the o-counter for a scene. Returns the new value"""
|
|
sceneDecrementO(id: ID!): Int!
|
|
"""Resets the o-counter for a scene to 0. Returns the new value"""
|
|
sceneResetO(id: ID!): Int!
|
|
|
|
"""Generates screenshot at specified time in seconds. Leave empty to generate default screenshot"""
|
|
sceneGenerateScreenshot(id: ID!, at: Float): String!
|
|
|
|
sceneMarkerCreate(input: SceneMarkerCreateInput!): SceneMarker
|
|
sceneMarkerUpdate(input: SceneMarkerUpdateInput!): SceneMarker
|
|
sceneMarkerDestroy(id: ID!): Boolean!
|
|
|
|
performerCreate(input: PerformerCreateInput!): Performer
|
|
performerUpdate(input: PerformerUpdateInput!): Performer
|
|
performerDestroy(input: PerformerDestroyInput!): Boolean!
|
|
|
|
studioCreate(input: StudioCreateInput!): Studio
|
|
studioUpdate(input: StudioUpdateInput!): Studio
|
|
studioDestroy(input: StudioDestroyInput!): Boolean!
|
|
|
|
movieCreate(input: MovieCreateInput!): Movie
|
|
movieUpdate(input: MovieUpdateInput!): Movie
|
|
movieDestroy(input: MovieDestroyInput!): Boolean!
|
|
|
|
tagCreate(input: TagCreateInput!): Tag
|
|
tagUpdate(input: TagUpdateInput!): Tag
|
|
tagDestroy(input: TagDestroyInput!): Boolean!
|
|
|
|
"""Change general configuration options"""
|
|
configureGeneral(input: ConfigGeneralInput!): ConfigGeneralResult!
|
|
configureInterface(input: ConfigInterfaceInput!): ConfigInterfaceResult!
|
|
|
|
"""Start an import. Returns the job ID"""
|
|
metadataImport: String!
|
|
"""Start an export. Returns the job ID"""
|
|
metadataExport: String!
|
|
"""Start a scan. Returns the job ID"""
|
|
metadataScan(input: ScanMetadataInput!): String!
|
|
"""Start generating content. Returns the job ID"""
|
|
metadataGenerate(input: GenerateMetadataInput!): String!
|
|
"""Start auto-tagging. Returns the job ID"""
|
|
metadataAutoTag(input: AutoTagMetadataInput!): String!
|
|
"""Clean metadata. Returns the job ID"""
|
|
metadataClean: String!
|
|
"""Migrate generated files for the current hash naming"""
|
|
migrateHashNaming: String!
|
|
|
|
"""Reload scrapers"""
|
|
reloadScrapers: Boolean!
|
|
|
|
"""Run plugin task. Returns the job ID"""
|
|
runPluginTask(plugin_id: ID!, task_name: String!, args: [PluginArgInput!]): String!
|
|
reloadPlugins: Boolean!
|
|
|
|
stopJob: Boolean!
|
|
}
|
|
|
|
type Subscription {
|
|
"""Update from the metadata manager"""
|
|
metadataUpdate: MetadataUpdateStatus!
|
|
|
|
loggingSubscribe: [LogEntry!]!
|
|
}
|
|
|
|
schema {
|
|
query: Query
|
|
mutation: Mutation
|
|
subscription: Subscription
|
|
}
|