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

8.0.0 #1615

Merged
merged 43 commits into from Mar 23, 2019
Merged

8.0.0 #1615

merged 43 commits into from Mar 23, 2019

Conversation

SubJunk
Copy link
Member

@SubJunk SubJunk commented Oct 10, 2018

This major release of UMS will focus on making our handling of web feeds and streams easier to use by making it manageable via GUI, and fixing bugs with it including the implementation of more types of feeds and streams.

In general I will try not to commit directly to this branch, instead I will merge related branches into here, except for quick fixes noticed after those branches are merged.

* WIP GUI idea for managing web stuff

* More WIP

* GUI update and translatable

* Remove unnecessary class

* Removed not used imports

* Implemented editing

* New button

* Fixed button sizes

* Change the layout of the web content adding/editing panel

* New tooltips
@SubJunk SubJunk mentioned this pull request Oct 10, 2018
SubJunk and others added 9 commits December 20, 2018 21:19
…ersalMediaServer into 8.0.0

# Conflicts:
#	src/main/java/net/pms/PMS.java
#	src/main/java/net/pms/dlna/RootFolder.java
#	src/main/java/net/pms/external/ExternalFactory.java
#	src/main/java/net/pms/newgui/LooksFrame.java
#	src/main/java/net/pms/newgui/NavigationShareTab.java
#	src/main/resources/i18n/messages.properties
* Refactored Iso639:
  - Implemented correction of commonly misspelled language names
  - Created Iso639Entry for holding all information for a given ISO 639 entry
  - Created isValid() to check validity also for English language names
  - Created get() to get the complete Iso639Entry for a language
  - Unified the lookups/getters to use the same basic lookup, all handling "loc", different case, 2 or 3 letter ISO 639 codes, English language names, common misspellings and search/contains option for English language name.
  - Renamed getLanguage() to getName()
  - Refactored internal structure and initialization
  - Corrected "loc" logic to handle BCP 47 codes even when they include locale or variant.
  - JavaDocs
  - Formatting

* Reversed bug introduced in 8abd818

* - Iso639:
  - Updated the list of ISO 639 English language names and codes to the latest definition
  - Implemented support for multiple English language names
  - Created equals(), hashCode() and toString() in Iso639Entry
- StringUtil:
  - Expanded createReadableCombinedString() to be able to quote the elements
  - Fixed a bug in createReadableCombinedString()

* Removed "wireshark" in DLNAResource.getDidlString() since the DIDL-Lite is already logged

* Minor formatting and tweaks to Playlist, RootFolder, SubtitleType and UMSUtils

* Created CollectionUtils class with methods for comparing the contents of two collections

* Minor refactoring of FileUtil:
- Formatting
- Some JavaDocs fixes
- Added isSeparator() and getIndexOfLastSeparator() that is OS aware but also accepts forward slash on Windows
- Fixed a bug in getExtension() and replaceExtension() if a folder has a dot in its name
- Added a try-with-resource

* Refactored DLNAMediaSubtitle:
- Formatting
- JavaDocs
- Removed some deprecated methods
- Added getName()
- Changed the logic for setting language in setExternalFile()
- Made externalFile absolute to avoid having to convert it all over the place
- Updated references accordingly

* - Changed the check for external subtitles to use isExternal() instead of checking getExternalFile != null
- Implemented handling for cases where getExternalFile == null for external subtitles
- Fixed a couple of bugs in AviSynth encoders
- Fixed a bug in Request/RequestV2 where streaming subtitles headers was sent for internal/embedded subtitles
- Fixed a couple of bugs in SubtitleUtils

* Refactored subtitles handling:
- Removed externalSubsExist, externalSubsParsed and hasSubtitles() from DLNAMediaInfo
- Moved external subtitles resolution from being scattered around the code to DLNAResource.syncResolve()
- DLNAResource:
  - Implemented new thread-safe external subtitles resolution states hasExternalSubtitles, hasSubtitles and isExternalSubtitlesParsed
  - Refactored subtitles logic in ResolvePlayer()
  - Removed duplicated code in getDlnaOrgPnFlags()
  - Fixed a subtitles bug and improved logging in getDidlString()
  - Removed some deprecated subtitles related methods
  - Created new method registerExternalSubtitles() and automatic registration if subtitles states are read
  - Created new method resolveAudioStream() based on the former Player.setAudioOutputParameters()
  - Created new method resolveSubtitlesStream() based on the former Player.setSubtitleOutputParameters()
- Player:
  - Refactored setAudioAndSubs() to use the new DLNAResource methods for resolving audio and subtitles
  - Removed methods setAudioOutputParameters() and setSubtitleOutputParameters()
- Removed deprecated and no longer needed subtitles related methods from FileUtil: doesSubtitlesExists(), isSubtitlesExists() and browseFolderForSubtitles()
- SubtitleUtils:
  - Fixed some bugs
  - Created new inner class CacheFolder
  - Created new concurrent subtitles folder cache logic that allows multiple folders to be scanned at once
  - Created new method registerExternalSubtitles() that does a similar task as the former FileUtil.browseFolderForSubtitles()
  - Created new "helper" methods: isSubtitlesFolder(), isSubtitlesFile(), registerExternalSubtitlesFile(), setExternalSubtitlesParsed() and findPrioritizedSubtitles()

* Fixed database caching of subtitles

* Add Hindi (Indian) and Brazilian Portuguese flags.

* Update subs recognition

Fixed bugs to cast integral division result to double or float

* Created BufferedImageFilter and BufferedImageFilterChain:
  - Created abstract "helper" class NonGeometricBufferedImageOp
  - Implemented BufferedImageFilter in ImagesUtil.transcodeImage()
  - Created static thumbnail RenderingHints in DLNAResource
  - Created DLNAResource.addFlagFilters() and removed all "flag" logic from DLNAResource.getThumbnailInputStream()
  - Created weak caching for "flag" BufferedImages and a way to retrieve them in ImagesUtil.getLanguageFlag()
  - Implemented AudioFlagFilter and SubtitlesFlagFilter in ImagesUtil
  - Refactored FullyPlayed to generate a BufferedImageFilter instead of applying the overlay
  - Implemented filter chains in Request, RequestV2 and RemoteWeb
- Improved JavaDocs
- Formatting
- Fixed an NPE in DLNAResource
- Refactored MapFile.toString()

* Replaced undetermined "flag"

* Update the languages recognition with MediaInfo

* Refactored DLNAResource.getDisplayName() to try to make it sane

* - Set minimum subtitle "flag" resolution
- Adjust subtitle "flag" scaling

* Cleaned up TempFileMgr:
- Added logging
- Handled Exception
- Improved iteration performance
- Added character set handling

* Refactored/extended StringUtil.prettifyXML()

* - Fixed NPE in WinUtils.getShortPathNameW()
- Fixed NPE and expanded ProcessUtil.getShortFileNameIfWideChars()
- Refactored ProcessUtil.dbgWashCmds()

* Refactored FullyPlayed text prefix handling

* Improved TextAreaFIFO line removal performance

* Created WinUtils.getOEMCharset()

* Created some methods in FileUtil:
- Created new overloads for getExtension()
- Created new overloads for getFileNameWithoutExtension() and fixed NPE
- Fixed NPE and improved robustness of convertLowerCaseStringToTitleCase()
- Created new overloads for replaceExtension()

* - Refactored/rewrote ImdbUtil:
  - Switched to using java.nio instead of java.io
  - Removed cleanName()
  - Replaced extractImdb() with extractImdbId() which can also scan relevant .nfo files for IMDB ID
  - Fixed NPE in ensureTT()
  - Created removeTT()
  - Replaced extract() with extractFromFileName()
  - Created extractImdbIdFromNfo()
- Created new methods FileUtil.detectCharset()

* Refactored FileTranscodeVirtualFolder:
- Implemented working thumbnail support for FileTranscodeVirtualFolder
- Fixed subtitles for TRANSCODE folders that's children of LIVE SUBTITLES folders

* Reimplemented OpenSubtitles/Live subtitles support:
- Configuration:
  - Removed "live_subtitles_timeout" setting
  - Made "live_subtitles_keep" and "live_subtitles_limit" configurable from the GUI under transcoding/subtitles
- DLNAMediaSubtitle subclasses:
  - Created class DLNAMediaOnDemandSubtitle which implements support for other "on-demand" subtitles sources in the future
  - Created class DLNAMediaOpenSubtitle which handles everything related to subtitles from OpenSubtitles
  - Removed lived subtitles handling from DLNAMediaSubtitle
- DLNAResource:
  - Removed unused class PlaySub
  - Removed no longer used "superthumb" functionality from RealFile
  - Refactored SubSelFile to use new logic for discovery, prority, sorting and filtering/limiting
- Created new class DeadNodeList for more efficient XML parsing
- Rewrote OpenSubtitle class almost completely, only getInfo() which isn't used for subtitles handling ise the old logic

* - Created VideoClassification for classifying a video as movie, series, TV program etc
- Created FileNamePrettifier that is similar to FileUtil.getFileNamePrettified() but keeps the parsed details for later use and doesn't use OpenSubtitles

* Right-aligned numeric fields in TranscodingTab/Subtitle Settings for consistency

* - Added new setting "show_subs_info" replacing old setting "hide_subs_info"
- Added description for new setting to UMS.conf
- Rearranged NavigationShareTab for the net setting:
  - Added new setting
  - Switched functionality and texts for "hide engine names" to "show engine names"
  - Moved settings around to be more logical

* - Reduced contention in InfoDb
- Fixed generics errors in FileDb and InfoDb

* Removed streaming MicroDVD and VobSub support for Kodi

* Changed the DLNAMediaSubtitle.id() logic so it's only used for internal/embedded subtitles. External subtitles are recognized using isExternal() instead of id > 100

* Update the Web https setting. Based on the
http://www.universalmediaserver.com/forum/viewtopic.php?f=4&t=12156
Not related to this PR but could be merged with this.

* Use more efficient StringBuilder instead of "String +" in the

convertLowerCaseStringToTitleCase method.
Fix NPE in reformating the media name.

* SubtitlesInfoLevel to be rebased

NPE fix

Fixed potential NPE

* Implemented minimum similarity threshold for IMDB guesses

- Fixed several comparison bugs in SubSelFile
- Fixed NPE in OpenSubtitle

NPE fix

* Extended FileNamePrettifier with more constructors

* - Made string similarity case insensitive
- Extended guessImdbIdByFileName() with overload for filename instead of DLNAResource

* Faster OpenSubtitles hashing (from #1462 and #1469)

* Implemented new XML-RPC parser

Removed up old XML-RPC implementation

* Removed redundant qualifiers

* Cache prettified name

* Removed the copy of the original resource from the TRANSCODE folder

Fixed rebasing
Formatting

* Added more language flags

- ALB is Albanian
- ARM is Armenian
- BOS is Bosnian
- BUR is Burmese
- CNR is Montenegrin
- DZO is Dzongkha
- FIJ is Fijian
- FIL is Filipino
- GEO is Georgian
- GLE is Irish
- HRV is Croatian
- IND is Indonesian
- KAL is Kalaallisut
- KAZ is Kazakh
- KHM is Khmer
- LAO is Lao
- LTZ is Letzeburgesch
- MAC is Macedonian
- MAY is Malay
- MLG is Malagasy
- MLT is Maltese
- NAU is Nauru
- NEP is Nepali
- PAU is Palauan
- SRP is Serbian
- TIB is Tibetan
- TKL is Tokelau
- TLH is Klingon
- TON is Tonga
- TUK is Turkmen
- TVL is Tuvalu
- UZB is Usbekisch

* Updated plugins

commons-lang3 to 3.7,
maven-javadoc-plugin to 3.0.0
git-commit-id-plugin to 2.2.4

* - Updated com.rometools:rome to 1.9.0
- Removed maven-nsis-plugin

Fixed previous Cherry-Pick

* Slightly improved web interface HTTPS configuration

based on DMS
Fixed typo

* Update to match with DMS
Fixed typo

* Updated the org.apache.commons.text version to latest 1.3

* Update the database version.

To the table SUBTRACKS were added columns EXTERNALFILE and CHARSET

* Update rebasing to the master branch.

* Formatting

* Fix unsupported displayNameOverride to show propper item name.

* Removed not used import

* Fix implementation of the "displayNameOverride"

to work only in the MediaLibraryFolder. Thanks @Nadahar for the
recommendation.
Simplify the commit 9ae1a2f

* Better split of metadata extraction and OpenSubs lookup logic

Formatting

Removed unused function

* Fixed GUI
Fixed wrong GUI implementation

* Fixed transcode folder population

* Database updater

* fix

* Removed Oravle JDK 7 test from Travis CI build

It seems that Travis CI is finally decommissioning their Ubuntu Precise containers, which were the last to support Oracle JDK 7.

* Fix database append

* Fixed database updating

* Update database fix

* Do not update database with version lower that 11

* Update database initialisation

* Final database updating

* db updates

* Default to empty string in creation too (feels hacky)

* Delete some old entries for subtracks

* Rescan subtitles to be sure if they changed

* Update description

* Register external subs only when needed.

* Remove unused import

* Clean subtitles when disabled in general configuration

* Delete record in the database when external subs file do not exist

* Let DLNAResource to resolve subs in the syncResolve

* Implement the XXE processing disabled for the UMS XML implementation

* Remove unused import

* Replaced deprecated import

* Disable XXE in XMLInputFactory

* Make enablig XML External Entity configurable

* Avoid not necessary checking if the Logger trace mode is enabled.

It is done automatically using Logger.trace() method.

* Bump database version

* Fix deprecated StringEscapeUtils from org.apache.commons.lang3

* Fix merging

* Update twelvemonkeys imageio to the latest version

* Add back the isAddGlobally stuff

* Post-merge fixes

* Keep version ahead of master

* Fixed Live Subtitles

* Fixed burning picture subtitles when other filters are also used in
FFmpeg (#1650)

Conflicts:
	src/main/java/net/pms/encoders/FFMpegVideo.java

* Removed dependency on plexus StringUtils (#1625)

* Updated junrar to 1.0.1

This fixes CVE-2018-12418

* Fixed merge

* Rollback commons-text to support Java 7

* Rollback lang3 to match words

* Bump junrar

Conflicts:
	pom.xml
	src/main/java/net/pms/util/FileUtil.java
	src/main/java/net/pms/util/OpenSubtitle.java
	src/main/java/net/pms/util/TempFileMgr.java

* Remote control navigation support in webgui (#1637)

* After merge, update my files.

* Merged changes to pom.
Removed spirton.com site references

* keycontroller.js:	fixed error loading jquery functions, due to line supporting new jquery version.
remoteui.css:		fixed web frontpage button alignment.
					fixed different folder list padding when changed to lower resolutions
					added custom scrollbar to webgui

* Change-Id: Ib40cbec3a42c8eeb751f7ac725c1ddf18bffe790
Added scroll with keys in folder list (for remote navigation)
Using some material design to list.

* Change-Id: I686d10e9cfae6d26e9789448b96202ee5627449d
Changed style to rounded edges cards

* Change-Id: Ibe93deb0bb85e0859c5bcbb8fe837d008ef43ed4
Important changes in web interface.
Added virtual keyboard for remote use.
Modified the way search is done.

* Change-Id: Ib392207540a48bdb3d6105fbc0092a9cafed02cb
fixed Frontpage background in css
fixed folder menu didn't display well in small resolutions
fixed remote navigation in play screen
added extra buttons to player toolbar for remote use
Added remote control toggle for fullscreen mode using button and exit
using OK key, with variants.
Fixed some style in bump affected by bootstrap css.

* Update STYLEGUIDE.md

* Update CONTRIBUTING.md

* Mark FFmpeg as GPU acceleration ready

* Update Cling and Seamless to resolve security issue (#1609)

Fixes #1522

* Tests for metadata extraction from filename (#1632)

* Tests for metadata extraction from filename

Adds a new test function that checks the metadata
extracted from the filename.
Amends one of the testcases so that they correctly
reflect the current working of the extraction code.

* Remove id from testcase

Remove manual increment from the JSON files that
define the metadata extraction testcases.

* Added TODO tests in metadata extraction

While working on the metadata extraction patterns, new tests
that specify what needs to be covered and is currently not,
 are expected to fail. This commit makes it possible to mark
these new tests so that they do not cause an assertion error,
but only log a warning.

* Corrections in filename metadata extraction tests

Correct use of assertThat.
Correction in one of the test cases, where the expected value was wrong.
Correction in an episode number comparison, as episode numbers are
strings and not ints.

* Codestyle improvement

* Codestyle: strictly one statement per line

* Codestyle: fewer line breaks

* Updated build instructions for macOS

* Fixed bug reported in #1655 (#1656)

Fix thumbnails not persisting to db unless TRACE is enabled

* Bumped version to 7.6.0 and updated changelog

* Formatting

* Handling the "Album Artist" field present in the audio files.  (#1657)

* Handling the "Album Artist" field present in the audio files. There is
an excellent guide about the purpose of this field and I think UMS
should support this feature:
https://www.blisshq.com/music-library-management-blog/2010/10/12/how-to-use-album_artist/

* typo

Co-Authored-By: maciekberry
<44756987+maciekberry@users.noreply.github.com>

* not needed

Co-Authored-By: maciekberry
<44756987+maciekberry@users.noreply.github.com>

Conflicts:
	src/main/java/net/pms/dlna/DLNAMediaDatabase.java
	src/main/java/net/pms/dlna/LibMediaInfoParser.java

* Pick up executables on the path in Linux (#1644)

DMS 9de2f2cea6b70c69aaea4de86e25cf809c7f88c8

* - Replaced ProgramPaths interface with PlatformProgramPaths and child
classes

- Implemented support for executable types (Bundled, Installed, Custom)
- Refactored Windows registry lookup to use JNA
- Implemented PlayerID for Player identification
- Created UniqueList List implementation
- Detached the SystemUtils singleton instance from PMS
- Implemented system PATH tools in FileUtil
- Created ExecutableInfo (immutable, builder pattern) to hold
information about executable files
- Implemented support for using bundled executable from their
development location
- Implemented automatic system PATH search for transcoding engines
- Created ExecutableErrorType
- Moved transcoding engine tests from PlayerFactory to the individual
Player classes
- Created NTStatus to map typical Windows return codes to more
meaningful errors

* Rollback unnecessary change to test

* Backwards compatibility for engine names

* Removed outdated comment

Conflicts:
	src/main/java/net/pms/dlna/DLNAMediaInfo.java
	src/main/java/net/pms/encoders/FFMpegVideo.java
	src/main/java/net/pms/encoders/Player.java
	src/main/java/net/pms/io/WinUtils.java
	src/main/java/net/pms/newgui/TranscodingTab.java
	src/main/java/net/pms/util/FileUtil.java
	src/main/java/net/pms/util/ProcessUtil.java
	src/main/resources/i18n/messages.properties

* Fix merging

* WIP Java 10 crash fix (#1497)

* WIP Java 10 crash fix

* Messy WIP

* Update to use Java 10 features

* Make it compatible with Java 1.7

* Attempt to maintain support for unicode fonts

* Formatting

* Formatting

* Fix to some web interface navigation issues (#1660)

* After merge, update my files.

* Merged changes to pom.
Removed spirton.com site references

* keycontroller.js:	fixed error loading jquery functions, due to line supporting new jquery version.
remoteui.css:		fixed web frontpage button alignment.
					fixed different folder list padding when changed to lower resolutions
					added custom scrollbar to webgui

* Change-Id: Ib40cbec3a42c8eeb751f7ac725c1ddf18bffe790
Added scroll with keys in folder list (for remote navigation)
Using some material design to list.

* Change-Id: I686d10e9cfae6d26e9789448b96202ee5627449d
Changed style to rounded edges cards

* Change-Id: Ibe93deb0bb85e0859c5bcbb8fe837d008ef43ed4
Important changes in web interface.
Added virtual keyboard for remote use.
Modified the way search is done.

* Change-Id: Ib392207540a48bdb3d6105fbc0092a9cafed02cb
fixed Frontpage background in css
fixed folder menu didn't display well in small resolutions
fixed remote navigation in play screen
added extra buttons to player toolbar for remote use
Added remote control toggle for fullscreen mode using button and exit
using OK key, with variants.
Fixed some style in bump affected by bootstrap css.

* Change-Id: I92ff018c9318b74457ebfc67a2c9f5271787ca54

fixed media cards top padding not displaying well when window width is
lower than 1080px.
fixed folder list background color not the same when window width is
lower than 1080px.
added keyboard navigation to virtual keyboard close button and corrected
display css, display image removed, used webfont instead.
other minor adjustments and updated to master branch changes.

Change-Id: I92ff018c9318b74457ebfc67a2c9f5271787ca54

* Change-Id: Ibff3251c57fa5e8a6378287584a47f2e953b3b5e
Formatting and removing things that weren't implemented.

* Change-Id: I4a8eaac529b0e2a64081bc303d9eb8f7df8182b4
Fixed flickering effect while hover in add to playlist button due to
overlap.

* Rephrasing to fit text better

* Enable Samsung built-in resume functionality (#1662)

* feat: add support for samsung built-in resume

Closes #665

* feat(bookmark): restrict 'set bookmark' to samsung devices

Closes #665

* feat(bookmark): code cleanup

#665

* feat(bookmark): code cleanup

#665

Conflicts:
	src/main/java/net/pms/dlna/DLNAResource.java

* - Moved Player executable getters from PmsConfiguration to the Player
instances (#1669)

- Implemented reuse of Player instances
- Implemented support for multiple executables when registering/testing
Player objects
From DMS af05744a843866cf94903a22d032f08f66d80bbc
Fixes #1668

Conflicts:
	src/main/java/net/pms/dlna/DLNAResource.java

* TODO to fix merging

* Revert "TODO to fix merging"

This reverts commit 5e7bcc7.

* refactor(requestv2): extract "createResponse" method (#1667)

* refactor(requestv2): extract `creteResponse` method

#1664

* refactor(requestv2): chain CRLF

#1664

* refactor(requestv2): remove duplicated CRLF

#1664

* Updated changelog

* Minor formatting and scan speed improvement (#1672)

* Sync translations with Crowdin

* Updated changelog

* 7.6.1

* Remove snapshot text

* Enabled automatic updating to 7.6.1 on Windows

* refactor(requestv2): extract request handler methods  (#1689)

* refactor(requestv2): extract `creteResponse` method

#1664

* refactor(requestv2): chain CRLF

#1664

* refactor(requestv2): remove duplicated CRLF

#1664

* refactor(requestv2): extract `searchHandler`

#1664

* refactor(requestv2): code cleanup

#1664

* refactor(requestv2): restore code indentation

#1664

* refactor(requestv2): restore code indentation

#1664

* refactor(requestv2): extract request handlers

#1664

* refactor(requestv2): extract request handlers

#1664

* restore "compilerArgument" in pom.xml

#1664

Conflicts:
	src/main/java/net/pms/network/RequestV2.java

* Support for Samsung Q9 series (#1697)

*  refactor(requestv2): inputStream as local variable (#1691)

* refactor(requestv2): extract `creteResponse` method

#1664

* refactor(requestv2): chain CRLF

#1664

* refactor(requestv2): remove duplicated CRLF

#1664

* refactor(requestv2): extract `searchHandler`

#1664

* refactor(requestv2): code cleanup

#1664

* refactor(requestv2): restore code indentation

#1664

* refactor(requestv2): restore code indentation

#1664

* refactor(requestv2): extract request handlers

#1664

* refactor(requestv2): extract request handlers

#1664

* restore "compilerArgument" in pom.xml

#1664

* refactor(requestv2): inputStream as local variable

#1664

* refactor(requestv2): rename pms to ums

#1664

* Clean status line when scan finished (#1698)

* Added config for Samsung Q6 Series TVs (#1699)

* Philips PUS8503 (#1692)

* WIP

* Fixed transcoding

* Update

* Detection tests

* Fix XVID recognition

* refactor(requestv2): extract dlna stream handler (#1700)

* refactor(requestv2): extract `creteResponse` method

#1664

* refactor(requestv2): chain CRLF

#1664

* refactor(requestv2): remove duplicated CRLF

#1664

* refactor(requestv2): extract `searchHandler`

#1664

* refactor(requestv2): code cleanup

#1664

* refactor(requestv2): restore code indentation

#1664

* refactor(requestv2): restore code indentation

#1664

* refactor(requestv2): extract request handlers

#1664

* refactor(requestv2): extract request handlers

#1664

* restore "compilerArgument" in pom.xml

#1664

* refactor(requestv2): inputStream as local variable

#1664

* refactor(requestv2): rename pms to ums

#1664

* refactor(requestv2): extract dlnaFileHandler

#1664

* refactor(requestv2): extract dlnaFileHandler

removed unused methods, placed variable declarations
in the scope where they belongs

#1664

* refactor(requestv2): code cleanup

#1664

* refactor(requestv2): fix image response

added missing `content-length` header for images and thumbnails

#1664

Conflicts:
	src/main/java/net/pms/network/RequestV2.java

* Fix XVID recognition (#1705)

* Fix XVID recognition

* Do not stream subtitles for when they are transcoding

* Rename getFormat to setFormat in LibMediaInfoParser

and make some preliminary test

* Formatting

* Formatting

* Fix subtitles streaming logic

* Update Samsung subtitles logic

* Simplify the logic

* Removed depreated method

Conflicts:
	src/main/java/net/pms/dlna/LibMediaInfoParser.java
	src/main/java/net/pms/network/RequestV2.java

* Update the .conf (#1707)

* #1664 image fix (#1709)

* fix(image): fix image load

#1664

* fix(image): improve log message

#1664

* refactor(RequestV2): small code improvements (#1713)

* refactor(requestv2): extract `creteResponse` method

#1664

* refactor(requestv2): chain CRLF

#1664

* refactor(requestv2): remove duplicated CRLF

#1664

* refactor(requestv2): extract `searchHandler`

#1664

* refactor(requestv2): code cleanup

#1664

* refactor(requestv2): restore code indentation

#1664

* refactor(requestv2): restore code indentation

#1664

* refactor(requestv2): extract request handlers

#1664

* refactor(requestv2): extract request handlers

#1664

* restore "compilerArgument" in pom.xml

#1664

* refactor(requestv2): inputStream as local variable

#1664

* refactor(requestv2): rename pms to ums

#1664

* refactor(requestv2): extract dlnaFileHandler

#1664

* refactor(requestv2): extract dlnaFileHandler

removed unused methods, placed variable declarations
in the scope where they belongs

#1664

* refactor(requestv2): code cleanup

#1664

* refactor(requestv2): fix image response

added missing `content-length` header for images and thumbnails

#1664

* refactor(requestv2): rename `argument` to `uri`

#1664

* refactor(requestv2): use HttpMethod instead of string

#1664

* refactor(requestv2): use local nettyRequest

#1664

Conflicts:
	src/main/java/net/pms/network/RequestHandlerV2.java

* Solving issue #1674 (#1711)

Solving issue #1674 (correct language passed to MediaInfoLib and avoiding incorrect genre labels)

*  Fixed issue #1706, Web interface broken hover effect on Firefox. (#1717)

* After merge, update my files.

* Merged changes to pom.
Removed spirton.com site references

* keycontroller.js:	fixed error loading jquery functions, due to line supporting new jquery version.
remoteui.css:		fixed web frontpage button alignment.
					fixed different folder list padding when changed to lower resolutions
					added custom scrollbar to webgui

* Change-Id: Ib40cbec3a42c8eeb751f7ac725c1ddf18bffe790
Added scroll with keys in folder list (for remote navigation)
Using some material design to list.

* Change-Id: I686d10e9cfae6d26e9789448b96202ee5627449d
Changed style to rounded edges cards

* Change-Id: Ibe93deb0bb85e0859c5bcbb8fe837d008ef43ed4
Important changes in web interface.
Added virtual keyboard for remote use.
Modified the way search is done.

* Change-Id: Ib392207540a48bdb3d6105fbc0092a9cafed02cb
fixed Frontpage background in css
fixed folder menu didn't display well in small resolutions
fixed remote navigation in play screen
added extra buttons to player toolbar for remote use
Added remote control toggle for fullscreen mode using button and exit
using OK key, with variants.
Fixed some style in bump affected by bootstrap css.

* Change-Id: I92ff018c9318b74457ebfc67a2c9f5271787ca54

fixed media cards top padding not displaying well when window width is
lower than 1080px.
fixed folder list background color not the same when window width is
lower than 1080px.
added keyboard navigation to virtual keyboard close button and corrected
display css, display image removed, used webfont instead.
other minor adjustments and updated to master branch changes.

Change-Id: I92ff018c9318b74457ebfc67a2c9f5271787ca54

* Change-Id: Ibff3251c57fa5e8a6378287584a47f2e953b3b5e
Formatting and removing things that weren't implemented.

* Change-Id: I4a8eaac529b0e2a64081bc303d9eb8f7df8182b4
Fixed flickering effect while hover in add to playlist button due to
overlap.

* -Fixed header area not displaying focus element, due to css class removal. (remoteui.css)
-Fixed error while navigating in header if there were no media displayed in root directory. Gear menu not navigating properly. (keycontroller.js)
-Fixed keyboard not having focus when changes from letter to numbers. (jQKeyboard.js)
-Removed unused code in keyboard main file. (jQKeyboard.js)

* Fixed issue #1706, Web interface broken hover effect on Firefox.
Removed effect off transform translate in css, for media browsing, trying to find workaround, meanwhile, removed.

* Use H.264 in Chrome web interface (#1702)

* Use H.264 in Chrome web interface

* Removed old option

* Same on Firefox

* Formatting and only scale resolution when using libvorbis

* Removed unused config

* Fix merging

* Update merging

* Formatting

* Merge fixes

* More merge fixes + formatting

* !fixup
* GlobalIdRepo: use weak references

* Synchronize lock in GlobalIdRepo.replace

* Add DLNAList.add()

* Fixed mismatched locks

* Formatting

* Formatting
@SubJunk
Copy link
Member Author

SubJunk commented Dec 26, 2018

@valib I'm going to sync this with master and the subtitles branch, then do 8.0.0-a2 and 7.7.1 soon unless you disagree, since that MEncoder fix from master is important

…ersalMediaServer into 8.0.0

# Conflicts:
#	src/main/external-resources/update/latest_version.properties
@ExSport
Copy link
Contributor

ExSport commented Dec 26, 2018

Hi guys
I was at home for a short time so tested new version 8a1. Unfortunately very bad on parents PanTV. Video with subs no go, also no go with MEncoder from transcode folder. Pictures very bad. Log full of not supported resolutions (4128xDontremember exactly) so TV displayed pictures like 320x240. Same in bubbleUpnp on Android. So reinstalled to latest 7.7 but similar results. Video not playable with MEncoder or FFmpeg but VLC and tsMuxer worked. Pictures were better than 8a1 as full picture wasn't like small thumbnail but had not much time to test it more. Windows 8.1 x64. Btw. v7.7 installer doesn't create HeapMem registry and also it can't be configured during installer (standalone x64).
Unfortunately no logs. Forgot one in debug level only in parents pc. Btw. spotted lot of errors in v7.7? about globalidrepo error -1. Tester clean install with one mkv and lot of backed up pictures from phone (jpg+mp4).
Unfortunately I had to leave so no time to troubleshooting it more or reverting it back to working state 🙄
Anyway thanks for your continuous work guys, all of you! 🤗

@SubJunk
Copy link
Member Author

SubJunk commented Dec 26, 2018

@ExSport thanks for your notes. The problem with MEncoder not playing has been fixed in master and will be released soon, unfortunately I broke it on Windows when I fixed it on macOS :D soon we will have automated tests that can catch this kind of thing, we have a branch for it by the wonderful @stasinos

As for that image problem, I have started work on that too and I hope to merge it soon. There are a lot of branches happening all at once so some can take a while, but I really want to get that image thing fixed since it will only get worse as cameras keep getting better. I will update that story when there is more progress and maybe you can help test :)

@valib
Copy link
Contributor

valib commented Dec 26, 2018

@SubJunk I confirm that bug with pictures. It works only on the web interface but not on my Panasonic or Samsung TVs. The UMS offers only DLNA.ORG_PN=JPEG_TN for resource not larger formats. The master branch is OK.
ums_dbg.zip

@SubJunk
Copy link
Member Author

SubJunk commented Dec 26, 2018

@valib ah ok, thanks for confirming it. We should fix it. It is kinda related to #1642 (because we shouldn't be scanning and converting every image on the fly unless the renderer needs us to) and I want to fix it by making the image resizing restriction opt-in, since many renderers support higher resolutions than DLNA spec.
Also now this branch is in sync with master and rebased subs. Can we close rebased subs branch and work on that in here?

@valib
Copy link
Contributor

valib commented Dec 26, 2018

@SubJunk you fix it.

@SubJunk
Copy link
Member Author

SubJunk commented Dec 26, 2018

That seems fair since you just did a lot of work syncing, I will work on it soon

@SubJunk
Copy link
Member Author

SubJunk commented Dec 26, 2018

@valib I just tested on my Panasonic TV with a 6554x1485 image and it displays at the correct resolution (4096×928), it looks high quality too, and sends the correct response over the network:

  <item id="91" parentID="75" restricted="1">
    <dc:title>AcrossTheWayTheSunShines</dc:title>
    <res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=00900000000000000000000000000000" resolution="4096x928">http://169.254.228.34:5001/get/91/JPEG_LRG_AcrossTheWayTheSunShines.jpg</res>
    <res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=00900000000000000000000000000000" resolution="1024x232">http://169.254.228.34:5001/get/91/JPEG_MED_AcrossTheWayTheSunShines.jpg</res>
    <res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=00900000000000000000000000000000" resolution="640x145">http://169.254.228.34:5001/get/91/JPEG_SM_AcrossTheWayTheSunShines.jpg</res>
    <res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=00900000000000000000000000000000" resolution="160x36">http://169.254.228.34:5001/get/91/thumbnail0000JPEG_TN_AcrossTheWayTheSunShines.jpg.jpg</res>
    <upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_SM">http://169.254.228.34:5001/get/91/thumbnail0000JPEG_SM_AcrossTheWayTheSunShines.jpg.jpg</upnp:albumArtURI>
    <upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN">http://169.254.228.34:5001/get/91/thumbnail0000JPEG_TN_AcrossTheWayTheSunShines.jpg.jpg</upnp:albumArtURI>
    <upnp:class>object.item.imageItem.photo</upnp:class>
  </item>

is there a step I'm missing?

@valib
Copy link
Contributor

valib commented Dec 26, 2018

@SubJunk as I wrote 19 minutes ago you fix it by latest merges.

@SubJunk
Copy link
Member Author

SubJunk commented Dec 26, 2018

@valib oh... I thought you were telling me to fix it :) cool

Edit: I don't like to correct people but if you are interested, the correct English would have been "you fixed it`

@valib
Copy link
Contributor

valib commented Dec 26, 2018

@SubJunk thanks for the English language lesson. 😃 I know that sometimes my English is wrong but what would you expect from the 60 years old man?

@SubJunk
Copy link
Member Author

SubJunk commented Dec 26, 2018

Your English is better than my Czech, which does not exist! :D

@SubJunk
Copy link
Member Author

SubJunk commented Dec 26, 2018

@valib can you tell me the Czech greeting? I have been learning to speak Portuguese (Brazilian) lately, it would be nice to learn a small bit of Czech too

@ExSport
Copy link
Contributor

ExSport commented Dec 26, 2018

Lesson one: Pivo
That's enough 😎

@SubJunk
Copy link
Member Author

SubJunk commented Jan 3, 2019

@ExSport the database version has been bumped since 8.0.0-a2 so it makes sense it would do reparsing. It is because there was a parsing bug in a2. Does it reparse the same files twice?

Maybe next time you have spare time for this, you could lower the UMS memory to 1GB to see if a crash happens? I have been testing it on about 5TB of content, mostly videos and audio, with Java set to 1280MB memory, and it has been stable with that, but pictures are different because of all the conversion

@ExSport
Copy link
Contributor

ExSport commented Jan 3, 2019

@SubJunk
Installed v8a2-Win from GitHub. Used clean install. Started it and configured what initiated initial indexing of configured shared folder.
UMS stopped. ums.jar file replaced with v8b2. UMS started again.
Expected behaviour is that UMS quickly check db file that no file was modified so no reindexing is needed and in few seconds rescanning ends (it is done every UMS start). Another expected behaviour may be forced reindexing due to changes in db schema but it is expected it should run max once.
The tested behaviour was not expected as after UMS.jar update there was forced reinit or reparsing with spamming the log. And this behaviour repeated every restart! Every UMS restart, rescan detected change and reparsed all files. When it ended I restarted UMS and it did it again, reparsing initiated again and again, every UMS restart.
When I repeated it 5 times I stopped UMS, deleted database files and started again. Rescan initiated new file indexing to empty DB. When finished I restarted UMS and voila, there was no reparsing and log spamming. Great, now I achieved expected behaviour but it is not how application should work, it is buggy behaviour.
Hope you understand now. Sorry for my English, seems like language barrier between us :-)

@ExSport
Copy link
Contributor

ExSport commented Jan 4, 2019

HeapSize set to 600 (533 MB visible in UMS GUI)
Cleared DB, initial indexing started. Mem usage jumps from 100 to 300 and back until initial scan finished.
As I described before, in such case it seems forced mem depletion (GC emptying) is done so memory usage doesn't grow up only but also drops down. Btw. after initial scan finished, memory usage settled on 200 MB.
So now I will try to repeat buggy behavior. Replacing ums.jar v8b1 with v8a2 and deleting 18 MB DB file.
Starting UMS, initial scan and indexing is initiated. Memory behavior is same as above (fluctuates up and down). Initial scan completed, DB size is 20 MB (same/similar as with b1)...ehm, after a while size was reduced to 18MB (some cleanup done a while after indexing finished?).
Starting UMS again (still a2) to check there will be no log spamming about "reparsing never-ending-story". Scan finished in few seconds, no reparsing initiated! Great. Going to reproduce bug and stopping UMS, replacing ums.jar with the a8b1. Starting UMS. Fu*k, no reparsing spamming in the log, weird..there is running scan but no negative influence on memory or DB size, memory fluctuates as before and DB size is same, 18 MB. Closing UMS and giving it last chance before repeating tests with 2500MB HeapMem.
Voila!!!! Another UMS start (ums.jar is still a8b1) and rescan started to spam with reparsing! Great! As HeapMem is small, it seems GC freeing works as memuse fluctuates up and down and ends on 200 MB. DB size has grown to 32 MB. Log full of:

DEBUG 2019-01-04 01:18:38.685 [Library Scanner] Cached information about IMG_20181014_105114.jpg seems to be from a previous version, reparsing information
TRACE 2019-01-04 01:18:38.685 [Library Scanner] 
java.io.InvalidClassException: net.pms.image.ImageInfo; local class incompatible: stream classdesc serialVersionUID = 4247040093720562338, local class serialVersionUID = 8947090782856389500
	at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at org.h2.util.JdbcUtils.deserialize(JdbcUtils.java:420)
	at org.h2.jdbc.JdbcConnection.convertToDefaultObject(JdbcConnection.java:2023)
	at org.h2.jdbc.JdbcResultSet.getObject(JdbcResultSet.java:534)
	at net.pms.dlna.DLNAMediaDatabase.getData(DLNAMediaDatabase.java:551)
	at net.pms.dlna.RealFile.resolve(RealFile.java:173)
	at net.pms.dlna.DLNAResource.syncResolve(DLNAResource.java:1561)
	at net.pms.dlna.DLNAResource.run(DLNAResource.java:1358)
	at net.pms.dlna.RealFile.isValid(RealFile.java:66)
	at net.pms.dlna.DLNAResource.addChild(DLNAResource.java:623)
	at net.pms.dlna.MapFile.manageFile(MapFile.java:272)
	at net.pms.dlna.MapFile.analyzeChildren(MapFile.java:328)
	at net.pms.dlna.RootFolder.scan(RootFolder.java:293)
	at net.pms.dlna.RootFolder.scan(RootFolder.java:251)
	at net.pms.dlna.DLNAMediaDatabase.run(DLNAMediaDatabase.java:1510)
	at java.lang.Thread.run(Unknown Source)

Another try, UMS restarted...it repeats, reparsing spams log again. Another UMS restart, another reparsing spam initiated,....again and again...size of DB stays at 32 MB.
So now the last test, if it is related to update from a2 to b1 or b1 itself is buggy,
Clearing DB, starting initial scan, new DB created with size ~17.1 MB. UMS restarted (full restart...I never used restart via UMS GUI), there is no spamming and rescan ends in few seconds, DB size is same, 17.1 MB. Another UMS restart and....no spam, rescan ends in few secs. Definitely bug due to initiated DB update between versions. With no DB in a8b1, I can't reproduce this bug here as b1 creates new DB itself without any DB upgrade, my thoughts only, without checking the code.

…ersalMediaServer into 8.0.0

# Conflicts:
#	CHANGELOG.txt
#	pom.xml
#	src/main/external-resources/update/latest_version.properties
#	src/main/java/net/pms/encoders/FFMpegVideo.java
#	src/main/java/net/pms/remote/RemoteWeb.java
@SubJunk
Copy link
Member Author

SubJunk commented Jan 12, 2019

@ExSport thanks for the info, I haven't had a chance to read it carefully yet since I only had a short time to release b1, I will look soon :) just wanted to let you know I wasn't ignoring you

…ersalMediaServer into 8.0.0

# Conflicts:
#	src/main/external-resources/update/latest_version.properties
#	src/main/java/net/pms/dlna/LibMediaInfoParser.java
@SubJunk
Copy link
Member Author

SubJunk commented Feb 5, 2019

@ExSport I've seen that error with serialVersionUID before and it was caused by NetBeans doing some indexing/building in the background and screwing up the versions... were you testing with the official releases or building some for yourself? Maybe I made a mistake when I built the files

@ExSport
Copy link
Contributor

ExSport commented Feb 6, 2019

@SubJunk
As I described it in last posts. Installed "v8a2-Win from GitHub", did first tests, initiated DB etc...
Later I updated to #1b8d9bc via ums.jar replace. I used your linux test build from here: #1739 (comment)

@SubJunk
Copy link
Member Author

SubJunk commented Feb 8, 2019

@ExSport can you please try to reproduce it on the official b2 release? Maybe I made a mistake when I made that linux test build, like I said if NetBeans is open it seems to mess up the file versioning.
I have tried to reproduce the bug myself but I can't

SubJunk and others added 7 commits February 8, 2019 16:54
* Made "Back" button in web interface go to the parent

Fixes the bug where it looks for the ID that no longer exists (which is a symptom of another bug)

* Refactored crazy code

* Fixed "Season" not displaying on subsequent visits

* Formatting

* Renamed variables for clarity

* Stop doing redundant loops

* Made discoverChildren call doRefreshChildren since they were already doing the same thing

* Added logic to isRefreshNeeded

* Bump version to 7.9.1-SNAPSHOT

* Fix some Media Library queries
@SubJunk
Copy link
Member Author

SubJunk commented Mar 22, 2019

@valib can I get your opinion on whether this is ready to merge to master? I have been following up on reported bugs and I don't think any are still there, of the ones related to v8

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

Successfully merging this pull request may close these issues.

None yet

3 participants