terse 1 Posted September 19, 2024 Posted September 19, 2024 How can I get the movies list newly added to the media library through the API? I tried to get it this way http://localhost:8096/emby/Items?api_key=emby_api_key&IncludeItemTypes=Movie&IsPlayed=false&Limit=100&SortBy=DateCreated&SortOrder=Descending but it shows an error: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. log show: Application path: /system SQLitePCL.pretty.SQLiteException: Error: no such column: UserDatas.played - select count(*) OVER() AS TotalRecordCount,A.Id,A.Name,A.RunTimeTicks,A.ParentId,A.Images,A.ExtraType from MediaItems A where A.Type=5 AND A.ParentId=1 AND Coalesce(UserDatas.played, 0)=0 ORDER BY A.Name collate NATURALSORT ASC LIMIT 100 SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement(String sql, ReadOnlySpan`1& tail) at SQLitePCL.pretty.DatabaseConnection.PrepareStatement(IDatabaseConnection This, String sql) at Emby.Server.Implementations.Data.SqliteItemRepository.QueryItemsInTransaction[T](InternalItemsQuery query, IDatabaseConnection db, String[] columnsToSelect, Boolean filterColumns, String[] groupBy, Func`5 rowReaderFn, String methodName) at Emby.Server.Implementations.Data.SqliteItemRepository.GetItems(InternalItemsQuery query) at MediaBrowser.Controller.Entities.AggregateFolder.GetItemsInternal(InternalItemsQuery query) at MediaBrowser.Controller.Entities.Folder.GetItems(InternalItemsQuery query) at Emby.Api.UserLibrary.ItemsService.GetQueryResult(GetItems request, DtoOptions dtoOptions, User user) at Emby.Api.UserLibrary.ItemsService.GetItems(GetItems request) at Emby.Api.UserLibrary.ItemsService.Get(GetItems request) Please help me
adminExitium 355 Posted September 19, 2024 Posted September 19, 2024 You need to add UserId=xxx to the API query string, and it needs to be the User GUID.
terse 1 Posted September 19, 2024 Author Posted September 19, 2024 27 minutes ago, adminExitium said: You need to add UserId=xxx to the API query string, and it needs to be the User GUID. Suppose my settings are as follows: • Emby server address: 192.168.1.100 • Port: 8096 • User GUID: 123e4567-e89b-12d3-a456-426614174000 • API key: ABC123XYZ I tried to add it but still failed to get it. Can you write an example for me to refer to? Thank you very much for your help!
ginjaninja 605 Posted September 19, 2024 Posted September 19, 2024 (edited) i use the api swagger https interface in dashboard to test/learn rest api commands. this works https://xxx.mywire.org:8920/emby/Items?Limit=20&Recursive=true&SortOrder=Descending&IncludeItemTypes=movie&SortBy=DateCreated&api_key=XXXXX suggests userid can be optional? does that help? edit Recursive=true is needed to search entire libraries from the root, ratherthan say a specific parentid Edited September 19, 2024 by ginjaninja
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