v19 Play random videos from genre with overlay, switch genres using input - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +---- Forum: Requests (https://forum.kodi.tv/forumdisplay.php?fid=251) +---- Thread: v19 Play random videos from genre with overlay, switch genres using input (/showthread.php?tid=371282) |
Play random videos from genre with overlay, switch genres using input - RelentlessEffort - 2023-01-14 I was trying to make a Kodi 19.1 Add-on which plays random videos within a genre and display a Genre Icon in the corner of the screen, disable player controls and use left/right/up/down to switch genres, finally return to main menu when the back/b button is pressed. It was supposed to choose shows tagged with "morning" "midday" and "night" depending on the time of day. I managed to find documentation to play a video but I couldn't understand how to define the paths without giving an explicit path like "E:/Kodi/Video/ExampleShow/ExampleSeason/S01E01.mp4" One example which didn't work was "videodb://tvshows/genres/comedy/exampleshow/exampleseason/s01e01.mp4" I ended up trying to run a playRandomVideo script using smart playlists but this caused an error message "can not play from non-permanent video source" and I couldn't add the playlist location as a source because it's in the hidden folder AppData ("special://profile/playlists/video/test.xsp"). Sometimes my addon would start the playlist and other times nothing would happen other than the error message.. I had no luck displaying an image using xbmcgui.ControlImage(10, 10, 200, 200, genre_icon_path). I asked OpenAI to write some example code and spent 14 hours trying to fix it, discovering that most of the functionality was non-existent after fixing indentation and attempting some of the syntax errors.. This is the output from OpenAI Code: import xbmc Code: import xbmc RE: Play random videos from genre with overlay, switch genres using input - RelentlessEffort - 2023-01-15 I spent a long time looking for tutorials to play videos from the local filesystem (in my case a windows PC) or to access the kodi database for pathinfo from added video sources and I'm beginning to think people just aren't able to do this... Every tutorial skips from Hello World -> Your first online video or the odd tutorial to create a menu... There is so little documentation on this it's not even funny, who in their right mind thinks "ok i'll make ANOTHER tutorial to play a video online" and every single addon I saw for the first 30 pages was just "streaming app X for kodi addon" I found people trying to do similar things to me with a different application and their posts were condescended to and ignored for years, often they solved their own problems.. I wouldn't be surprised if everyone who sees this post has no clue how to do something like this, especially with the tutorials available.. RE: Play random videos from genre with overlay, switch genres using input - Lunatixz - 2023-01-15 Most of that AI code is garbage and missing specifics that are necessary for a functioning script. What you are trying to accomplish is definitely achievable. I'd suggest since you are new to programming break the project into smaller goals and learn as you go. For example; Start with a program that can play a single video, and display a single logo. Work your way to parsing your Kodi library for specific content. If you are trying to cut corners you can avoid parsing Kodi's library by using playable paths via node filters (library://video/tvshows/genres.xml). Playable URL Ex.: "videodb://tvshows/genres/Action". Good luck; if you need specific help with code please post here and I can help out. RE: Play random videos from genre with overlay, switch genres using input - RelentlessEffort - 2023-01-16 (2023-01-15, 19:22)Lunatixz Wrote: Most of that AI code is garbage and missing specifics that are necessary for a functioning script. Thanks Lunatixz, I stumbled onto the PseudoTV Live beta yesterday and it has a lot of the features I was trying to make. Is there a way to Refresh the library info for PseudoTV? I tried all the options in the utility menu and also reinstalled. The new genre of a show doesn't appear in the autotune list. Some deleted library content also got added to the guide. I found a bug with some of my custom videos that were 5 mins long being given an hour slot in the guide and crashing the PVR client when playing (using Kodi or metadata is the same result). I will try to post the log to your thread this afternoon if it helps. I would love to see an option to allow some shows to populate the guide at certain hours of the day. I'm donating for your efforts creating this cool add-on, thanks again |