[Android] Update Subtitle downloader

Habib Kazemi git at videolan.org
Thu Oct 18 15:17:07 CEST 2018


vlc-android | branch: master | Habib Kazemi <kazemihabib1996 at gmail.com> | Wed Oct 10 14:45:19 2018 +0330| [e21efa456159a413122038f87ab2e2771c7cc427] | committer: Geoffrey Métais

Update Subtitle downloader

Subtitle downloader now uses the opensubtitle rest api
So I removed the XMLRPC library and old subtitle downloader
and I added dialog fragment to choose subtitles from availabls subtitles
we also support manual search for subtitles now.

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/e21efa456159a413122038f87ab2e2771c7cc427
---

 build.gradle                                       |   1 +
 java-libs/axmlrpc/build.gradle                     |   6 -
 .../de/timroes/axmlrpc/AuthenticationManager.java  |  55 --
 .../src/main/java/de/timroes/axmlrpc/Call.java     |  92 ---
 .../java/de/timroes/axmlrpc/CookieManager.java     |  95 ---
 .../java/de/timroes/axmlrpc/ResponseParser.java    | 125 ----
 .../java/de/timroes/axmlrpc/XMLRPCCallback.java    |  36 -
 .../main/java/de/timroes/axmlrpc/XMLRPCClient.java | 818 ---------------------
 .../java/de/timroes/axmlrpc/XMLRPCException.java   |  26 -
 .../de/timroes/axmlrpc/XMLRPCRuntimeException.java |  17 -
 .../de/timroes/axmlrpc/XMLRPCServerException.java  |  38 -
 .../de/timroes/axmlrpc/XMLRPCTimeoutException.java |  15 -
 .../src/main/java/de/timroes/axmlrpc/XMLUtil.java  | 124 ----
 .../axmlrpc/serializer/ArraySerializer.java        |  84 ---
 .../axmlrpc/serializer/Base64Serializer.java       |  24 -
 .../axmlrpc/serializer/BooleanSerializer.java      |  24 -
 .../axmlrpc/serializer/DateTimeSerializer.java     |  42 --
 .../axmlrpc/serializer/DoubleSerializer.java       |  27 -
 .../timroes/axmlrpc/serializer/IntSerializer.java  |  23 -
 .../timroes/axmlrpc/serializer/LongSerializer.java |  23 -
 .../timroes/axmlrpc/serializer/NullSerializer.java |  21 -
 .../de/timroes/axmlrpc/serializer/Serializer.java  |  34 -
 .../axmlrpc/serializer/SerializerHandler.java      | 228 ------
 .../axmlrpc/serializer/StringSerializer.java       |  38 -
 .../axmlrpc/serializer/StructSerializer.java       | 112 ---
 .../axmlrpc/xmlcreator/SimpleXMLCreator.java       |  31 -
 .../de/timroes/axmlrpc/xmlcreator/XmlElement.java  |  73 --
 .../src/main/java/de/timroes/base64/Base64.java    | 161 ----
 .../videolan/vlc/database/ExternalSubDaoTest.kt    |  31 +-
 .../org/videolan/vlc/database/MigrationTest.kt     |  23 +-
 .../database/helpers/SqliteDatabaseTestHelper.kt   |   2 +-
 .../29.json                                        | 154 ++++
 vlc-android/build.gradle                           |   5 +-
 vlc-android/res/drawable/ic_done_black_24dp.xml    |   9 +
 vlc-android/res/drawable/ic_download.xml           |   9 +
 .../layout/custom_simple_spinner_dropdown_item.xml |   8 +
 .../res/layout/subtitle_download_fragment.xml      | 180 +++++
 vlc-android/res/layout/subtitle_download_item.xml  |  82 +++
 .../res/layout/subtitle_downloader_dialog.xml      |  55 ++
 .../res/layout/subtitle_history_fragment.xml       |  24 +
 vlc-android/res/values-h480dp/dimens.xml           |   1 +
 vlc-android/res/values-h600dp/dimens.xml           |   4 +
 vlc-android/res/values-w600dp/dimens.xml           |   1 +
 vlc-android/res/values/arrays.xml                  |   2 +
 vlc-android/res/values/colors.xml                  |   1 +
 vlc-android/res/values/dimens.xml                  |   6 +-
 vlc-android/res/values/strings.xml                 |  18 +-
 vlc-android/res/values/styles.xml                  |   1 +
 vlc-android/res/xml/preferences_subtitles.xml      |   7 -
 .../org/videolan/vlc/api/IOpenSubtitleService.kt   |  21 +
 vlc-android/src/org/videolan/vlc/api/Models.kt     |  70 ++
 .../org/videolan/vlc/api/OpenSubtitleService.kt    |  60 ++
 .../org/videolan/vlc/database/ExternalSubDao.kt    |  13 +-
 .../src/org/videolan/vlc/database/MediaDatabase.kt |   4 +-
 .../src/org/videolan/vlc/database/Migrations.kt    |   9 +-
 .../videolan/vlc/database/models/ExternalSub.kt    |  14 +-
 .../vlc/gui/dialogs/SubtitleDownloadFragment.kt    |  93 +++
 .../dialogs/SubtitleDownloaderDialogFragment.kt    |  77 ++
 .../vlc/gui/dialogs/SubtitleHistoryFragment.kt     |  64 ++
 .../org/videolan/vlc/gui/dialogs/SubtitleItem.kt   |  16 +
 .../videolan/vlc/gui/dialogs/SubtitlesAdapter.kt   |  47 ++
 .../src/org/videolan/vlc/gui/helpers/UiTools.java  |  11 +
 .../vlc/gui/tv/MediaItemDetailsFragment.java       |   2 +-
 .../vlc/gui/video/VideoPlayerActivity.java         |  73 +-
 .../src/org/videolan/vlc/media/MediaUtils.kt       |  29 +-
 .../vlc/repository/ExternalSubRepository.kt        |  52 +-
 .../vlc/repository/OpenSubtitleRepository.kt       |  67 ++
 .../src/org/videolan/vlc/util/FileUtils.java       |  54 +-
 .../src/org/videolan/vlc/util/Kextensions.kt       |   1 +
 .../src/org/videolan/vlc/util/LiveDataMap.kt       |  29 +
 .../org/videolan/vlc/util/SubtitlesDownloader.java | 552 --------------
 .../org/videolan/vlc/util/VLCDownloadManager.kt    | 107 +++
 .../src/org/videolan/vlc/viewmodels/ScopedModel.kt |   1 +
 .../org/videolan/vlc/viewmodels/SubtitlesModel.kt  | 179 +++++
 .../test-common/org/videolan/vlc/util/TestUtil.kt  |  14 +-
 .../vlc/repository/BrowserFavRepositoryTest.kt     |   2 +-
 .../vlc/repository/DirectoryRepositoryTest.kt      |   2 +-
 .../vlc/repository/ExternalSubRepositoryTest.kt    |  91 +--
 78 files changed, 1649 insertions(+), 3121 deletions(-)

Diff:   https://code.videolan.org/videolan/vlc-android/commit/e21efa456159a413122038f87ab2e2771c7cc427


More information about the Android mailing list