INTERACT FORUM

More => Old Versions => JRiver Media Center 25 for Windows => Topic started by: andrewberg on March 03, 2021, 05:05:36 pm

Title: Advanced Tag Editing: Remove Actors With Only One Title
Post by: andrewberg on March 03, 2021, 05:05:36 pm
I have imported lots of actors to my movies library ('Actors' column header shows +10,000 entries)... Now I look for a way to remove some who appear in only one film, so as to make the list easier to search...

- One idea was to sort the 'Actors' column by 'Number of Files' (via 'Edit > Category > Sorting'), then select all entries with one title. This will display all movie files with selected actors in the file list below, but removing the entries selected in the column would also remove all the files below, so no way.

- Likewise, if I select all the files listed below, then open Tag Editor to remove the actors, I would have to un-select one by one, because all actors are listed there, including those I want to keep...

I also tried using the Wizard ('Edit Search'), but there is no option to combine the 'Actors' field with the modifier 'Limit number to'...  Is there a way (e.g. database expression) to filter a view for 'one-film-only' actors, so then I can simply clear the actors field in Tag Editor, without affecting the other entries?

Looking forward to your helpful ideas! Thanks ahead ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: glynor on March 03, 2021, 07:50:22 pm
This is definitely possible using a smartlist to filter a View. I've explained similar functionality before in a few different places. Read this post: https://yabb.jriver.com/interact/index.php/topic,127718.msg886526.html#msg886526

Particularly the part at the bottom about the One-Hit Wonder Remover smartlist (though the entire thread may be illustrative).
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 03, 2021, 08:31:06 pm
This is definitely possible using a smartlist to filter a View. I've explained similar functionality before in a few different places. Read this post: https://yabb.jriver.com/interact/index.php/topic,127718.msg886526.html#msg886526

Hi, thanks for your input! So, I have now tested this filter "~limit=-1,1,[Actor]", added under 'Search > Modify > Limit (advanced)', but it doesn't have the desired effect... I'm not sure what this expression does exactly, but the result are both actors with one or more titles to their name...

It seems that my particular usage case is not covered by the expression language as such... Quite sure there is no other way?
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: glynor on March 04, 2021, 07:39:27 am
Nope. That's not what you want to do. You need a separate smartlist with the ~limit rule. I explain why here:
Make a separate smartlist called "One Track Artist Remover" (or whatever you want, but that's what mine is called). You won't actually use this List for anything other than "filtering" so you might want to bury it in a "utility" Playlist Group (mine are in Utility\View Filters\ under Playlists). Give it this Search:
Code: [Select]
[Media Type]=[Audio] [Media Sub Type]=[],[Music] ~limit=-1,1,[Artist] ~sort=[Artist]
That makes a list of all Artists in your Library, with one randomly-selected track per Artist. Here's the beauty part: If you only have one track for a particular Artist, then that will be the track "selected" for that Artist (the ~limit won't be random in that case, it'll select the only one there is).

So, in your case, the smartlist rule would be something like:
Code: [Select]
[Media Type]=[Video] [Media Sub Type]=[Movie] ~limit=-1,1,[Actor] ~sort=[Actor]
That will make a list of movies with one movie from each Actor you have in your Library (and only one). If you have multiple movies with the same Actor, it will randomly pick one. But if you have only one movie with a particular Actor, it will pick that one (it won't be random, there can only be one).

Then, back in your View, you remove the files contained in that smartlist you just made (eliminating all of those files): -p=Path\to\your\smartlist

Then, lastly, in the View, you add ~expand=Actor to the end. This will add back in the "random" files the ~limit removed (the files where the Actors have more than one result) while leaving out those for which there were only one result (because they are no longer in the list at all for ~expand to act upon them). Leaving you with a View that shows only Actors for which there are at least 2 results.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 04, 2021, 08:20:05 am
Glynor, I don't think that works. [Actors] is a list, and it seems ~limit treats it as a full string so it only eliminates entries with the same exact list of Actors.

Getting a list of Actors that are only on one movie is doable with a Categories View using an Expression group:
Expression to group by = [Actors]
Expression to Display = GroupCount() - [Actors, 1]
Sorting: Number of Files

Then you can also adjust the Thumbnail Text on that view to "groupCount() - [Name]".

Removing those 1-movie Actors though... tricky. Maybe doable with a complex Expression using GroupCountQuery(). (nope)
And what about cases where the movie has a single Actor listed? I have a few tens of those, mostly Documentaries and Animated shorts.

Title: Re: Database Experts: Remove Actors With Only One Title
Post by: glynor on March 04, 2021, 08:44:35 am
It works fine on [Artist] which is also list type (it was basically designed for [Artist] originally). Are you sure?
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 04, 2021, 09:15:21 am
The smartlist you gave lists almost all my files, so the View filter (-p=smartlist ~expand=Actors) returns only 90 files or so.
But with the View grouped by Artist, I can see that about 60% or the artists are on a single movie (thousands).

There's another problem with this approach: I have some foreign movies where ALL actors are just on that movie. So removing them doesn't make sense, would result in the movie having no listed actors.

Quote
That will make a list of movies with one movie from each Actor you have in your Library (and only one). If you have multiple movies with the same Actor, it will randomly pick one.
I actually see multiple movies with same Actor (but different list of actors) on the smartlist results. This probably happens because:
- movie 1 has Actors A;B;C;D;E - this one gets selected as the limit for A
- movie 2 has Actors A;F;G;H;I - this one gets selected as the limit for F

So both movies will be listed, but both movies have A.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: glynor on March 04, 2021, 02:09:02 pm
Hmmm. It must operate differently on [Actors] than it does on [Artist]. I'll test it myself later tonight to see if I can reproduce it.

There's another problem with this approach: I have some foreign movies where ALL actors are just on that movie. So removing them doesn't make sense, would result in the movie having no listed actors.
I actually see multiple movies with same Actor (but different list of actors) on the smartlist results. This probably happens because:
- movie 1 has Actors A;B;C;D;E - this one gets selected as the limit for A
- movie 2 has Actors A;F;G;H;I - this one gets selected as the limit for F

This shouldn't, if ~limit works correctly with list-type fields, matter. The whole idea is to eliminate ALL instances of a particular person. And then when you ~expand on the list in your View, it won't expand those people (and the ~expand will fix everything else). The contents of the "filter smartlist" don't matter, so long as they include the one matching file with that particular person in it.

But, if ~limit really doesn't work right with list-type fields, then it would get all screwed up. Like I said, it works okay on my library and I use it extensively with [Artist]. But [Artist] is special. (Or multi-artists are so infrequent in my library, though not that infrequent, that it hasn't previously interfered with my usage of the trick anyway.)

If anyone from JRiver is looking at this, could you comment if ~limit does, or is supposed to, work on list-type fields properly?
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 04, 2021, 02:43:56 pm
Many thanks to you both! I have tried Glynor's "~limit=-1,1,[Actor]" scheme once more, but (much like yesterday) the smartlist returns almost all movie files, not 'one-title-only' actors (obviously, for a list can return only titles, not names etc... ;-)

This can't work, because I'm looking for the opposite -- that is "Actors with 1 Title only", NOT "Titles with 1 Actor only", with 'Actor/Artist' being the same list types... In plain words, my search would be sth like this (please translate into MC's expression language ;-):

"Titles with Actors who have only 1 Title to their name"

Zybex's suggestion is similar to what I tried already, using the 'Actor' category, sorted by number of titles (or sort the column that way, see 1st post) -- but either way lets me remove actors from results one by one only, not all in a batch... Whether in Tag Editor or via 'column tagging', to de-select thousands of entries manually would just take me too long, and there is no menu option to untick all selected actors...
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 04, 2021, 03:22:44 pm
Edit: Back in my View, I tried to follow Glynor's idea, with the resulting search expression:

"-playlistid==1052090937 ~expand=[Darsteller/in]"

Where the 'playlist id' points to the new smartlist "Darsteller/in" (sth like 'bi-gendered' German for English "actor/esses" ;-), created using the "~limit=-1,1,[Actor]" expression...

But again, the result is listing all movie files... I think the issue lies with the basic difference that each file can have only 1 'Title' value, but multiple 'Actor' values...
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 04, 2021, 04:36:07 pm
You'll need to manipulate it outside of MC, either via a script or Excel (plus SWOT to re-import the data)
A 20-line 40-line VBA function in Excel can do it, if you feel your life doesn't have enough pain already ;D

Edit: VBA works ;)

Code: [Select]
Sub countUniqueActors()
    Dim name As String
    Dim Names() As String
    Dim cel As Range, all As Range
    Set d = CreateObject("Scripting.Dictionary")
    lastRow = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
   
    AllowZeroActors = False     'change to True to allow removing all actors from a movie (if they're all unique)
    ListRemovedActors = False   'change to True to write the removed actors on the next column (overwrites existing data there!)
   
    Set all = Application.Selection
    If all.Cells.count < 2 Then
        MsgBox ("Please select a range of cells")
    Else
        ' phase 1 - count each actor occurences
        For Each cel In all.Cells
            If cel.Row > lastRow Then Exit For
            If cel.Value <> "Actors" And Trim(cel.Value & vbNullString) <> vbNullString Then
                Names = Split(cel.Value, ";")
                For i = LBound(Names()) To UBound(Names())
                    name = LCase(Trim(Names(i)))
                    count = d(name)
                    d(name) = count + 1
                Next
            End If
        Next
       
        'count unique items in dictionary
        once = 0
        For Each n In d.Keys
            If d(n) = 1 Then once = once + 1
        Next
       
        'phase 2 - cleanup unique actors, except if all actors in a movie are unique
        If vbYes = MsgBox(Str(d.count) & " actors, " & Str(once) & " seen only once." & vbCrLf & vbCrLf & "Do you want to Cleanup?", vbYesNo) Then
            For Each cel In all.Cells
                If cel.Row > lastRow Then Exit For
                If cel.Value = "Actors" And ListRemovedActors Then cel.Cells(1, 2).Value = "Removed"
                If cel.Value <> "Actors" And Trim(cel.Value & vbNullString) <> vbNullString Then
                    newval = ""
                    Names = Split(cel.Value, ";")
                    removed = ""
                    For i = LBound(Names()) To UBound(Names())
                        name = LCase(Trim(Names(i)))
                        If d(name) > 1 Then
                            newval = newval & "; " & Trim(Names(i))
                        Else
                            removed = removed & "; " & Trim(Names(i))
                        End If
                    Next
                    newval = Trim(Mid(newval, 3, Len(newval)))
                    removed = Trim(Mid(removed, 3, Len(removed)))
                    If (AllowZeroActors Or newval <> "") And newval <> cel.Value Then cel.Value = newval Else removed = ""
                    If ListRemovedActors Then cel.Cells(1, 2).Value = removed
                End If
            Next
            MsgBox ("Done!")
        End If
    End If
End Sub
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 04, 2021, 05:20:01 pm
Million thanks @ zybex for all that labour... Not sure if I will go to such extremes (the VBA code looks daunting... ;-)

So how to apply the Excel function? I guess the first steps are like this:


By the way, there IS a major difference between the 'Artist' and 'Actor' fields; while both are the 'semicolon delimited list' type, the input type for 'Artist' is 'Standard', for 'Actor' it is 'List'... As a result (see prev. post), each file/title can have only 1 artist, but multiple actors to it!

Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 04, 2021, 05:27:35 pm
No need for Views or Smartlists.
- Just open any View in Details mode (or Video->Files), make sure the Actors column is visible, CTRL+A to select all, CTRL+C to copy.
- Open Excel, CTRL+V to paste. Select all cells from the Actors column (do NOT select the entire column or else the code will have to check 1 million rows! Code needs fixing to prevent that)
- ALT+F11 to open the VBA editor, double-click on This Workbook, paste the code.
- Press PLAY on the VBA Editor toolbar

That should clean up the names in the Actors column... but now you have the problem of putting it back into MC. Bulk copy/paste doesn't work from Excel to MC, so you'll have to use SWOT/Fiddler or something like that. as Wer says below, you can just paste back the column into MC.

Instructions:
https://yabb.jriver.com/interact/index.php/topic,106802.msg742297.html#msg742297
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: wer on March 04, 2021, 05:51:12 pm
... but now you have the problem of putting it back into MC. Bulk copy/paste doesn't work from Excel to MC, so you'll have to use SWOT/Fiddler or something like that.

Pasting from Excel into MC works fine, but you can only paste one tag at a time.

So you'd have to select the cells (in a column) that comprise your Actors field (don't select the header row), and when you do a paste tags, check only the Actors field.

The number of cells in the clipboard must exactly match the number of files selected in MC.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 04, 2021, 06:47:39 pm
So you'd have to select the cells (in a column) that comprise your Actors field (don't select the header row), and when you do a paste tags, check only the Actors field.
The number of cells in the clipboard must exactly match the number of files selected in MC.

Thanks @ wer, I might give that a shot, once I understand what you mean by "paste tags, check only the Actors field", how does that go in MC?

And by the way, the resulting Excel cells will never match the number of files I first selected in MC -- there will be thousands less once I've removed the 'one-film' actors (which was the overall idea... ;-)

Or let me know if I got anything wrong -- many thanks again for all your effort!
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: wer on March 04, 2021, 07:20:02 pm
Thanks @ wer, I might give that a shot, once I understand what you mean by "paste tags, check only the Actors field", how does that go in MC?
When confronted with new concepts in MC, a good idea is to google "jriver feature name".  :)  "jriver paste tags" in this case.

"Paste tags" is one of the edit commands on the right click menu. I'm sure you'll find it if you look. It has a dialog when invoked, which will explain the rest of my comment.
https://yabb.jriver.com/interact/index.php?topic=71801.0

And by the way, the resulting Excel cells will never match the number of files I first selected in MC -- there will be thousands less once I've removed the 'one-film' actors (which was the overall idea... ;-)
Wrong.  You're not thinking about what you're actually doing.  You're not deleting files, you're modifying fields (namely [Actors]) for a set of files.  There is one Actors cell in each row, and one row for each file.  So the number of Actors cells present is exactly equal to the number of files you copied from MC.  And the number of cells you COPY FROM EXCEL must exactly match the number of files you select in MC when you do the PASTE INTO MC.


You're going to select x number of files in MC, and paste those tags into Excel.  So you have x rows of data in Excel to edit, right?  Then you edit them.

You will have then modified SOME fields in Excel, either manually or by using the vba Zybex generously gave you.

So you now have a choice: copy ALL the rows back into MC, including the unmodified ones, or copied only the modified ones.  Right?

So you select a certain number of cells, containing the [Actors] data you want to copy back to MC.  You hit Ctrl-C to copy.

You must then select the corresponding files in MC. The exact same files, in the exact same order. The exact same number of files. And when you have selected these files, you do a Paste Tags.

So to be even more specific, if you select 1000 files and copy their data to Excel, you will have 1000 rows in Excel.  Say you modify 100 fields, deleting one actor from each one.

So are you going to copy back only the 100 files you modified, or all 1000?  The number of files/cells you copy from excel must match the number of files you select when you paste into MC.  It's very straightforward. 

Make sense?
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 04, 2021, 07:37:44 pm
Of course, I forgot that cells in Excel will only be changed (or cleared in some cases) but not deleted, so the overall number stays the same.
This resolves my latest comment, so I'll have a go at it and post the result here. Thank you so much!
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 05, 2021, 02:29:32 am
Thanks Wer, I forgot about that feature.

Andrew, make sure you backup the database before you mess it up ;)
You have to do it all in one go, not in chunks, or else the script will see names as unique when in fact they're also used elsewhere. Just select all files in MC, copy to excel, do the script thing, and copy back the whole Actors column (without header) into MC. Then check the first, last, and a few in the middle to make sure the paste was not misaligned.

The script will not clear any cell. There's a check there: if all actors in a given cell are unique, it won't remove them. This is to prevent movies with no actors.
I added a couple of vars that you can change at the top:
Code: [Select]
    AllowZeroActors = False     'change to True to allow removing all actors from a movie (if they're all unique)
    ListRemovedActors = False   'change to True to write the removed actors on the next column (overwrites existing data there!)

Fix: The VBA now checks what's the last used row to prevent going all the way to 1 million rows.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: wer on March 05, 2021, 03:09:10 am
Thanks Wer, I forgot about that feature.
That's ok, there are so many features, forgetting about them seems almost obligatory.

Fix: The VBA now checks what's the last used row to prevent going all the way to 1 million rows.
And now you have to edit your post again to reflect that the code is now 20 40 50 lines.  Which will be a lesson to you not to write code for people when they want to attempt stuff like this! I leave those as "an exercise for the reader".  You're such a softie. ;D


Andrew, it's a good idea to back up the database, as Zybex says, since you are new to this.  So I should point out to you that the paste tags of the data back into MC is risky, if you're not careful.

There is no error checking done on the paste tags, other than checking that the number of items in the clipboard match the number of files selected in MC.  The contents of the clipboard are pasted "as is", in the order they appear in the clipboard.

This means it is absolutely essential that you select the correct files, and that you do nothing to change the order of those files in the view, between the time of the original copy out and the paste tags back into MC.  If you were to change the order of the files before you do the paste, like by clicking a sort header, then the files will be out of order relative to the contents of your clipboard.  And when you paste tags, the contents of those cells will be scrambled.  There is no way for you to detect such a mistake, other than to know what the contents should be. 

If you're afraid, you can create a new field, Actors2, and paste into that.  You can then visually compare Actors2 to Actors, and if satisfied, paste into Actors, or copy Actors2 into Actors.

It's not difficult if you're careful, but if you're not careful, you can shoot yourself in the foot.  Anyway, you've been warned.  :)  Good luck!
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 05, 2021, 03:34:45 am
This done, I still find this an awful idea. I tested on my collection and checked the Removed names... there are some there that I would like to keep on any search, even though I have only one movie with them.
Also, many movies suffer from the Big Star effect: there's one known guy like Daniel Craig plus a bunch of unknowns - result: only Daniel Craig remains.

I think you can consider another approach: create a field called [Lead Actors] and fill it with just the first one or two from [Actors] (usually the list is in order of importance). Then use [Lead Actors] in search/views instead of [Actors].

You can simply define a Computed field [Lead Actors] = ListLimit([Actors],2)

Even this is not ideal, as there are some movies that are just too shiny... too many stars.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: wer on March 05, 2021, 03:43:31 am
The problem is it's not really about 1-movie actors, it's "populate the Actors field only with Actors I care about."

Since no db is going to do that, it's a manual process.  And what happens if he ever uses MCR to update his movies again, and it pulls new data from the database?  Oops!

So yeah, I don't see a long term positive outlook for this endeavor.  Which is why I was content to let you and Glynor chase it.  ;)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 05, 2021, 04:00:37 am
Example: Dancer in the Dark (https://www.imdb.com/title/tt0168629/)
Actors: Björk, Catherine Deneuve; David Morse; Peter Stormare; Joel Grey
after script: Catherine Deneuve; David Morse; Peter Stormare; Joel Grey

It takes out the lead actor... unless you happen to have other Music Videos with her.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: lepa on March 05, 2021, 04:03:10 am
What wer said..
I tried to achieve this also many years to go. My conclusion was that relational db would be needed to reasonable achieve this. Maybe there are more clever heads now here who can figure this out with what MC got.

Hard deleting actors with script also causes problems with new "stars". Everybody needs to start with first role and get deleted by script :D
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: wer on March 05, 2021, 04:08:27 am
There are lots of actors who were the main star of their big movie, but you'd only have one of their movies in your collection: Anthony Perkins, Marlee Matlin, Linda Blair, Paul Hogan, George Lazenby, etc etc.  Imagine taking them out of the credits for those movies...
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: lepa on March 05, 2021, 04:11:10 am
So you only have Crocodile Dundee in Los Angeles  8)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 05, 2021, 04:14:06 am
Well, I would remove Anthony Perkins, that guy is a psycho.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: glynor on March 05, 2021, 09:43:25 am
I just got back to this and a lot has happened. I didn't get to test my original idea last night (which now seems like, from skimming the thread, that it wouldn't have actually helped the OP at all anyway) because I found a hard drive dead and was spending hours and hours in fruitless data recovery efforts.

In any case, I just tested it now, and zybex is right. ~limit does NOT seem to be working "correctly" with [Actors] (and probably other List-Type fields). It uses the full string, and not the individual list-type entries (which is really stinky and hopefully they can fix that).

I was able to do exactly the thing I described, and it "worked" but because ~limit doesn't consider each list-type entry separately properly, my resulting View was tiny and only contained a handful of files which had exactly-matching [Actors] lists (multiple copies of the same movie mostly, like 3D and non-3D versions, different editions of Star Wars, etc).

I will note: The reason you were getting huge results with nearly all of the entries in your Library is because EMPTY matches any other EMPTY result when you do an ~expand. Pretty much any time you use ~expand you MUST first filter out -[Field]=[] before the expand, or else it will match ALL other files (even music tracks and photos and all kinds of other crazy stuff) which have NO entry in the given field.

I think you've all moved beyond this, but it is very interesting to know that this (otherwise extremely useful ~limit in a Smartlist, then Expand in a View trick) doesn't seem to work right with List-Type fields. I also wonder now if my existing One-Hit Wonder Detector lists would not work properly with multi-artist tracks. Probably not, though they're probably rare enough in my Library (and rarer still that they're the only track rated highly) that it doesn't substantially impact my results. I also generally do that trick using my [Artist Album (Smart)]* instead of using [Artist] directly so that probably saves me in this instance.

* Which is my version of [Artist Album (Auto)] which never results in "various" and always just spits out the first listed [Artist] instead.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 05, 2021, 12:49:49 pm
Wow, I'm impressed what you guys all come up with... I have tried the VB script last night, but because I'm not that dumb first renamed my German column ('Darsteller/in', not found in your English speaking script... ;-) into 'Actor'... I wonder, should this be singular, or plural 'Actors' as per script? Pls advise... 

Anyway I used singular, the script ran as desired, and within seconds returned the "Want to Cleanup?" (forget how many it found) and "Done" messages. However, I spotted some flaws, line breaks etc in some actors' fields, so will go fix these first, then run the script again...

Not toooo worried about that, now that I know how it works... ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 05, 2021, 01:57:56 pm
- result: only Daniel Craig remains.

Gosh, we wouldn't wanna have that...! ;-)

Quote
You can simply define a Computed field [Lead Actors] = ListLimit([Actors],2)

I like this idea -- for what I really need the removal effect is less within MC (don't mind the number of actors there at all, plus they're all backed in the description field for searching). No, the original idea was to slim the amount for my DNLA views, where I might occasionally search for movies by actors, A to Z...

The problem is, my device (network TV) can only display up to 1,008 items (63 pages at 16 each), so with +10,000 entries altogether I never get to see the full database, which is pretty lousy...

Do you think that "[Actors] = ListLimit([Actors],2)" (with '2' or a higher number) could be used to narrow the database sent to DLNA so I get to browse the full A - Z ? In other words, how to make a filter "actors with at least 2+ movies" for a media network view?

As always, thanks very much ahead for all your help ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 05, 2021, 02:11:46 pm
~limit does NOT seem to be working "correctly" with [Actors] (and probably other List-Type fields). It uses the full string, and not the individual list-type entries (which is really stinky and hopefully they can fix that).

@ Glynor -- have you noticed my earlier post, saying that:
 
... there IS a major difference between the 'Artist' and 'Actor' fields; while both are the 'semicolon delimited list' type, the input type for 'Artist' is 'Standard', for 'Actor' it is 'List'...

Album artists are also 'list input', so a result, each file/title can have only 1 artist to it, but a limitless number of actors! That should make a difference when using your trick... ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 05, 2021, 02:16:56 pm
Quote
Do you think that "[Actors] = ListLimit([Actors],2)" (with '2' or a higher number) could be used to narrow the database sent to DLNA so I get to browse the full A - Z ? In other words, how to make a filter "actors with at least 2+ movies" for a media network view?
Nothing like trying! It will certainly narrow it down, even if you have to limit it to just 1 lead actor per movie.

Quote
As a result, each file/title can have only 1 artist to it, but a limitless number of actors! ;-)
No, you can still have multiple artists, just separate them with ";" manually. The Input Type only controls the UI behavior - with List you get a dropdown of known values with checkboxes, and with Standard you don't - but if the Field Type is List, then it's handled as a List internally.

Quote
In other words, how to make a filter "actors with at least 2+ movies" for a media network view?
This was your original request.
Why not connect an HTPC to your TV and run an MC client on it? :-) DLNA for movies kind of sucks on TVs.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 05, 2021, 02:42:27 pm
I see, thanks... In terms of "[Actors] = ListLimit([Actors],2)", can I use th English expression as well, although my UI is set to German? I'm afraid when using my "Darsteller/in" field, the slash might cause odd results...

I have my TV and laptop PC connected both via HDMI and LAN cable, but prefer to watch movies via LAN (DLNA), because the TV has a much stronger graphics card than my laptop PC has... So watching via HDMI would 1) put all rendering load on my laptop, and 2) not allow me to use the TV's remote control, which is very handy while using the PC for other stuff, such as this forum... ;-)

Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 05, 2021, 02:58:05 pm
You can use the field's Name or the Display name on expressions. MC recognizes both.
You can change the Display Name to whatever you like.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 05, 2021, 03:31:31 pm
That is great to know, thank you! So will create such a filter and come back later with results... ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 05, 2021, 06:12:17 pm
So here we are...

1) The VB Excel script worked fine as before (~6,300 actors out of 10,300 removed, not bad... ;-); but my first attempt to paste the edited cells back into MC failed. I used Ctrl+V on the very same list, with the exact same selection I had just copied (~4,340 rows), but there was no change, no message, nothing happened at all... What has gone wrong?

2) Unfortunately, the other idea to use the "[Actors] = ListLimit([Actors],2)" on a DLNA view failed as well... The expression was not recognized, but transformed into multiple custom fields... My mistake, for you meant to create a 'computed field' using that expression -- but what will that field do?

Sorry for having to ask your advise again...
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: wer on March 05, 2021, 07:06:38 pm
I used Ctrl+V on the very same list, with the exact same selection I had just copied (~4,340 rows), but there was no change, no message, nothing happened at all... What has gone wrong?

What went wrong is you didn't pay attention to my post about Paste Tags. :)  Please go back and read it.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 05, 2021, 08:00:46 pm
"Paste tags" is one of the edit commands on the right click menu. I'm sure you'll find it if you look. It has a dialog when invoked, which will explain the rest of my comment.

https://yabb.jriver.com/interact/index.php?topic=71801.0

Well, I did use the right click menu Edit > Paste (which is equal to Ctrl+V as far as I know), but in the topic you llinked above it says the feature is invoked by 'Ctrl+SHIFT+V' -- this bit of information was missed in your comment... ;-)

But never mind, I realize that I don't really wish to reduce the number of actors within the library, but only in my media network views (as far as actors based ;-). Sorry I hadn't thought of that in the first place...

This being said, can we look instead how to filter the "one-title-only-actors" from my media network views? That would be the perfect solution... Zybex had made a suggestion, but I don't understand how it works...



Title: Re: Database Experts: Remove Actors With Only One Title
Post by: wer on March 05, 2021, 08:35:09 pm
Well, I did use the right click menu Edit > Paste (which is equal to Ctrl+V as far as I know), but in the topic you llinked above it says the feature is invoked by 'Ctrl+SHIFT+V' -- this bit of information was missed in your comment... ;-)

No, there was no "bit of information" missing from my comment.   :)  What was missing was you paying attention.  Learning how to do more advanced things can be difficult, so paying attention is important. Look at the quote you yourself just referenced in your post:

"Paste tags" is one of the edit commands on the right click menu. I'm sure you'll find it if you look. It has a dialog when invoked, which will explain the rest of my comment.

"Paste tags" is one of the edit commands on the right click menu. I'm sure you'll find it if you look.

I repeatedly said to do a "Paste Tags".  But instead you decided to do a "Paste".  And this after you asked what "paste tags" was, because you obviously thought it was different from a regular "paste".

I honestly don't know how much more explicit I could have been. If you had your eyes open when you looked at the "edit commands on the right click menu" you would have seen what's highlighted in the screenshot below, exactly as I described it.  :)  Now with this change in direction, it's too bad Zybex wasted his time doing that code. I'm going to pass on the DLNA view adventure.  I'm sorry our attempts to help weren't successful.  Good luck.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 06, 2021, 03:30:00 am
Doh, now you've annoyed Wer  ::)

VBA code effort is still worth it, as it can be used for other tasks in the future.

Andrew, I don't know where DLNA gets the list of actors from. It could be sent directly by MC in response to some DLNA request, or the TV is just pulling all files with metadata and building the list itself - I don't know how that works. Either way, I think it's likely that the "Actors" field is special, and putting a smaller Actor list in some other field will just probably get ignored by the TV. You'll have to do some tests (or research) to figure out where the names are coming from, and then see what can be done to limit the list.

As for the ListLimit(): create a new calculated Field called "Lead Actors" with Expression set to "ListLimit([Actors],2)". The English names of fields should still work.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 06:31:05 am
Hi guys, I just discovered why the 'Paste Tags' command was not found in my Edit context menu -- for whatever reason the item is disabled (greyed out, barely visible) in my 25.0.10 version of MC... and Ctrl+Shift+V won't work either... Bad luck, so sorry @ wer, maybe I should wear stronger glasses at night... ;-)

Any idea how to enable that command? It IS there, so should be made available somehow...

But thanks @ Zybex for illustrating the specific expression, and where to put it, for the new 'lead actors' field! That was the kind of thing I had looked for all along, hope it does the trick for my actors-based network views...

Will test that and report later today! ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 06, 2021, 06:35:34 am
It's not available on Thumbnail view. You need to change the List Style to "Details" on the View/Playlist (to view it as text columns)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: JimH on March 06, 2021, 07:04:55 am
Hi guys, I just discovered why the 'Paste Tags' command was not found in my Edit context menu -- for whatever reason the item is disabled (greyed out, barely visible) in my 25.0.10 version of MC... and Ctrl+Shift+V won't work either... Bad luck, so sorry @ wer, maybe I should wear stronger glasses at night... ;-)
25.0.10 is a very old version.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 07:10:22 am
It's not available on Thumbnail view. You need to change the List Style to "Details" on the View/Playlist (to view it as text columns)

