Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Commit

Permalink
Retain compatibility with existing plugins.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raptor399 committed Nov 2, 2012
1 parent c56f3de commit fbe0226
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/net/pms/encoders/Player.java
Expand Up @@ -65,7 +65,9 @@ public abstract class Player {
* *
* @return The shortened name. * @return The shortened name.
*/ */
public abstract String getShortName(); public String getShortName() {
return name();
}


public abstract int type(); public abstract int type();


Expand Down

3 comments on commit fbe0226

@chocolateboy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is still a bad idea for the reasons I outlined.

I repeat: what is the actual limitation this is addressing? Which renderer? What is the maximum number of characters it can display for a filename? If the constraint can be met by the other abbreviations (or by hiding the engine name) then this hack is not needed. Even if it's not met, the hack can be isolated (by implementing a private abbreviation method in DLNAResource) without contaminating the engine API.

It is not part of an engine's contract to expose an identifier that accommodates the undocumented limitation of one renderer. Adding a completely unrelated method to the engine base class is exactly the kind of tightly-coupled legacy hack we're trying to deprecate and remove.

@chocolateboy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 510529e.

@Raptor399
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I now understand that you're on about the very existence of the method.
Your fix is fine with me, thanks.

Please sign in to comment.