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

Cast in random order after r1566 #1411

Closed
Omertron opened this issue Mar 15, 2015 · 10 comments
Closed

Cast in random order after r1566 #1411

Omertron opened this issue Mar 15, 2015 · 10 comments

Comments

@Omertron
Copy link
Member

Original issue 1412 created by Omertron on 2010-04-07T19:46:40.000Z:

In r1566 the Movie::cast property type was changed from ArrayList to HashSet.
Cast members are in "random" order after that change.

@Omertron
Copy link
Member Author

Comment #1 originally posted by Omertron on 2010-04-07T22:03:39.000Z:

Fixed r1584

@Omertron
Copy link
Member Author

Comment #2 originally posted by Omertron on 2010-04-08T07:07:01.000Z:

Actually cast should not be sorted. It should be in the same order as added by a
plugin (as before r1566). The most important actors are listed first...

@Omertron
Copy link
Member Author

Comment #3 originally posted by Omertron on 2010-04-23T16:24:02.000Z:

It would be possible to add an option within the properties to enable or not the
order of the actors?

I do not like leaving sorted alphabetically, I'd rather go as I have in the nfo.

Sorry for my english.
jhmiller.

@Omertron
Copy link
Member Author

Comment #4 originally posted by Omertron on 2010-04-24T08:10:36.000Z:

Should now be correct in r1627

@Omertron
Copy link
Member Author

Comment #5 originally posted by Omertron on 2010-04-25T23:43:01.000Z:

At least for IMDB this is not corrected yet, it used to be working fine (same order
as on IMDB) in the past, but now it's all random.
See also http://www.networkedmediatank.com/showthread.php?tid=39653 from post # 5 onwards.

@Omertron
Copy link
Member Author

Comment #6 originally posted by Omertron on 2010-04-26T01:48:29.000Z:

Ok I fixed the issue for IMDB, but the FilmwebPlugin fails the junit tests after this
fix is applied, so FilmwebPlugin will need fixing too.

in src/com/moviejukebox/model/Movie.java line 736 change the line to the following:

this.cast = new LinkedHashSet(cast);

I also added the following in src/com/moviejukebox/plugin/ImdbPlugin.java and
src/com/moviejukebox/plugin/ImdbInfo.java, but I'm not sure if that was necessary:

import java.util.LinkedHashSet;

@Omertron
Copy link
Member Author

Comment #7 originally posted by Omertron on 2010-04-26T06:40:02.000Z:

Thanks Tux, I've updated that and some other places too

@Omertron
Copy link
Member Author

Comment #8 originally posted by Omertron on 2010-04-28T14:17:19.000Z:

Stuart, it is not needed to change plugins code in r1635. It's enough to change
Movie.java only.

The plugins changes in r1635 should be reverted. The plugins replace the whole
cast, when it is found on the plugin's site.

@Omertron
Copy link
Member Author

Comment #9 originally posted by Omertron on 2010-04-28T18:42:43.000Z:

Originally the code created a HashSet (random collection) scraped from the website
and then passed over as a collection so there was no way that the order of the actors
could be preserved.

That's why I changed them over to add each actor individually. It seemed inefficient
to have the code in two places.

@Omertron
Copy link
Member Author

Comment #10 originally posted by Omertron on 2010-04-28T20:33:57.000Z:

No, plugin code created
temporary ArrayList, which
has needed order. Then
setCast() method was called
to replace the whole cast,
already collected by the
Imdb plugin...

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

No branches or pull requests

1 participant