Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags- Remove From Library (broken) #18470

Closed
6 tasks
KarellenX opened this issue Sep 29, 2020 · 5 comments · Fixed by #18549
Closed
6 tasks

Tags- Remove From Library (broken) #18470

KarellenX opened this issue Sep 29, 2020 · 5 comments · Fixed by #18549

Comments

@KarellenX
Copy link
Member

Bug report

Describe the bug

The function Remove from library for video library tags has been broken since v17.

Please look at the three images in section 4 on this wiki page to understand which feature this is...
https://kodi.wiki/view/Video_library_tags#Managing_tags

Expected Behavior

When a user wants to delete a tag, the user would select the Context Menu on the appropriate tag, select Manage... then select Remove from library. This should remove all movies from that tag, then delete the tag from the database.

Actual Behavior

Nothing happens.

Possible Fix

Unknown

To Reproduce

Steps to reproduce the behavior:

  1. Ensure you have tags in your library.
  2. Attempt to delete a tag by following the images shown in section 4... https://kodi.wiki/view/Video_library_tags#Managing_tags

Debuglog

Nil debuglog. Nothing is shown

Screenshots

Here are some links or screenshots to help explain the problem:
https://kodi.wiki/view/Video_library_tags#Managing_tags

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • Android

  • iOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name:

  • Kodi version:

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label Sep 29, 2020
@KarellenX KarellenX added Component: Database Component: Video v17 Krypton v18 Leia v19 Matrix Triage: Confirmed issue has been reproduced by a team member and removed Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it labels Sep 29, 2020
@DaVukovic
Copy link
Member

I see the following at the log while trying to remove a tag:

2020-09-29 07:53:47.353 T:6900    DEBUG <general>: ------ Window Deinit (DialogContextMenu.xml) ------
2020-09-29 07:53:47.365 T:6900    DEBUG <general>: CGUIMediaWindow::GetDirectory (videodb://movies/tags/)
2020-09-29 07:53:47.365 T:6900    DEBUG <general>:   ParentPath = [videodb://movies/tags/]
2020-09-29 07:53:47.366 T:7639    DEBUG <general>: Thread waiting start, auto delete: false
2020-09-29 07:53:47.372 T:7639    DEBUG <general>: RunQuery took 2 ms for 134 items query: SELECT tag.tag_id, tag.name, count(1), count(files.playCount) FROM tag JOIN tag_link ON tag.tag_id = tag_link.tag_id JOIN movie_view ON tag_link.media_id = movie_view.idMovie AND tag_link.media_type='movie' JOIN files ON files.idFile = movie_view.idFile GROUP BY tag.tag_id
2020-09-29 07:53:47.379 T:7639    DEBUG <general>: Thread waiting 140164772914944 terminating
2020-09-29 07:53:47.387 T:7640    DEBUG <general>: Thread BackgroundLoader start, auto delete: false
2020-09-29 07:53:47.403 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/-poster.jpg
2020-09-29 07:53:47.403 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/-poster.png
2020-09-29 07:53:47.403 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/-fanart.jpg
2020-09-29 07:53:47.403 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://fanart.jpg/
2020-09-29 07:53:47.403 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/-fanart.png
2020-09-29 07:53:47.403 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://fanart.png/
2020-09-29 07:53:47.404 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/-banner.jpg
2020-09-29 07:53:47.404 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/-banner.png
2020-09-29 07:53:47.404 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/-thumb.jpg
2020-09-29 07:53:47.404 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/-thumb.png
2020-09-29 07:53:47.404 T:7640  WARNING <general>: CreateLoader - unsupported protocol(newtag) in newtag://movies/.tbn

The query is shown because I enabled verbose database logging

The error meesage comes from this section:

https://github.com/xbmc/xbmc/blob/master/xbmc/filesystem/FileFactory.cpp#L177

Maybe this helps a bit to identify the problem.

@KarellenX
Copy link
Member Author

KarellenX commented Sep 29, 2020

I think you are reporting a different issue @DaVukovic Those errors are logged by simply browsing tags.

See here... #15851

@DaVukovic
Copy link
Member

Ah, true. These errors do come up if the Tag-window (where all those tags are shown) is being entered. So I guess it's just a reload of that window after I tried to remove that tag which shows those errors

Sorry for the noise

@DaveTBlake
Copy link
Member

DaveTBlake commented Sep 29, 2020

The problem is in CGUIDialogVideoInfo::CanDeleteVideoItem

bool CGUIDialogVideoInfo::CanDeleteVideoItem(const CFileItemPtr &item)

called by CGUIDialogVideoInfo::DeleteVideoItemFromDatabase from CGUIDialogVideoInfo::DeleteVideoItem. [Nav screen context menu calls a methods on the video info dialog, knotted or what?]

Tags are not included in the list of video items that can be deleted. They are not included in DeleteVideoItemFromDatabase either, even though a method exists CVideoDatabase::DeleteTag to do it.

Meanwhile CGUIWindowVideoNav::OnDeleteItem still has all the processing to delete a tag, but the context menu no longer causes OnDeleteItem. This is how I think the tag should be deleted, with delete actions on the nav screen being performed by CGUIWindowVideoNav and not CGUIDialogVideoInfo

@DaveTBlake
Copy link
Member

After a quick check it looks like this functionality has not worked for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants