فهرست منبع

URL decode name in VLCNetworkServerBrowserItemVLCMedia

In order to determine its name, a VLCNetworkServerBrowserItemVLCMedia will first check if its media has been parsed and use the parsed title information if it has been. If it hasn't been parsed, it will fallback to the filename of the media and if that doesn't work, the whole path of the media. The filename and path of media are URL encoded (at least in the case where the media is located on an SMB share). This commit adds decoding of the URL encoded values when setting the name of a VLCNetworkServerBrowserItemVLCMedia.

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Benjamin Adolphi 9 سال پیش
والد
کامیت
31bb1d6932
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      SharedSources/ServerBrowsing/General/VLCNetworkServerBrowserVLCMedia.m

+ 2 - 2
SharedSources/ServerBrowsing/General/VLCNetworkServerBrowserVLCMedia.m

@@ -158,10 +158,10 @@
             title = [media metadataForKey:VLCMetaInformationTitle];
             title = [media metadataForKey:VLCMetaInformationTitle];
         }
         }
         if (!title) {
         if (!title) {
-            title = media.url.lastPathComponent;
+            title = [media.url.lastPathComponent stringByRemovingPercentEncoding];
         }
         }
         if (!title) {
         if (!title) {
-            title = media.url.absoluteString;
+            title = [media.url.absoluteString stringByRemovingPercentEncoding];
         }
         }
         _name = title;
         _name = title;
         _URL = media.url;
         _URL = media.url;