Steve Cartman 11 Posted October 1, 2023 Share Posted October 1, 2023 Using the API, i am trying retrieve all existing subtitles for an item (i.e not embedded subtitles, but .srt that have been downloaded) example: http://192.168.2.16:8096/emby/Items?Recursive=true&Ids=419532&api_key=xxxxxxxxxxd5dad49b0b448da542a where ids = 419532 is a movie. I want to retrieve all subtitles for 419532 that have been downloaded Link to comment Share on other sites More sharing options...
Luke 37094 Posted October 1, 2023 Share Posted October 1, 2023 Hi, add MediaStreams to your requested fields Link to comment Share on other sites More sharing options...
Steve Cartman 11 Posted October 11, 2023 Author Share Posted October 11, 2023 (edited) Hi Luke, I added MediaStreams and had the following response: I see the media stream for the subtitle, but there is no ID. Am I missing something? The SRT subtitle has the Path: "/Movies2/Movies/C/Carry On Cowboy (1965) [tmdbid=5065]/Carry On Cowboy (1965) [tmdbid=5065].en.srt" (Highlighted below in blue) { "Name": "Carry On Cowboy", "OriginalTitle": "Carry On Cowboy", "ServerId": "a26304226e704f9795548d64951eb929", "Id": "419462", "Etag": "5f14b04e1c8897fd2ad260d2ad66dcce", "DateCreated": "2014-07-11T21:24:30.0000000Z", "CanDelete": true, "CanDownload": true, "PresentationUniqueKey": "3ea1a1532b757a95f71869a15236898f", "SupportsSync": true, "Container": "mkv", "SortName": "Carry On Cowboy", "ForcedSortName": "Carry On Cowboy", "PremiereDate": "1965-11-26T00:00:00.0000000Z", "ExternalUrls": [ { "Name": "IMDb", "Url": "https://www.imdb.com/title/tt0059014" }, { "Name": "TheMovieDb", "Url": "https://www.themoviedb.org/movie/5065" }, { "Name": "Trakt", "Url": "https://trakt.tv/search/tmdb/5065?id_type=movie" } ], "MediaSources": [ { "Protocol": "File", "Id": "3ea1a1532b757a95f71869a15236898f", "Path": "/Movies2/Movies/C/Carry On Cowboy (1965) [tmdbid=5065]/Carry On Cowboy (1965) [tmdbid=5065].mkv", "Type": "Default", "Container": "mkv", "Size": 7039629612, "Name": "Carry On Cowboy", "IsRemote": false, "RunTimeTicks": 56674880000, "SupportsTranscoding": true, "SupportsDirectStream": true, "SupportsDirectPlay": true, "IsInfiniteStream": false, "RequiresOpening": false, "RequiresClosing": false, "RequiresLooping": false, "SupportsProbing": false, "MediaStreams": [ { "Codec": "h264", "Language": "eng", "TimeBase": "1/1000", "VideoRange": "SDR", "DisplayTitle": "1080p H264", "DisplayLanguage": "English", "NalLengthSize": "4", "IsInterlaced": false, "BitRate": 9936860, "BitDepth": 8, "RefFrames": 1, "IsDefault": true, "IsForced": false, "Height": 1040, "Width": 1920, "AverageFrameRate": 24, "RealFrameRate": 24, "Profile": "High", "Type": "Video", "AspectRatio": "24:13", "Index": 0, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "PixelFormat": "yuv420p", "Level": 41, "IsAnamorphic": false, "AttachmentSize": 0 }, { "Codec": "ac3", "Language": "eng", "TimeBase": "1/1000", "DisplayTitle": "English AC3 stereo (Default)", "DisplayLanguage": "English", "IsInterlaced": false, "ChannelLayout": "stereo", "BitRate": 640000, "Channels": 2, "SampleRate": 48000, "IsDefault": true, "IsForced": false, "Type": "Audio", "Index": 1, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "AttachmentSize": 0 }, { "Codec": "subrip", "Language": "eng", "TimeBase": "1/1000", "DisplayTitle": "English (Default SUBRIP)", "DisplayLanguage": "English", "IsInterlaced": false, "IsDefault": true, "IsForced": false, "Type": "Subtitle", "Index": 2, "IsExternal": false, "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File", "AttachmentSize": 0, "SubtitleLocationType": "InternalStream" }, { "Codec": "srt", "Language": "eng", "DisplayTitle": "English (SRT)", "DisplayLanguage": "English", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 3, "IsExternal": true, "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Path": "/Movies2/Movies/C/Carry On Cowboy (1965) [tmdbid=5065]/Carry On Cowboy (1965) [tmdbid=5065].en.srt", "Protocol": "File", "AttachmentSize": 0 } ], "Formats": [], "Bitrate": 9936860, "RequiredHttpHeaders": {}, "ReadAtNativeFramerate": false, "DefaultAudioStreamIndex": 1, "DefaultSubtitleStreamIndex": 2 } ], "ProductionLocations": [ "United Kingdom" ], "Path": "/Movies2/Movies/C/Carry On Cowboy (1965) [tmdbid=5065]/Carry On Cowboy (1965) [tmdbid=5065].mkv", "Overview": "Stodge City is in the grip of the Rumpo Kid and his gang. Mistaken identity again takes a hand as a 'sanitary engineer' named Marshal P. Knutt is mistaken for a law marshal. Being the conscientious sort, Marshal tries to help the town get rid of Rumpo, and a showdown is inevitable. Marshal has two aidsâ€â€revenge-seeking Annie Oakley and his sanitary expertise.", "Taglines": [ "How the west was lost!" ], "Genres": [ "Comedy", "Western" ], "CommunityRating": 6.1, "RunTimeTicks": 56674880000, "Size": 7039629612, "FileName": "Carry On Cowboy (1965) [tmdbid=5065].mkv", "Bitrate": 9936860, "PlayAccess": "Full", "ProductionYear": 1965, "RemoteTrailers": [ { "Url": "https://www.youtube.com/watch?v=AG5-ro86Em0" } ], "ProviderIds": { "Tmdb": "5065", "Imdb": "tt0059014" }, "IsFolder": false, "ParentId": "418591", "Type": "Movie", "People": [ { "Name": "Sid James", "Id": "74828", "Role": "Johnny Finger, the Rumpo Kid", "Type": "Actor", "PrimaryImageTag": "6bd7652be58c20245418a3f95bcaba7c" }, { "Name": "Jim Dale", "Id": "74829", "Role": "Marshal P. Knutt", "Type": "Actor", "PrimaryImageTag": "49a48e484eda0e74d7700b87862a87f6" }, { "Name": "Angela Douglas", "Id": "74830", "Role": "Annie Oakley", "Type": "Actor", "PrimaryImageTag": "bf52d6aaee46e28c27ee10fa5d64ae48" }, { "Name": "Kenneth Williams", "Id": "74831", "Role": "Judge Burke", "Type": "Actor", "PrimaryImageTag": "e85fa4ecac06106640fd193d47f60c0e" }, { "Name": "Charles Hawtrey", "Id": "74832", "Role": "Chief Big Heap", "Type": "Actor", "PrimaryImageTag": "e9bd7bab934f7bcc5765cd69722e09e2" }, { "Name": "Joan Sims", "Id": "74833", "Role": "Belle Armitage", "Type": "Actor", "PrimaryImageTag": "85339a0448772080543687bdd4878449" }, { "Name": "Bernard Bresslaw", "Id": "74834", "Role": "Little Heap", "Type": "Actor", "PrimaryImageTag": "2e9f47d8ef9a7cc5b937b35015df7f62" }, { "Name": "Peter Butterworth", "Id": "58186", "Role": "Doc", "Type": "Actor", "PrimaryImageTag": "7c81ace59cc17053e1a106ff0c84ad3a" }, { "Name": "Percy Herbert", "Id": "73439", "Role": "Charlie, the Bartender", "Type": "Actor", "PrimaryImageTag": "1576ad993f26260001931c25919b686d" }, { "Name": "Jon Pertwee", "Id": "58197", "Role": "Sheriff Albert Earp", "Type": "Actor", "PrimaryImageTag": "96f5198bcc97395c374fab6453851980" }, { "Name": "Sydney Bromley", "Id": "63123", "Role": "Sam Houston", "Type": "Actor", "PrimaryImageTag": "2c3b9f32df360869858c451b1c44f0b5" }, { "Name": "Edina Ronay", "Id": "49836", "Role": "Dolores", "Type": "Actor", "PrimaryImageTag": "029a17098bf76675c8afa8afd9595637" }, { "Name": "Lionel Murton", "Id": "74835", "Role": "Clerk", "Type": "Actor", "PrimaryImageTag": "4b9275065b5817ac766cfa66192b2de2" }, { "Name": "Peter Gilmore", "Id": "74836", "Role": "Henchman Curly", "Type": "Actor", "PrimaryImageTag": "c01226c8ba525cee95e907962a24f9c7" }, { "Name": "Davy Kaye", "Id": "74837", "Role": "Josh the Undertaker", "Type": "Actor", "PrimaryImageTag": "74d9f97b04a842db40b9f12f93aece5e" }, { "Name": "Alan Gifford", "Id": "49839", "Role": "Commissioner", "Type": "Actor", "PrimaryImageTag": "f76870d569cdcf6c2cdefa2711dc5efa" }, { "Name": "Margaret Nolan", "Id": "58328", "Role": "Miss Jones", "Type": "Actor", "PrimaryImageTag": "b1478b951c0d4176df736650eb4b3f62" }, { "Name": "Bryan Mosley", "Id": "69676", "Role": "Rider (uncredited)", "Type": "Actor", "PrimaryImageTag": "4d2a4d61b0e4f37e8c99aaf60f0c5d92" }, { "Name": "Gerald Thomas", "Id": "74838", "Type": "Director", "PrimaryImageTag": "28647a0829a061bee6804e4b4867ce41" } ], "Studios": [ { "Name": "Peter Rogers Productions", "Id": 74839 } ], "GenreItems": [ { "Name": "Comedy", "Id": 32915 }, { "Name": "Western", "Id": 39615 } ], "TagItems": [], "LocalTrailerCount": 0, "UserData": { "PlaybackPositionTicks": 0, "PlayCount": 0, "IsFavorite": false, "Played": false }, "DisplayPreferencesId": "dbf7709c41faaa746463d67978eb863d", "PrimaryImageAspectRatio": 0.7012622720897616, "MediaStreams": [ { "Codec": "h264", "Language": "eng", "TimeBase": "1/1000", "VideoRange": "SDR", "DisplayTitle": "1080p H264", "DisplayLanguage": "English", "NalLengthSize": "4", "IsInterlaced": false, "BitRate": 9936860, "BitDepth": 8, "RefFrames": 1, "IsDefault": true, "IsForced": false, "Height": 1040, "Width": 1920, "AverageFrameRate": 24, "RealFrameRate": 24, "Profile": "High", "Type": "Video", "AspectRatio": "24:13", "Index": 0, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "PixelFormat": "yuv420p", "Level": 41, "IsAnamorphic": false, "AttachmentSize": 0 }, { "Codec": "ac3", "Language": "eng", "TimeBase": "1/1000", "DisplayTitle": "English AC3 stereo (Default)", "DisplayLanguage": "English", "IsInterlaced": false, "ChannelLayout": "stereo", "BitRate": 640000, "Channels": 2, "SampleRate": 48000, "IsDefault": true, "IsForced": false, "Type": "Audio", "Index": 1, "IsExternal": false, "IsTextSubtitleStream": false, "SupportsExternalStream": false, "Protocol": "File", "AttachmentSize": 0 }, { "Codec": "subrip", "Language": "eng", "TimeBase": "1/1000", "DisplayTitle": "English (Default SUBRIP)", "DisplayLanguage": "English", "IsInterlaced": false, "IsDefault": true, "IsForced": false, "Type": "Subtitle", "Index": 2, "IsExternal": false, "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Protocol": "File", "AttachmentSize": 0, "SubtitleLocationType": "InternalStream" }, { "Codec": "srt", "Language": "eng", "DisplayTitle": "English (SRT)", "DisplayLanguage": "English", "IsInterlaced": false, "IsDefault": false, "IsForced": false, "Type": "Subtitle", "Index": 3, "IsExternal": true, "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Path": "/Movies2/Movies/C/Carry On Cowboy (1965) [tmdbid=5065]/Carry On Cowboy (1965) [tmdbid=5065].en.srt", "Protocol": "File", "AttachmentSize": 0 } ], "ImageTags": { "Primary": "319cba84625b8d29710684a42f43c9f0", "Logo": "7d9162c44cf102cc93d9b51d180a0cd0", "Thumb": "3b7f45ca8a3cc9e5058f21b4cd3450db" }, "BackdropImageTags": [ "7359865528888b11746cac957a2ed53b", "7359865528888b11746cac957a2ed53b" ], "Chapters": [ { "StartPositionTicks": 0, "Name": "Chapter 1", "MarkerType": "Chapter", "ChapterIndex": 0 }, { "StartPositionTicks": 5154580000, "Name": "Chapter 2", "MarkerType": "Chapter", "ChapterIndex": 1 }, { "StartPositionTicks": 10840830000, "Name": "Chapter 3", "MarkerType": "Chapter", "ChapterIndex": 2 }, { "StartPositionTicks": 16393330000, "Name": "Chapter 4", "MarkerType": "Chapter", "ChapterIndex": 3 }, { "StartPositionTicks": 22980830000, "Name": "Chapter 5", "MarkerType": "Chapter", "ChapterIndex": 4 }, { "StartPositionTicks": 26728750000, "Name": "Chapter 6", "MarkerType": "Chapter", "ChapterIndex": 5 }, { "StartPositionTicks": 32162080000, "Name": "Chapter 7", "MarkerType": "Chapter", "ChapterIndex": 6 }, { "StartPositionTicks": 38021250000, "Name": "Chapter 8", "MarkerType": "Chapter", "ChapterIndex": 7 }, { "StartPositionTicks": 43251250000, "Name": "Chapter 9", "MarkerType": "Chapter", "ChapterIndex": 8 }, { "StartPositionTicks": 48902920000, "Name": "Chapter 10", "MarkerType": "Chapter", "ChapterIndex": 9 } ], "MediaType": "Video", "LockedFields": [], "LockData": true, "Width": 1920, "Height": 1040 } Edited October 11, 2023 by Steve Cartman Link to comment Share on other sites More sharing options...
Steve Cartman 11 Posted October 11, 2023 Author Share Posted October 11, 2023 Hi Luke, The reason I am trying to get the ID of the Subtitle, Is that I want to delete the subtitle. It would be the same action as clicking below, but using the API. Steve Link to comment Share on other sites More sharing options...
adminExitium 173 Posted October 11, 2023 Share Posted October 11, 2023 Can you try via the Web App and see the API that's called for fetching the IDs and for deleting? Link to comment Share on other sites More sharing options...
Luke 37094 Posted October 11, 2023 Share Posted October 11, 2023 Right there's no id. All of the operations are based on item id and media stream index. Link to comment Share on other sites More sharing options...
Steve Cartman 11 Posted October 11, 2023 Author Share Posted October 11, 2023 26 minutes ago, adminExitium said: Can you try via the Web App and see the API that's called for fetching the IDs and for deleting? I been trying to do this for many API calls, but not sure where to look. I have look in the embyserver.txt log, but can seem to find any API calls. If the embyserver.txt log is the right place, what should I search for? If embyserver.txt log is not the right place, where should I be looking? Link to comment Share on other sites More sharing options...
Luke 37094 Posted October 11, 2023 Share Posted October 11, 2023 Using the browser debugger to monitor requests is a good way. 1 Link to comment Share on other sites More sharing options...
adminExitium 173 Posted October 11, 2023 Share Posted October 11, 2023 They will be visible under the Network tab of the Browser Developer Tools window. Link to comment Share on other sites More sharing options...
Steve Cartman 11 Posted October 11, 2023 Author Share Posted October 11, 2023 2 hours ago, Luke said: Right there's no id. All of the operations are based on item id and media stream index. So I got it to work. Using the Browser Developer Tools window, I was able to see the Emby Url. 1. Read the Media Stream to find the index of the subtitle: "Type": "Subtitle", "Index": 3, "IsExternal": true, "IsTextSubtitleStream": true, "SupportsExternalStream": true, "Path": "/Movies2/Movies/C/Carry On Cowboy (1965) [tmdbid=5065]/Carry On Cowboy (1965) [tmdbid=5065].en.srt" 2. Use this url to delete the subtitle: http://192.168.2.16:8096/emby/Videos/419462/Subtitles/3/Delete?api_key=xxxxxxxx6bec4d5dad49b0b448da542 Thanks for all the help. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now