+ "It's greyed out if you're viewing a Smartlist or Playlist. It's available if you're on a View." (as per notifiy email)

Talking about a regular view, no play/smartlist, display style is 'Details', but bloody menu item still greyed out...

Never mind that for now, should the 'lead actors' trick work out, then I'm set... ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 07:14:54 am
25.0.10 is a very old version.

True, that's why it suits me... ;-) I stick to it for two reasons: a) It is the last version before media network settings were updated in a way that broke my random sorted views (discussed in another thread); and b) because I'm not using MC for television or streaming at all, which is what most newer versions are all about, so... ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 06, 2021, 07:15:33 am
Try selecting 1 or more files first.
You're on v25.0.10, but there's v25.0.115 available, with MANY bug fixes since build 10. And, we're up to v27 now... even more fixes. It something doesn't work for you on your current version, there's nothing we can do.

https://wiki.jriver.com/index.php/Release_Notes_MC25
https://wiki.jriver.com/index.php/Release_Notes_MC26
https://wiki.jriver.com/index.php/Release_Notes_MC27
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 07:20:13 am
Try selecting 1 or more files first.

Obviously, always tried on the exact selection, in the exact same order etc etc...
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 08:34:17 am
Ooops, "Topic moved" -- glad I didn't give away my 'very old' version too soon... (not deemed necessary as my first questions were not version related, or so I thought, which is also why I posted in the latest forum... ;-)

In terms of updating, I keep following MC's development, reading about new features etc, so will eventually buy once there is a feature I need... ;-)

On another note, I may have found why the 'Paste Tags' item is disabled. On the "Tagging Mode" wiki page, it says "Select a View Scheme in the tree (you must select the Parent, not Child of the Scheme)."
In fact, my testing view was nested in another -- so even while not in (column) tagging mode, this may have blocked tag pasting... (some things ain't what they really seem... ;-)

Will try moving the view to repeat the process... and post results for any one still interested... Thank you! ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 11:49:55 am
Sorry to say, but nothing works...

Approach #1 -- The expression ListLimit([Darsteller/in],2) (with 'Actors' replaced by my custom* German name) has reduced the total number of actors "by 4" (from 10,386 to 10,382). Not the desired effect...
* I'm not using the original actors field because MC will display all of its entries in the title hover preview ('description'), making it too large in some cases... one of the many details we have not yet considered...

Approach #2 -- As for pasting of tags, I have moved my 'testing view' to the parent 'Video' branch of the tree. This view is 'file list' based only, has NO categories, and only my custom "Darsteller/in" column visible. Yet the 'Paste Tags' menu item remains greyed out (disabled).

I would be happy for either of the two issues to find a solution -- no matter which as both aim for the same goal... ;-)

Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 06, 2021, 12:36:08 pm
Andrew, I mentioned the DLNA issue already. You have lists of actors in several fields - Actors, Darsteller, Lead Actors, whatever. Now, how do you know which one of those fields is displayed by the TV? ListLimit() is creating a shorter list of actors, and then placing it on a separate field; but... why would the TV see that field automagically? It doesn't work like that. I would expect the TV to display the contents of the hardcoded [Actors] field, not anything else. Certainly not any non-standard field. So unless you're willing to do proper tests, this won't go any further. I suggest you create a blank database, add 5 or 10 movies, and play around with the Actors to see exactly what is reflected on the TV view.

As for #2, pasting tags, no one here will there's no point wasting time trying to find out why that doesn't work on v25. At least try upgrading to the latest available v25 version.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 01:32:17 pm
Now, how do you know which one of those fields is displayed by the TV? ... why would the TV see that field automagically? It doesn't work like that. I would expect the TV to display the contents of the hardcoded [Actors] field, not anything else. Certainly not any non-standard field.

(...)

As for #2, pasting tags, no one here will waste time trying to find out why that doesn't work on v25.

Outch, that hurt... I can't believe you've never used the media network options of MC? But no problem, you've helped me along, so I'm happy to tell you: In MC's options, if you click the tab 'Media Network', then "Add or configure DLNA servers" and "Customize views", you will find the very same ways to create views as you do within MC. You can even import existing library views, and change them in every way possible. There is nothing 'hard coded' at all, they use the exact same search & filter wizard like your regular MC views. (Default views are already set up for DLNA, and under 'Advanced > Customize views for JRemote/Panel/MCWS', respectively.)

In terms of #2, what if I asked you, "how does it work in the latest version?" instead? (Sorry, trying to be smart again... Honest, I didn't know that older versions are excluded from 'Is this support'... ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 01:44:18 pm
At least try upgrading to the latest available v25 version.

I had explained a bit earlier today why I'm sticking to that perticular version: The next build had introduced some 'auto update' function for network views which messed up my random sorting for movies. (A feature I use extensively, can provide more details if you like.. ;-)
The second reason is that I'm not using MC for television or streaming; and don't see why anyone would, because one is available with the player/recorder software you get with most any TV card or stick, and the other by your preferred browser... That's just toys to attract a larger audience... ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 06, 2021, 02:04:14 pm
AH, this goes to show you we're all idiots in some area  ;D
Yep, I don't use DLNA at all. Last time I tried it was 5 or 10 years ago (not with MC) and it sucked. I just use an HTPC connected to the TV.

Anyway, sounds like there are plenty of options to control what you get on the TV. You just need to explore them and find out what works.

The Paste tags command... it's just there, enabled, and it works. I don't know why it's not active for you on v25 - could be a bug, or maybe it's not detecting what it expects on the Clipboard. Check immediately after you Copy the tags - is it active then?

There may be a number of bugs affecting this that have already been fixed in the 300 or so builds after the one you have. Even if you're not willing to upgrade to v27, you should really update to v25.0.115. Maybe try a separate install just to test things, and then revert back to your current version if you find it still doesn't work for you.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 02:47:40 pm
No problem, I'm just as ignorant about stuff like streaming, HTPC (for 'Home Theatre' isn't it?) and many more... ;-)

Great idea to test the feature right after copying from MC -- 'Paste tags' was right there! So it must be related to the clipboard and/or data format... I have used MS Office Excel version 2003 (with macros disabled), what would that tell you?
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 06, 2021, 03:10:35 pm
It should work...but you could try a more recent version of MSOffice or LibreOffice - maybe the clipboard object format is different.

