HouseOfCards 81 Posted October 16, 2024 Posted October 16, 2024 Good day, As I've posted before, I have sort of a unique setup where my NAS automatically copies and removes content from my server, which creates a constantly rotating and curated media channel on my devices. I use Emby like a curated Netflix, with revolving content around themes, dates, holidays, event anniversaries, etc... So I'm hoping my request isn't terribly difficult because most people might not need this function... Would it be possible to update the routine for removing media to include setting the "played" state to unplayed in the database when something is removed from the library? Not to delete the play history per se. Just set the entry in the database to unplayed so when it gets added back it appears "new" again? This would really improve my setup if it's not too difficult. Thanks!
adminExitium 281 Posted October 16, 2024 Posted October 16, 2024 Going to also need this because watch/play history as a concept doesn't exist right now: 1
ebr 15583 Posted October 16, 2024 Posted October 16, 2024 Hi. This would likely end up with some side-effects you wouldn't like. For instance, re-arranging your folder structure would lose all your playstates... 1
TZTZoro 23 Posted October 16, 2024 Posted October 16, 2024 (edited) 9 hours ago, HouseOfCards said: removing media to include setting the "played" state to unplayed in the database when something is removed from the library this would break my system for example my data changes but i want to keep the playstate and what would you consider removal? using the ui? or just moving the file? in any case you can use the emby api and write a script to set watched state to false, play count still gets stored if i am right i do this to unfavorite watched items automatically because of how i have set my system up and how my media gets managed writing a script might help you also by making the curation easier/automatic Edited October 16, 2024 by TZTZoro
HouseOfCards 81 Posted October 16, 2024 Author Posted October 16, 2024 I'm not sure if this seems more complex than it is... Here's an example. December 1st my NAS copies all my Christmas movies/shows into the paths Emby is getting it's libraries from. They show up as recently added, and Emby's home screens are full of Christmas cheer... We watch these movies/shows as we like, and on December 31st, the NAS deletes those Christmas movies/shows from Emby's library locations. All is well and good. But when this process repeats next December 1st, all the movies/shows are already marked as watched, so they don't show up as new content on the home screens this time. Not so good. So all I'm saying is when Emby finds the file no longer exists, and removes the movie/show from the library because it's gone, just to have Emby automatically click the "played" toggle to off when it removes it. This keeps all the play history and other relevant data about the media, but when it's found again, it shows up as unplayed. This has nothing to do with maintaining history, etc... If the file is gone, by definition it cannot be played or unplayed. It's just gone. It seems like it should be as easy as adding one line of code when Emby discovers the movie/show missing. It has a routine it does to remove the item... I'm just suggesting adding one step to the removal process where it marks the item unplayed when it removes it. If this function should to be tied to a preference a user could set, that should solve any unwanted behavior for those who move their media a lot and want the play state to remain intact. My personal opinion is that this should be the default behavior anyhow. Maintaining long term history about what has been played is certainly desired. Maintaining the play state of something that doesn't exist anymore seems pointless.
TZTZoro 23 Posted October 16, 2024 Posted October 16, 2024 (edited) okay, but if i upgrade my files for example from a 1080p release to a 4k release, the file gets deleted, if emby scans in that time or the file watcher gets triggered the item gets marked as no longer played, but it is just a in place upgrade. i think more users have this kind of setup so they do not want that a deleted item gets marked as unplayed i understand your use case, i really dislike rewatching stuff so i would never be the intended people for it and just store it forever but maybe a quick solution for you is, if you mount your themed folders as a single library like this and when you want to remove it you run(and write) a script which marks all items from that folder as unplayed so it gets featured again next year I have no clue what db vacuum exactly does, maybe it does remove the unused items so it might solve your problem, you might try it out MAKE SURE TO MAKE A BACKUP Maybe someone else can explain it more Off topic: maybe some ideas what i do, i have a playlist with themes like chistmas cheer, i use virtualtv/psuedotv (they are plugins) to create live tv channels and i play them in the background based on my media because i just dislike what is on real tv now a days as fillers Maybe this is an idea for you as well Edited October 16, 2024 by TZTZoro clarification 1
ebr 15583 Posted October 16, 2024 Posted October 16, 2024 From the computer system's standpoint, changing the location of a file is removing it and then re-adding it. Therefore, what you are requesting would lose playstate for anything that changed locations. When an item is "gone" the computer cannot know if it is going to re-appear in a minute somewhere else. A dedicated library that you could easily control watched states on would probably be a better solution for you.
HouseOfCards 81 Posted October 16, 2024 Author Posted October 16, 2024 I feel like there is a disconnect somewhere, and we're not seeing the forest through the trees... Let's say there was an option in the settings... X Mark media files as unplayed if removed from library. As I understand, Emby is maintaining the information about the title even after it's deleted, using it's ID Number in The Movie Database or The TV Database. This way, if it's added back that information is retained. Why does setting it to unplayed change anything else, or have anything to do with whether the file is actually there or not?
Luke 39677 Posted October 17, 2024 Posted October 17, 2024 6 hours ago, HouseOfCards said: I feel like there is a disconnect somewhere, and we're not seeing the forest through the trees... Let's say there was an option in the settings... X Mark media files as unplayed if removed from library. As I understand, Emby is maintaining the information about the title even after it's deleted, using it's ID Number in The Movie Database or The TV Database. This way, if it's added back that information is retained. Why does setting it to unplayed change anything else, or have anything to do with whether the file is actually there or not? He’s just pointing out what the side effect of having this kind of option would be. 1
Mibok 148 Posted October 17, 2024 Posted October 17, 2024 23 hours ago, TZTZoro said: this would break my system for example my data changes but i want to keep the playstate and what would you consider removal? using the ui? or just moving the file? in any case you can use the emby api and write a script to set watched state to false, play count still gets stored if i am right i do this to unfavorite watched items automatically because of how i have set my system up and how my media gets managed writing a script might help you also by making the curation easier/automatic You can mitigate this with the trakt plugin, i use it as a playsate backup, so if for some reason i need to rebuild my library all my played items regain their Played status after syncing, is useful too if you go to se a movie to the theater and later when added to you library it will be marked as Played in the trakt sync schedule task. 1
DarkStar1977 92 Posted October 17, 2024 Posted October 17, 2024 @ebr @LukeCould be a simple solution for what @HouseOfCardsis asking without risking the play state and with a minor modification: Let's take the "Christmas Movies" example: When Christmas is coming by some automation he adds a folder with Christmas movies, during the Christmas period those movies are presented as "new" and he and his family watch those. When Christmas period is finished by some automation he remove this folder from the library.. If I understand correctly the situation, the solution culd be: Create a Library just for this movies let's gonna call it "Christmas Movies". He can add the Christmas Movies to the library and configure his home Screen that this library will be the first shown (meanwhile this library is empty nothing will appear). With the automation, he adds the Christmas Movies to this library when Christmas approach. This will result on having on first line screen his Christmas movies. The trick comes here: On the library options menu, you can mark as played an entire library: But there's not an option to mark an entire library as "unplayed", I've checked and never appears this option. If the "unplayed" option is implemented, will be as simple as when those movies are re-added next christmas, just mark the entire library as "unplayed". Hope this helps. 1
TZTZoro 23 Posted October 17, 2024 Posted October 17, 2024 3 minutes ago, DarkStar1977 said: On the library options menu, you can mark as played an entire library: yes, that is for you as user, using the api from emby you can write a simple script to grab the user id from every user on your server and mark every item as not played, add it to the automation of moving the files and it is fixed without any need for the devs
DarkStar1977 92 Posted October 17, 2024 Posted October 17, 2024 2 minutes ago, TZTZoro said: yes, that is for you as user, using the api from emby you can write a simple script to grab the user id from every user on your server and mark every item as not played, add it to the automation of moving the files and it is fixed without any need for the devs For sure but I'm not an expert on scripting and I don'r know if the user requesting this can do it with a script. In any case, If a "played" option is available for libraries, same as for seasons and for episodes, movies, whatever, seems logic to me that is possible to mark as "unplayed" a library the same way you can do it with an episode, a movie, a season or whatever in emby, except a library. 1
GrimReaper 3993 Posted October 17, 2024 Posted October 17, 2024 27 minutes ago, DarkStar1977 said: But there's not an option to mark an entire library as "unplayed", I've checked and never appears this option. 19 minutes ago, DarkStar1977 said: If a "played" option is available for libraries, same as for seasons and for episodes, movies, whatever, seems logic to me that is possible to mark as "unplayed" a library the same way you can do it with an episode, a movie, a season or whatever in emby, except a library. Multi-select only that single library, three-dot menu top-right will have "Mark Unplayed" as well.
DarkStar1977 92 Posted October 17, 2024 Posted October 17, 2024 6 minutes ago, GrimReaper said: Multi-select only that single library, three-dot menu top-right will have "Mark Unplayed" as well. That's Great but Multi-Select only works if you have on the home screen "My Media": If you have the "My Media Smalll", you cannot multi-select anything from libraries. In any case @HouseOfCardsyou have here a working workaround for your issue. @GrimReaperseems reasonable that this will be available even if you're using the "Small My Media", so a contextual menu will be desired, if the solution is already implemented on the multi-selection, this means is just adding the menu option because the programming is already done. Thanks
GrimReaper 3993 Posted October 17, 2024 Posted October 17, 2024 2 minutes ago, DarkStar1977 said: seems reasonable that this will be available even if you're using the "Small My Media", so a contextual menu will be desired, if the solution is already implemented on the multi-selection, this means is just adding the menu option because the programming is already done I agree, seems like an omission, multi-select should be available regardless of My Media or My Media (small). @Luke 1
HouseOfCards 81 Posted October 19, 2024 Author Posted October 19, 2024 Would it be more feasible to implement a scheduled maintenance task to do this, for those that want it and don't know scripting? Something like... "Mark Missing Media Unplayed" This task will scan your library and mark any media it finds missing as unplayed. This will cause it to be marked as new if the media is ever re-added to this server. This could be scheduled for users who want their libraries to work this way? If it never gets intentionally scheduled, it shouldn't change things for anyone else. For @ebrand @Luke... I think I'm just not understanding the consequences this would have on others. I know I'm doing something that most people wouldn't ever need. For a more detailed example people can look at the tutorial I made here. I am only looking for a way, in my specific (albeit pretty radical) way of curating the content, to keep things recently added back, to appear as fresh content. In practice, I've found my setup to work really well, but there are a few wrinkles. This is one of the bigger ones. Once something is played, it's played forever according to Emby, so it never shows like it's new again. I understand people move things around and that's why the play state is persistent by default. I'm essentially looking for a way to set the default play state to either played or unplayed. People can leave it as the default if they don't want to change things. Thinking this through, a scheduled task to remove things that no longer exist altogether might not be bad. What if you remove things you never intend to add back? Why store that in the database forever? I interacted with @sross44some time ago about my thoughts on Emby. I really love the project, and support it the only way I know how besides my purchase... with ideas. Some of us do quirky things, like my setup. On the other hand, I myself have no desire to to use Live TV for example... To me it's a useless feature, but many people find it essential. It's not an issue of who's right or wrong in how they do it. It's about making Emby stand out from just being "another media server". Some of the other things I'm advocating for... For me, Emby is a collection tool. Collect your music, movies, TV and such. Every media server on the planet does these types of things. My ideas center on making Emby stand out as a true collectors paradise. Use advanced "Cinema Intro" functionality to allow for other types of content collections... Commercials, Newsreels, Bumpers, Special Features, MPAA Ratings... Use the database to allow for collections of Movie/TV Posters, Album Covers, Actor Images, etc... Collectors collect. Let's embrace the madness. LOL I mean no disrespect for the hard work the developers do. I throw these ideas out there because I want Emby to be more than "just another choice". I chose Emby as my media server. It works great, the community/project people are fantastic, and it checks all the boxes. All my suggestions focus on making the platform such that just installing another server and pointing it to the media folders, doesn't create the exact same thing with a slightly different interface. I want switching from Emby to be something you'd immediately notice, and thus encouraging people not to. If it's not do-able, that's fine. I'm just presenting my case for the things that would make Emby unique from the rest of the pack. Have a great weekend.
Luke 39677 Posted October 20, 2024 Posted October 20, 2024 Quote For @ebrand @Luke... I think I'm just not understanding the consequences this would have on others. I know I'm doing something that most people wouldn't ever need. For a more detailed example people can look at the tutorial I made here. One example is it would make something like the process of renaming a video file or upgrading to a newer quality version more difficult because you'd lose watch data. 2 1
HouseOfCards 81 Posted October 21, 2024 Author Posted October 21, 2024 On 10/17/2024 at 12:37 PM, DarkStar1977 said: For sure but I'm not an expert on scripting and I don'r know if the user requesting this can do it with a script. In any case, If a "played" option is available for libraries, same as for seasons and for episodes, movies, whatever, seems logic to me that is possible to mark as "unplayed" a library the same way you can do it with an episode, a movie, a season or whatever in emby, except a library. I may have to look at the script option. @TZTZorodo you have any ideas about the best way to do this? I found this with a quick search. https://github.com/AnthonyMusgrove/Emby-ScripterX Since I run two servers, I really just need to run a script once a month (on one server) to reset the play status of any items not in the library anymore.
HouseOfCards 81 Posted October 21, 2024 Author Posted October 21, 2024 22 hours ago, Luke said: One example is it would make something like the process of renaming a video file or upgrading to a newer quality version more difficult because you'd lose watch data. Thanks. I think having this option as a scheduled task could mitigate this problem for users who casually move things around or upgrade a file version. If you all could keep this in mind for those of us with a need to remove missing items, that would be awesome!
HouseOfCards 81 Posted October 21, 2024 Author Posted October 21, 2024 On 10/17/2024 at 1:10 PM, DarkStar1977 said: In any case @HouseOfCardsyou have here a working workaround for your issue. No I don't, because that also marks things STILL THERE as unplayed. I was only looking to reset the play state on removal (at some logical point down the road). If we look at this problem from a privacy standpoint, it seems reasonable to expect that (at some point) if I remove an item from my library, that I would expect Emby to remove any history that I had that item at all. If I add 50 items to Emby, but then change my mind, why does Emby need to remember that I had them at some point, and retain the fact that I had them forever? I need to figure out scripting a solution, but have no idea where to start with that.
DarkStar1977 92 Posted October 21, 2024 Posted October 21, 2024 Just now, HouseOfCards said: No I don't, because that also marks things STILL THERE as unplayed. I was only looking to reset the play state on removal (at some logical point down the road). If we look at this problem from a privacy standpoint, it seems reasonable to expect that (at some point) if I remove an item from my library, that I would expect Emby to remove any history that I had that item at all. If I add 50 items to Emby, but then change my mind, why does Emby need to remember that I had them at some point, and retain the fact that I had them forever? I need to figure out scripting a solution, but have no idea where to start with that. Dude, the reason why Emby is preserving watch history has been explained several times, a few examples: - External Drive disconnected - Moving from one library to another - ETC You have a working workaround, that is not exactly what you ask but will make the trick with a little manual intervention: 1st.- Create a New Library for your Christmas Stuff and place it on first one - > If this is empty will not show anything in your homescreen "latest media" 2nd.- When Christmas is approaching copy your Christmas Stuff to the folders that belongs to this library 3rd.- Scan the "Christmas Library" 4rth.- Select the library in "My Contents" like in the picture below: 5th.- Click the "..." button on the top right and select "Mark as Played" -> This will mark entire library as played 6th.- Repeat 4th step and then on the ""..." button on the top right click and select "Mark as unplayed" With this all your media in "Christmas Library" will appear as unplayed and in the 1st Row of your Emby Contents. When Christmas period ends and you remove your "Christmas stuff" and done. Next year you repeat the thing I know it's not automatic but does what you want and can be done in 5 minutes.
Luke 39677 Posted October 21, 2024 Posted October 21, 2024 32 minutes ago, HouseOfCards said: Thanks. I think having this option as a scheduled task could mitigate this problem for users who casually move things around or upgrade a file version. If you all could keep this in mind for those of us with a need to remove missing items, that would be awesome! That would not mitigate that. They would still lose watch data.
HouseOfCards 81 Posted October 21, 2024 Author Posted October 21, 2024 5 minutes ago, DarkStar1977 said: Dude, the reason why Emby is preserving watch history has been explained several times, a few examples: - External Drive disconnected - Moving from one library to another - ETC You have a working workaround, that is not exactly what you ask but will make the trick with a little manual intervention: I know it's not automatic but does what you want and can be done in 5 minutes. I fully understand the retention of watch history. I'm not suggesting changing this as the default, rather having a maintenance task that can be OPTIONALLY scheduled (monthly, quarterly, whatever) for users like me that want to periodically reset missing information. That's all. If you don't want the default behavior to change, you simply have to do nothing at all. Move your media around to your hearts content, nothing changes. For me, I'd like a task to run once a month that simply finds the missing media, and sets it to unplayed. It doesn't affect anyone that doesn't set it up to run at a scheduled interval. You have to understand that my Christmas example didn't explain everything. It's Christmas, Halloween, documentaries, and even TV shows. This month I may have season 1-3 of Family Guy. Next month I might swap that for seasons 4-5, etc... It's TV, movies, all of it... It's not something that can have special libraries set up for a specific holiday. Sorry if I wasn't clear about that. I know I'm a special case with this, and I'm not trying to be offensive or break people's setups. I'm looking for a solution to my specific problem. Some suggestions here I will have to look into further to figure out what works, if anything. It's a unique problem I CREATED. I thought I might raise the issue, since others might find a fix to this beneficial. It's easy to think "this guy is crazy for doing this complicated setup", but honestly... it's no more crazy than me thinking "who are these people constantly moving their media around". LOL 1
DarkStar1977 92 Posted October 21, 2024 Posted October 21, 2024 11 minutes ago, HouseOfCards said: I fully understand the retention of watch history. I'm not suggesting changing this as the default, rather having a maintenance task that can be OPTIONALLY scheduled (monthly, quarterly, whatever) for users like me that want to periodically reset missing information. That's all. If you don't want the default behavior to change, you simply have to do nothing at all. Move your media around to your hearts content, nothing changes. For me, I'd like a task to run once a month that simply finds the missing media, and sets it to unplayed. It doesn't affect anyone that doesn't set it up to run at a scheduled interval. You have to understand that my Christmas example didn't explain everything. It's Christmas, Halloween, documentaries, and even TV shows. This month I may have season 1-3 of Family Guy. Next month I might swap that for seasons 4-5, etc... It's TV, movies, all of it... It's not something that can have special libraries set up for a specific holiday. Sorry if I wasn't clear about that. I know I'm a special case with this, and I'm not trying to be offensive or break people's setups. I'm looking for a solution to my specific problem. Some suggestions here I will have to look into further to figure out what works, if anything. It's a unique problem I CREATED. I thought I might raise the issue, since others might find a fix to this beneficial. It's easy to think "this guy is crazy for doing this complicated setup", but honestly... it's no more crazy than me thinking "who are these people constantly moving their media around". LOL Now I understand it. You need some kind of support for "Seasoning". Seasons (Christmas, Halloween, etc) that you can define and that will modify automatically your home screen and all libraries based on that. It's a great idea and your approach of "deleting content" and "reading it" is at least a way to make this appears as the first items on every library "My Media" is presenting. Definetly you will need a script, and sorry I cannot help on that. 1
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