ankenyr / jellyfin-smartplaylist-plugin

GNU Affero General Public License v3.0
52 stars 12 forks source link

new json cannot render #3

Closed chanh0 closed 4 years ago

chanh0 commented 4 years ago

hey good work, thanks your work about this first jellyfin smartplaylist. can't wait to see this working. i hit some issue about the first release. the dummy.json with "id" seem able to render while i run "smartplaylist task" but i create new jsaon under smartplaylists folder with below format, task failed and it cannot render ( "playlist" object create under jellyfin but it is empty )

a1.json - { "Name":"上原志織", "FileName":"a1", "User":"myusername", "ExpressionSets":[ { "Expressions":[ { "MemberName":"Actors", "Operator":"Contains", "TargetValue":"上原志織" } ] } ], "Order":{ "Name":"Release Date Ascending" } }

Thanks your feedback .

ankenyr commented 4 years ago

Sorry @chanh0 but I am having trouble understanding your writing. I assume English is not your first language but that is OK! I want to help! I tried replicating this on my test server. I took a random video and added the actor 上原志織 to it and then ran it. It did create a playlist with that item.

Do you have any logs you can provide so I can more clearly see what is happening?

chanh0 commented 4 years ago

thanks for your reply . it was permission error in log and i sorted it out by run chmod 766 to update those .json files.

below was my trouble-shooting steps.

1) create a1.json ***:/appdata/jellyfin/data/smartplaylists# ls -l total 16 -rwxrw-r-x 1 root root 355 Sep 17 23:27 a1.json -rwxrw-r-x 1 1000 1000 486 Sep 15 11:35 dummy.json

2) run the smartplaylist task in jellyfin ; result falied

3) failure log as below

[2020-09-17 23:35:50.607 +08:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Refresh all SmartPlaylists" [2020-09-17 23:36:12.906 +08:00] [INF] [59] Jellyfin.Plugin.SmartPlaylist.Plugin: Playlist ID not set, creating new playlist [2020-09-17 23:36:13.299 +08:00] [ERR] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error System.UnauthorizedAccessException: Access to the path '/config/data/smartplaylists/a1.json' is denied. ---> System.IO.IOException: Permission denied --- End of inner exception stack trace --- at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at Emby.Server.Implementations.Serialization.JsonSerializer.SerializeToFile(Object obj, String file) at Jellyfin.Plugin.SmartPlaylist.SmartPlaylistStore.Save(SmartPlaylistDto smartPlaylist) at Jellyfin.Plugin.SmartPlaylist.ScheduleTasks.RefreshAllPlaylists.Execute(CancellationToken cancellationToken, IProgress1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) [2020-09-17 23:36:13.303 +08:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Refresh all SmartPlaylists" Failed after 0 minute(s) and 22 seconds [2020-09-17 23:36:13.436 +08:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks

4) run chmod 766 *.json to update those .json files 5) re-run smartplaylist task 6) sucess log as below [2020-09-17 23:38:23.243 +08:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Refresh all SmartPlaylists" [2020-09-17 23:38:37.869 +08:00] [INF] [59] Jellyfin.Plugin.SmartPlaylist.Plugin: Playlist ID not set, creating new playlist [2020-09-17 23:38:53.060 +08:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Refresh all SmartPlaylists" Completed after 0 minute(s) and 29 seconds [2020-09-17 23:38:53.108 +08:00] [INF] [59] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks [2020-09-17 23:38:53.526 +08:00] [INF] [54] Emby.Drawing.ImageProcessor: Creating image collage and saving to "/cache/temp/f0c7a41092cb48229e54fe5069c6115e.png" [2020-09-17 23:39:06.560 +08:00] [INF] [54] Emby.Drawing.ImageProcessor: Completed creation of image collage and saved to "/cache/temp/f0c7a41092cb48229e54fe5069c6115e.png"

ankenyr commented 4 years ago

Nice! Glad to know it worked.