Closed terrelsa13 closed 10 months ago
@Floflobel Thanks for trying v5 out. I will take a look at these errors once I get home.
Quick suggestion. The script is supposed to convert the legacy config to the new yaml format, if it can find it. If it cannot find a legacy config or a yaml config it should assume a new install. Try copying the v4 config into the mumc_v5
folder. See if that helps.
Thanks for creating the new ticket, which will be much better. I'm actually going to try to use V4 config file, but I would have preferred to start from scratch. I'll wait for your feedback and keep looking on my side.
For the 2nd issue I see the problem. Not home yet, so cannot fix it. But if you are able, open mumc_config_builder.py
. Go to line #32
press enter. Then type the_dict['version']=get_script_version()
Make sure you undo your change to the_dict_keys
list.
Well done! It worked and I was able to generate the configuration. I came across another error:
Traceback (most recent call last):
File "/opt/MUMC_v5/mumc.py", line 113, in <module>
main()
File "/opt/MUMC_v5/mumc.py", line 34, in main
cfgCheckYAML(cfg,init_dict)
File "/opt/MUMC_v5/mumc_modules/mumc_yaml_check.py", line 3478, in cfgCheckYAML
raise RuntimeError('\n' + error_found_in_mumc_config_yaml)
RuntimeError:
ValueError: admin_settings > users > user_id: 5417e14c6a3b4394866cbefe7bfaa025 > whitelist > network_path: None is not an expected value
ValueError: admin_settings > users > user_id: 5417e14c6a3b4394866cbefe7bfaa025 > whitelist > network_path: None is not an expected value
ValueError: admin_settings > users > user_id: 5417e14c6a3b4394866cbefe7bfaa025 > whitelist > network_path: None is not an expected value
ValueError: admin_settings > users > user_id: 5417e14c6a3b4394866cbefe7bfaa025 > whitelist > network_path: None is not an expected value
ValueError: admin_settings > users > user_id: 5417e14c6a3b4394866cbefe7bfaa025 > whitelist > network_path: None is not an expected value
ValueError: admin_settings > users > user_id: 5417e14c6a3b4394866cbefe7bfaa025 > whitelist > network_path: None is not an expected value
Config example:
users:
- user_id: 5417e14c6a3b4394866cbefe7bfaa025
user_name: User1
whitelist:
- lib_id: db4c1708cbb5dd1676284a40f2950aba
collection_type: movies
path: /media/storage3/films
network_path: null
lib_enabled: true
I temporarily replaced it with this to correct the problem: https://github.com/terrelsa13/MUMC/blob/5ed1217166de8bf258e787187bcd899e9bc970d8/mumc_modules/mumc_yaml_check.py#L119
check_item is None
I think there's another problem with whitelisted/blacklisted libraries. I've chosen libraries to be whitelisted or blacklisted, but I can never see it in the script output:
:[KEEPING] - Movie - [REC]⁴ : Apocalypse - Filmax - Unplayed - Play Count: 0 - Created 1046 days ago - Favorite: False - Whitetag: True - Blacktag: False - Whitelisted: False - Blacklisted: False - MovieID: 425196
It looks like they've gone into whitetag, even though I didn't activate this option at all during initialization. I can provide my config and logs if needed.
Edit: I have the impression that others are nowhere to be found while the library is well referenced.
:[KEEPING] - Movie - Annihilation - DNA Films - Played 1619 days ago - Play Count: 3 - Created 1018 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: False - MovieID: 1188033
Found it. Fixed it. Script was checking if black/whitetags where true with if (tag):
but the tag variable is an empty string. Changed to if (tag == ''):
and now it does not think everything is tagged. Should be a v5.0.2 on the beta branch. You can give that a try; but I think there might be something going on with the behavioral statements. Something I think should not be deleted appears to be getting deleted. I will look into that more tomorrow.
Ignore v5.0.2 and use v5.0.3 instead. Was able to fix the bug in the behavioral statements. On my side I am able to set the following and it appears to work. Let me know if it behaves the same way for you.
basic_settings:
filter_statements:
movie:
played:
condition_days: -1
count_equality: '>='
count: 1
created:
condition_days: 300
count_equality: '>='
count: 1
behavioral_control: true
advanced_settings:
behavioral_statements:
movie:
.
.
.
blacklisted:
action: delete
user_conditional: any
played_conditional: any_created
action_control: 3
The above settings will delete movies in blacklisted libraries created 300 or more days ago:
Apologies, I made some assumptions in my last post.
I will specify the easiest path; set action_control: 0
to disable any bahavioral statements for favorited
, whitetagged
, blacktagged
, and whitelisted
.
advanced_settings:
behavioral_statements:
movie:
favorited:
action_control: 0
whitetagged:
action_control: 0
blacktagged:
action_control: 0
whitelisted:
action_control: 0
Okay, I've applied all your recommendations and it seems to want to remove the good media from what I can see. There's a little problem on the display when it processes the media where it says it's keeping it but in the end it deletes it:
:[KEEPING] - Movie - Snowpiercer : le Transperceneige - CJ Entertainment - Played 951 days ago - Play Count: 3 - Created 1110 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 1189029
:[KEEPING] - Movie - The Craft : Les nouvelles sorcières - Blumhouse Productions - Played 282 days ago - Play Count: 1 - Created 1073 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 374862
:[KEEPING] - Movie - Zookeeper - Happy Madison Productions - Played 213 days ago - Play Count: 1 - Created 1093 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 336027
MOVIE POST PROCESSING STARTED...
[DELETED] Movie - Snowpiercer : le Transperceneige - 1189029
[DELETED] Movie - The Craft : Les nouvelles sorcières - 374862
[DELETED] Movie - Zookeeper - 336027
Thank you for your hard work !
I've just tried changing these parameters:
basic_settings:
filter_statements:
movie:
played:
condition_days: -1
count_equality: '>='
count: 1
created:
condition_days: 300
count_equality: '=='
count: 0
behavioral_control: true
or
basic_settings:
filter_statements:
movie:
played:
condition_days: -1
count_equality: '>='
count: 1
created:
condition_days: 300
count_equality: '<'
count: 1
behavioral_control: true
Logically, it should want to remove media older than 300 days with 0 plays on the counter. It doesn't seem to want to, because it's not deleting anything.
:[KEEPING] - Movie - Volte/Face - Krane Entertainment - Unplayed - Play Count: 0 - Created 1245 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 1176381
:[KEEPING] - Movie - Voyage à Tokyo - Shochiku Co., Ltd. - Unplayed - Play Count: 0 - Created 1107 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 318831
:[KEEPING] - Movie - Voyage au bout de l’enfer - Universal Pictures - Unplayed - Play Count: 0 - Created 993 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 618735
MOVIE POST PROCESSING STARTED...
Perhaps I've misunderstood something.
EDIT:
It seems that if I make this configuration everything goes well:
basic_settings:
filter_statements:
movie:
played:
condition_days: -1
count_equality: '>='
count: 1
created:
condition_days: 300
count_equality: '=='
count: 1
behavioral_control: true
:[KEEPING] - Movie - Snowpiercer : le Transperceneige - CJ Entertainment - Played 951 days ago - Play Count: 3 - Created 1110 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 1189029
:[KEEPING] - Movie - Tenet - Warner Bros. Pictures - Played 30 days ago - Play Count: 1 - Created 36 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 1237391
:*[DELETE] - Movie - The Craft : Les nouvelles sorcières - Blumhouse Productions - Played 282 days ago - Play Count: 1 - Created 1073 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 374862
:*[DELETE] - Movie - Zookeeper - Happy Madison Productions - Played 213 days ago - Play Count: 1 - Created 1093 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 336027
MOVIE POST PROCESSING STARTED...
[DELETED] Movie - The Craft : Les nouvelles sorcières - 374862
[DELETED] Movie - Zookeeper - 336027
Ahh... I see where this is still getting hung up.
In def get_playedCreatedDays_playedCreatedCounts(the_dict,item,var_dict):
the script was only running the necessary checks if the media item was played. Checks have now been added for unplayed media items. Give it another shot. v5.0.8 should be in the beta branch now.
Use these settings:
basic_settings:
filter_statements:
movie:
played:
condition_days: -1
count_equality: '>='
count: 1
created:
condition_days: 300
count_equality: '=='
count: 0
behavioral_control: true
advanced_settings:
behavioral_statements:
movie:
favorited:
action: keep
user_conditional: any
played_conditional: ignore
action_control: 0
extra:
genre: 0
library_genre: 0
whitetagged:
action: keep
user_conditional: all
played_conditional: ignore
action_control: 0
tags: []
blacktagged:
action: delete
user_conditional: all
played_conditional: any_any
action_control: 0
tags: []
whitelisted:
action: keep
user_conditional: all
played_conditional: any_any
action_control: 0
blacklisted:
action: delete
user_conditional: any
played_conditional: any_created
action_control: 3
Wonderful, everything works fine with just one user. I tried with two users but it doesn't seem to do what I want with my configuration: I would like that if one of my users has seen the media, it is not deleted. Currently: DELETE + KEEPING = DELETE Desired: DELETE + KEEPING = KEEPING
With several users, this should go in the same direction: DELETE + DELETE + DELETE + DELETE + ... + KEEPING = KEEPING
I've tried to change the configuration in this direction but it doesn't work:
User1 - 5417e14c6a3b4394866cbefe7bfaa025
:*[DELETE] - Movie - Free Guy - Berlanti Productions - Unplayed - Play Count: 0 - Created 727 days ago - Favorite: False - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 1098811
User2 - 4fd64ef2422e40e0ba6e095eb9f74ecd
:[KEEPING] - Movie - Free Guy - Berlanti Productions - Played 589 days ago - Play Count: 4 - Created 727 days ago - Favorite: True - Whitetag: False - Blacktag: False - Whitelisted: False - Blacklisted: True - MovieID: 1098811
MOVIE POST PROCESSING STARTED...
[DELETED] Movie - Free Guy - 1098811
config:
version: 5.0.7
basic_settings:
filter_statements:
movie:
played:
condition_days: -1
count_equality: '>='
count: 1
created:
condition_days: 600
count_equality: ==
count: 0
behavioral_control: true
...
advanced_settings:
behavioral_statements:
...
blacklisted:
action: delete
user_conditional: all
played_conditional: all_created
action_control: 3
EDIT: Same with the 5.0.10
My fault.
During post processing:
action_control: 3
adds the media item to the finalized delete list.action_control: 3
does NOT remove the media item from the finalized delete list.Change action_control: 3
to action_control: 5
.
During post processing:
action_control: 5
adds the media item to the finalized delete list.action_control: 5
removes the media item from the finalized delete list.It works perfectly! Thanks for the explanation. The doc is indeed missing, but I think you're waiting to finish v5 before creating it, or maybe I haven't seen it.
I think I've reached my ideal setup, thank you very much for your time and this wonderful project.
Where can I send you a small donation?
Awesome! Glad we got it working the way you want.
Oh yes, the documentation is indeed missing. I'm working on learning how to create a wiki to make it more intuitive to explain/read how the different options make the script work. Hopefully I can get that done sometime soon.
There is a donate button at the bottom of the README. Thank you for showing your support!
@Floflobel Sounds like we are good. I am going to close this issue. If you need help or run into a bug go ahead and open a new issue.
Thank you for your detailed feedback. I've just reinstall all my set-up to V5 and I'm trying to set-up MUMC but every time I get an error:
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/MUMC_v5/mumc.py", line 113, in
main()
File "/opt/MUMC_v5/mumc.py", line 31, in main
cfg,init_dict=importConfig(init_dict,cmdopt_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/MUMC_v5/mumc_modules/mumc_config_import.py", line 102, in importConfig
importHasException(init_dict,cmdopt_dict)
File "/opt/MUMC_v5/mumc_modules/mumc_config_import.py", line 22, in importHasException
build_configuration_file(init_dict)
File "/opt/MUMC_v5/mumc_modules/mumc_config_builder.py", line 115, in build_configuration_file
the_dict['admin_settings']['users']=get_users_and_libraries(the_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/MUMC_v5/mumc_modules/mumc_userlib_builder.py", line 796, in get_users_and_libraries
if (not (folder['CollectionType'] == 'boxsets')):