Try copying with and without column headers; try copying just 1 column, with and without header; make sure you're just copying the exact same number of movies that are selected in MC; try copying all columns (as many as are on MC's view); Try copying just 1 cell or 1 row, and select just 1 movie in MC;

For each test, check if the Paste Tags option is now available.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: wer on March 06, 2021, 03:21:55 pm
https://yabb.jriver.com/interact/index.php/topic,128796.msg894028.html#msg894028
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 03:34:30 pm
Try copying with and without column headers; try copying just 1 column, with and without header; make sure you're just copying the exact same number of movies that are selected in MC; try copying all columns (as many as are on MC's view); Try copying just 1 cell or 1 row, and select just 1 movie in MC; (...)

All options tested one by one, but no pasting tags function available...

Will start all over again, make a new view, then come back with screenshots... maybe that helps to visualize what I'm doing... ;-) Thank you guys!
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 06, 2021, 05:04:27 pm
OK, here we are...

-- The first screenshot shows my Excel cells selected and copied for testing: 10 rows / 3 columns; the dotted outline ('marching ants') indicates the cells are in the clipboard.

-- The second screenshot, taken a few seconds later, shows the MC main window (UI language in English) with the open context menu on the same selection of files -- 10 rows / 3 columns:
#1 for 'Title', #2 for 'Darsteller/in' (= Actors), and #3 for 'Darsteller (red.)'; col. #3 is meant for the 'reduced' list, once it's been edited by VBA in Excel... As you can see, the 'Paste Tags' command is there, but still inactive...

 - The 'action' pane on top has some movie specific columns, including my German custom 'Actor' fields that are also visible in the file pane.
 - The navigation tree shows the current view called 'Actor' sitting directly (by level) under the 'Video' branch.
 - The view scheme is "[Media Sub Type]=[Movie] -[Darsteller/in]=[] ~sort=[Date (year)]"

What do you make of it? Please advise what could be wrong, or else to try...

(Note @ zybex -- a peek at your profile told me you're located in Frankfurt, Germany -- nice surprise, which language do you speak natively? ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 07, 2021, 02:55:16 am
Try it on a Playlist instead of a View. If it still doesn't work, try Office 2019 or LibreOffice. It's likely the issue is the clipboard format. The command in MC27 is almost always available, regardless of what's on clipboard (unless it's an image)... so there was probably a fix at some point.

I'm Portuguese, and my German still sucks. I can understand it, but speaking/writing is a whole different matter. I can order an Hefeweizen though ;)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: marko on March 07, 2021, 03:48:07 am
You're going to make wer cross again...
Pasting from Excel into MC works fine, but you can only paste one tag at a time.

So you'd have to select the cells (in a column) that comprise your Actors field (don't select the header row), and when you do a paste tags, check only the Actors field.

The number of cells in the clipboard must exactly match the number of files selected in MC.
So, if I understand that correctly, you should only be copying one column of data (without the header) from excel?

Other than that, maybe it's a language thing... If the "one tag at a time" instruction still says "No", try switching your language in MC to English and see if it works then...

-marko
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 07, 2021, 09:19:58 am
What else to say -- I have tried every way possible to paste tags from Excel:

On smartlists, on the top level 'Video' view, selecting, copy & pasting multiple and/or single cells and/or columns at a time (note @ wer...!), both with and without heading cells -- all options tested in views containing both MC default fields ('Year', 'Title') and/or custom fields ('Darsteller/in'), just in case tag pasting should work on default fields only... still no success! :-(

@ Zybex -- I would rule out the cause of a 'fix made at some point'... What fix would it be when the feature stopped working afterwards? OK, not completely impossible, just unlikely...

@ Marko (who hasn't looked at my beautiful screenshots... ;-) -- I even changed my UI to English... However, would MC be able to detect the language of contents in the clipboard, and block the pasting command (before execution!) if German was detected? Seriously, I don't think so, rule that out.

Nor do I believe Excel 2003 cells are different from other spreadsheet charts; at least their clipboard format should be widely compatible... And yet, since MC's own tags can be copy & pasted in any view (tested), the cells' format seems the most likely cause. (By the way, if it was related to the new Windows 10 clipboard feature for copying / restoring multiple items by 'Win key + V', then MC's own tags wouldn't work either...)

To improve compatibility, I will try saving my Excel sheet in *.CSV format and repeat... Or would any of you know other tag editing software to use?
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 07, 2021, 10:57:33 am
Andrew... you make it hard by not following the suggestions above. All of them have some reasoning behind them.

Fix made at some point: I meant (obviously) a fix added AFTER your version, since that command works fine on the current versions. Since you're unwilling to try new versions, we can't even tell if the problem is MC or Excel.

Changing UI to english is because we are aware of some other weird problems in the past where MC internals was expecting some english string and would not work with other languages. There were a number of fixes for this over time (as the issues were discovered), so maybe this was the case here. Hence Marko's suggestion.

Clipboard object format: no, it's not the same. Data/text/objects in clipboard have a number of different formats; over time, new formats are added to support new features (by Microsoft and others). Also, MSOffice changed its file format since version 2007, and you have an older version which still uses the old formats - so YES, it's extremely likely that Excel 2003 is putting data on the Clipboard using a data format which is no longer common. Since MC was developed after 2007, it's likely that it is expecting the new format. Clipboard is not magic, apps need to speak the same object language to actually transfer between each other (unless it's simple text without formatting, which is not the case here - a table is not text).

Not sure if MC accepts CSV format from the clipboard. Try it. But you'll have to open the CSV in notepad and CTRL+C from there... if you CTRL+C from Excel it's still the same object format.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 07, 2021, 12:02:52 pm
Thank you Zybex, all making good sense...! However, when I copied no headings like 'Title', 'Actors' etc, where could be a language specific issue for MC? I have also tried copy & pasting from .csv (created in Excel), and from Notepad (using the exact same lines from CSV) -- the Paste Tags command remains unavailable.

I would agree with you that MC can detect incompatible clipboard contents, and block it from pasting, but what's incompatible in semicolon delimited text (not comma, as the name 'CSV' suggests for 'Comma Separated Values'... ;-)? Anyway, it gets frustrating to see no success after any option we thought of has been tried...

Let's focus on the second approach instead -- if we get that working right, there is no more need for editing my actors database! ;-) So, in order to use the original string "ListLimit([Actors],2)", avoiding any language conflicts, I have transferred all actors from my custom field to MC's default 'Actors' field.
Now my custom field ('Darsteller (red.)', meaning 'reduced') can use the calculated data from original 'Actors'... However, this returned very odd results, as it simply replaced the string [Actors] with all actors it found in the first matching title, so for example:

"ListLimit[Charles Chaplin; Jackie Coogan; Albert Austin,2)"

Was there a mistake in the syntax? I also noticed the "ListLimit" function is not available under 'Manage Library Fields > Calculated Data > Expressions' in my MC version... Has it been added in a later version only?
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 07, 2021, 12:29:23 pm
Added around 25.0.69:
https://yabb.jriver.com/interact/index.php?topic=121209.0
https://wiki.jriver.com/index.php/Release_Notes_MC25

Have you upgraded MC yet?
Have yo upgraded Excel yet?
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 07, 2021, 12:58:21 pm
Added around 25.0.69:
https://yabb.jriver.com/interact/index.php?topic=121209.0
https://wiki.jriver.com/index.php/Release_Notes_MC25

Have you upgraded MC yet?
Have yo upgraded Excel yet?

Wow, that's interesting -- especially as the function was customized for [Actors] -- and might give me a first reason to upgrade, to answer both questions (Excel upgrade, rather not... ;-)

But before, I would like to reduce my actors-based network views, to only create lists that my TV can handle (1,008 items on 63 pages)... I tried to limit the view to 4+ ratings, but that still returns too many, because it includes all actors for any 4+ rated film, and creates a result for each ;-) There are so many expressions & functions, maybe another will do the trick?

>> If you don't mind have another look at my previous post, edited heavily afterwards... ;-) Thank you!
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 07, 2021, 01:41:16 pm
LibreOffice is free and fully compatible with Office 2019. You don't even have to uninstall 2003.
I have no idea what functions work on v25. You can play around with Zelda (https://yabb.jriver.com/interact/index.php/topic,125975.0.html) to test and find something that works for you.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 07, 2021, 02:29:31 pm
You can play around with Zelda (https://yabb.jriver.com/interact/index.php/topic,125975.0.html) to test and find something that works for you.

Very impressive, so you're a professional developer, not just 'advanced user'... ;-) For my part, to be honest I don't mean to get into MC's expression language too much, but rather use the options available... Knowing what I want, feel free to come up with any idea... ;-)

What I've tried so far: Create a (DLNA) view with my custom field 'Darsteller/in' as category #1, then Edit > Grouping this by '1' to return one result per letter ('A, B, C, etc'). Next I added the same category once more, in order to reduce the total amount of results per category (where each represents one navigation level, displayed on one or more pages on the DLNA browser, depending on length of the result). Thus, the final goal is to shrink that number to a maximum of 63 pages that list all results there are.

The screenshot below shows these configs, and how to get there in MC's options window, just for illustration...
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 07, 2021, 02:58:56 pm
I tried to limit the view to 4+ ratings, but that still returns too many, because it includes all actors for any 4+ rated film, and creates a result for each ;-)

Edit: Just tested this again, and the 4+ rating limits results to an acceptable number (I hadn't browsed to the bottom level earlier ;-) -- so that works for the time being... It won't allow me to browse actors with lower ratings via DLNA -- but then again, when would I ever do that... ;-)
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: zybex on March 07, 2021, 03:29:10 pm
Quote
Knowing what I want, feel free to come up with any idea... ;-)
No, this has gone on long enough. You're not willing to do what it takes anyway, why even ask for ideas? Full stop from me.
Title: Re: Database Experts: Remove Actors With Only One Title
Post by: andrewberg on March 07, 2021, 04:11:06 pm
No, this has gone on long enough. You're not willing to do what it takes anyway,  (...)

Sorry to hear that, and for spoiling your Sunday, so thanks again. You should not feel obliged to answer on weekends (unless you're paid for it... ;-)

Anyway, I enjoyed this discussion, and am quite content with a simple solution -- which is what I expected to find in this forum, not on my own. (I'm on a customer's view in that point, regardless of when I upgrade... ;-)

Edit: Just tested this again, and the 4+ rating limits [Actors] results to an acceptable number (...) -- so that works for the time being...  ;-)

Sometimes "what it takes" is what you already know... ;-) Apologies for not testing enough beforehand...
Title: Re: Advanced Tag Editing: Remove Actors With Only One Title
Post by: andrewberg on March 09, 2021, 03:00:45 pm
Shouldn't have asked for 'database experts' to start with, that moved things to a wrong direction...

All while the solution was THAT simple -- once found out, it only took 3 steps:

 1.) In a column view, filtered to include all files with actors (e.g. by "-[Actors]=[]"), add your [Actors] column, or whatever called in your language, and sort it by 'Number of files' (or click column header > Edit > Sorting).

 2.) Next, scroll the column down to the first actor who has only one film displayed in the file panel below; then continue selecting all entries further down ('Shift + End', or 'Page/Arrow Down' to select individually, Ctrl+Click works too).

 3.) Now press 'F2' on your keyboard to open the first selected entry for renaming, then press 'Delete' or 'Backspace'. This will transfer the new 'empty' value to all items in your selection, thus clear them in this case (quite like renaming in Windows Explorer really ;-).

 Et voila, all one-film-only actors have been removed from your library! (In my case of ~10,000 actors, it took a few moments of background activity to complete... ;-) Note: Should you wish to keep a complete list for backup, create a new field, e.g. [Actors (complete)] or whatever, and copy them all in there before doing the steps above.

I wonder why nobody here, however helpful and interesting some comments were, had thought of this simplest way... Perhaps we're all too obsessed with more new stuff, new versions, new technologies etc to outwit the others to remember the very basics...

(BTW, for entertainment's sake, just been watching 'Rogue Cop' (1954) while writing this -- good old dressman, Robert Taylor is sure to stay in my library, most other crooks are not! ;-)

(Edit: topic subject changed accordingly)