From 30b29f63c470eb0e92c53ad7df67d6bcf8a25914 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 29 Dec 2013 09:54:11 -0500 Subject: be more tolerant of media folder names with invalid url chars --- .../Library/LibraryStructureService.cs | 50 ++- MediaBrowser.Controller/Entities/User.cs | 1 - .../MediaBrowser.Providers.csproj | 2 +- .../Studios/StudioImageProvider.cs | 19 +- .../Studios/StudiosManualImageProvider.cs | 2 +- MediaBrowser.Providers/Studios/backdrops.txt | 495 --------------------- MediaBrowser.Providers/Studios/thumbs.txt | 495 +++++++++++++++++++++ MediaBrowser.WebDashboard/ApiClient.js | 22 +- MediaBrowser.WebDashboard/packages.config | 2 +- 9 files changed, 564 insertions(+), 524 deletions(-) delete mode 100644 MediaBrowser.Providers/Studios/backdrops.txt create mode 100644 MediaBrowser.Providers/Studios/thumbs.txt diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index c964b55171..7759073798 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -28,8 +28,8 @@ namespace MediaBrowser.Api.Library public string UserId { get; set; } } - [Route("/Library/VirtualFolders/{Name}", "POST")] - [Route("/Users/{UserId}/VirtualFolders/{Name}", "POST")] + [Route("/Library/VirtualFolders", "POST")] + [Route("/Users/{UserId}/VirtualFolders", "POST")] public class AddVirtualFolder : IReturnVoid { /// @@ -57,8 +57,8 @@ namespace MediaBrowser.Api.Library public bool RefreshLibrary { get; set; } } - [Route("/Library/VirtualFolders/{Name}", "DELETE")] - [Route("/Users/{UserId}/VirtualFolders/{Name}", "DELETE")] + [Route("/Library/VirtualFolders", "DELETE")] + [Route("/Users/{UserId}/VirtualFolders", "DELETE")] public class RemoveVirtualFolder : IReturnVoid { /// @@ -80,8 +80,8 @@ namespace MediaBrowser.Api.Library public bool RefreshLibrary { get; set; } } - [Route("/Library/VirtualFolders/{Name}/Name", "POST")] - [Route("/Users/{UserId}/VirtualFolders/{Name}/Name", "POST")] + [Route("/Library/VirtualFolders/Name", "POST")] + [Route("/Users/{UserId}/VirtualFolders/Name", "POST")] public class RenameVirtualFolder : IReturnVoid { /// @@ -109,8 +109,8 @@ namespace MediaBrowser.Api.Library public bool RefreshLibrary { get; set; } } - [Route("/Library/VirtualFolders/{Name}/Paths", "POST")] - [Route("/Users/{UserId}/VirtualFolders/{Name}/Paths", "POST")] + [Route("/Library/VirtualFolders/Paths", "POST")] + [Route("/Users/{UserId}/VirtualFolders/Paths", "POST")] public class AddMediaPath : IReturnVoid { /// @@ -138,8 +138,8 @@ namespace MediaBrowser.Api.Library public bool RefreshLibrary { get; set; } } - [Route("/Library/VirtualFolders/{Name}/Paths", "DELETE")] - [Route("/Users/{UserId}/VirtualFolders/{Name}/Paths", "DELETE")] + [Route("/Library/VirtualFolders/Paths", "DELETE")] + [Route("/Users/{UserId}/VirtualFolders/Paths", "DELETE")] public class RemoveMediaPath : IReturnVoid { /// @@ -243,6 +243,11 @@ namespace MediaBrowser.Api.Library /// The request. public void Post(AddVirtualFolder request) { + if (string.IsNullOrWhiteSpace(request.Name)) + { + throw new ArgumentNullException("request"); + } + var name = _fileSystem.GetValidFilename(request.Name); string rootFolderPath; @@ -307,6 +312,16 @@ namespace MediaBrowser.Api.Library /// The request. public void Post(RenameVirtualFolder request) { + if (string.IsNullOrWhiteSpace(request.Name)) + { + throw new ArgumentNullException("request"); + } + + if (string.IsNullOrWhiteSpace(request.NewName)) + { + throw new ArgumentNullException("request"); + } + string rootFolderPath; if (string.IsNullOrEmpty(request.UserId)) @@ -380,6 +395,11 @@ namespace MediaBrowser.Api.Library /// The request. public void Delete(RemoveVirtualFolder request) { + if (string.IsNullOrWhiteSpace(request.Name)) + { + throw new ArgumentNullException("request"); + } + string rootFolderPath; if (string.IsNullOrEmpty(request.UserId)) @@ -435,6 +455,11 @@ namespace MediaBrowser.Api.Library /// The request. public void Post(AddMediaPath request) { + if (string.IsNullOrWhiteSpace(request.Name)) + { + throw new ArgumentNullException("request"); + } + _directoryWatchers.Stop(); try @@ -476,6 +501,11 @@ namespace MediaBrowser.Api.Library /// The request. public void Delete(RemoveMediaPath request) { + if (string.IsNullOrWhiteSpace(request.Name)) + { + throw new ArgumentNullException("request"); + } + _directoryWatchers.Stop(); try diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index a2c7bcb576..0a935cd0de 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -1,5 +1,4 @@ using MediaBrowser.Common.Configuration; -using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Serialization; diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj index 60a3ec1634..94d171ce14 100644 --- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj +++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj @@ -168,7 +168,7 @@ - + diff --git a/MediaBrowser.Providers/Studios/StudioImageProvider.cs b/MediaBrowser.Providers/Studios/StudioImageProvider.cs index 7bb98a87c3..6a351b6886 100644 --- a/MediaBrowser.Providers/Studios/StudioImageProvider.cs +++ b/MediaBrowser.Providers/Studios/StudioImageProvider.cs @@ -49,7 +49,7 @@ namespace MediaBrowser.Providers.Studios protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo) { - if (!string.IsNullOrEmpty(item.PrimaryImagePath) && item.BackdropImagePaths.Count == 0) + if (item.HasImage(ImageType.Primary) && item.HasImage(ImageType.Thumb)) { return false; } @@ -75,13 +75,16 @@ namespace MediaBrowser.Providers.Studios public override async Task FetchAsync(BaseItem item, bool force, BaseProviderInfo providerInfo, CancellationToken cancellationToken) { - if (string.IsNullOrEmpty(item.PrimaryImagePath) || item.BackdropImagePaths.Count == 0) + if (item.HasImage(ImageType.Primary) && item.HasImage(ImageType.Thumb)) { - var images = await _providerManager.GetAvailableRemoteImages(item, cancellationToken, StudiosManualImageProvider.ProviderName).ConfigureAwait(false); - - await DownloadImages(item, images.ToList(), cancellationToken).ConfigureAwait(false); + SetLastRefreshed(item, DateTime.UtcNow, providerInfo); + return true; } + var images = await _providerManager.GetAvailableRemoteImages(item, cancellationToken, StudiosManualImageProvider.ProviderName).ConfigureAwait(false); + + await DownloadImages(item, images.ToList(), cancellationToken).ConfigureAwait(false); + SetLastRefreshed(item, DateTime.UtcNow, providerInfo); return true; } @@ -96,6 +99,12 @@ namespace MediaBrowser.Providers.Studios { await SaveImage(item, images, ImageType.Primary, cancellationToken).ConfigureAwait(false); } + cancellationToken.ThrowIfCancellationRequested(); + + if (!item.HasImage(ImageType.Thumb)) + { + await SaveImage(item, images, ImageType.Thumb, cancellationToken).ConfigureAwait(false); + } } if (!item.LockedFields.Contains(MetadataFields.Backdrops)) diff --git a/MediaBrowser.Providers/Studios/StudiosManualImageProvider.cs b/MediaBrowser.Providers/Studios/StudiosManualImageProvider.cs index 8255c6d560..49f5520933 100644 --- a/MediaBrowser.Providers/Studios/StudiosManualImageProvider.cs +++ b/MediaBrowser.Providers/Studios/StudiosManualImageProvider.cs @@ -51,7 +51,7 @@ namespace MediaBrowser.Providers.Studios if (backdrops) { - //list.Add(GetImage(item, "backdrops.txt", ImageType.Backdrop, "backdrop")); + list.Add(GetImage(item, "thumbs.txt", ImageType.Thumb, "thumb")); } return Task.FromResult(list.Where(i => i != null)); diff --git a/MediaBrowser.Providers/Studios/backdrops.txt b/MediaBrowser.Providers/Studios/backdrops.txt deleted file mode 100644 index 0d3ad46119..0000000000 --- a/MediaBrowser.Providers/Studios/backdrops.txt +++ /dev/null @@ -1,495 +0,0 @@ -15 Gigs -19 Entertainment -20th Television -321 Productions -4K Media -4Kids Entertainment -A La Carte Communications -A&E -Aardman -ABC -ABC Family -ABC News -ABC Studios -Above Average -Acacia Fitness -Action Television -Advertising Age -All Channel Films -All3Media -Alli -Alliance Entertainment -Alloy -AllWarriorNetwork -American Pop Classics -Ananey -Anchor Bay Entertainment -Anderson Digital -Animal Planet -Animation Domination High-Def -Anime Network -Aniplex -Anyone But Me, LLC -Artists Den Entertainment -Asian Crush -Atlantic Records -Attention Span -Austin City Limits Music Festival -Australian Broadcasting Corporation -Australian Food TV -Avalon UK -Azteca America -Bandai -Base 79 -BBC Worldwide -Beliefnet -Believe -BET -Beta Film -Big Air Studios -BIGFlix -bio -Blame Society -Blastro Networks -Bloody Disgusting Selects -Bloomberg -Bonnier TV Group -Border Entertainment -Brain Farm -Brainstorm Media -Brave New Films -Bravo -Broadway Video -Brushfire Records -Butaca -BVTV -C3 Entertainment -Canal 13 de Chile -Candlelight Media -Candor TV -Caracol Television -Carsey Werner -CBS -CelebTV -Charlie Rose -Cheflive -CHIC.TV -Chiller -China Lion -Cine Real -Cinedigm -CINELAN -Cinema Guild -Cinema Libre Studio -Cinema Purgatorio -CineSport -Cirque du Soleil -Citizens United Productions No. 3 -CJ Entertainment -Classic Media -Clinton Global Initiative -Cloo -ClubWPT -CNBC -CODA BOOKS -CollegeHumor -Comedy Central -Comedy Time -Conde Nast Digital -Constantin Film -Content and Co -Content Family -Content Media Corporation -Contentino -Cooking Channel -Crackle -Crime & Investigation Network -Criterion Collection -CRM -Cuppa Coffee -Dark Sky Films -Dave Matthews Band -Davis Panzer -Debutante Inc -Digital Artists -Digital Rights Group -Digital Studios -Discovery Channel -Discovery -Distribber -Diva -DIY Network -DocComTV -DramaFever -Duopoly -E! Entertainment -EA Sports -Eagle Media -Eagle Rock -Echo Bridge Entertainment -Echo Pictures -EchoBoom Sports -Edmunds -ElecPlay -Electric Entertainment -Electric Sky -ELLE -EMI -Enchanted Tales -Endemol -Entertainment Rights -eOne Entertainment Distribution -Epicurious.com -Eqal -Esquire Network -Estrella TV -Everyday Edisons -Evil Global -Exclusive Media -ExerciseTV -Fanclub -Fangoria -FEARnet -Fever Dreams -Fight TV -Film Ideas on Demand -Film Movement -Film Sales Company -FilmBuff -Finley-Holiday Films -First Look Studios -First Run Features -Focus Features -Food Network -FORA.tv -Ford -FOX -Fox Business -Fox College Sports -Fox Movie Channel -Fox News -Fox Reality -Fox Sports -Fox Sports Net -Fox Television Classics -Frantic Films -FremantleMedia -FUEL TV -FUNimation -FX -FXM -FXX -G4 -Gaiam -Galavision -GameTrailers -Generate -George Dickel -Giant Ape Media -Glamour Films -GoDigital -Golf TV -Gong -Gorilla Pictures -Gravitas -Gravitas Horror -GreenLight Media -GT Media -H2 -Handmade TV -Hat Trick -HD Films, Inc -Health Science Channel -HealthiNation -HereTV -HGTV -Historic Films -History -History en Español -HitFix -Hollywood Pictures -How it Works -Howcast -Howdini -Hudsun Media -Hulu Original Series -Hype -Iconix -iCue.com -IFC -IFC Films -IGN -Image Entertainment -Imagina US -Independent Comedy Network -Independent International Pictures Corp -Indie Crush -IndieFlix -itsallinyourhands.tv -ITV -ITV1 -Janson Media -Jim Henson Family TV -K2 -KCET -Kidz Bop -Kino Lorber -KinoNation -Klown -Koan -L Studio -Lagardere -Laguna Productions -Latin Crush -Legend Fighting Championship -Legend Films -Lifetime -Link TV -Lionsgate -Liquid Comics -Litton Entertainment -LMN -Local Food Sustainable Network -Logo -lolflix -Long Way Round -Look -Lou Reda Productions -Lucha Libre USA -LXTV -MAN -Manga Entertainment -Manolin Studios -Mar Vista -Martha Stewart Living -Marvel -Maverick Entertainment -Maya -MBC America -Media Blasters -Mentorn -MGM -MHz Networks -Midnight Pulp -Military History -Millennium Media Services -Modelinia -Mojo -MoMedia -Monterey Media -Moonscoop -Moshcam -Movieola -Movies by OHM -Moving Art -MPI -MSNBC -MTV -MulticomTV -MVD Entertainment Group -My Vortexx -My Yoga -MyNetworkTV -NASA -Nat Geo Wild -National Geographic Channel -NBC -NBC News -NBC Sports -NBC Universal -NBCU TV -NCircle -Netflix -New Renaissance -NHL -Nickelodeon -NickMom -Nikki Sixx -Nirvana Films -NIS America -Novel Ruby Productions -NowThisNews -nuvoTV -O2 Media -OhmTV -Oops Doughnuts -Ora TV -Orange Lounge -ORF Universum -Oscilloscope Laboratories -Oxygen -Paley Media -Panna -Paranormal TV -Passion River -PBS Kids -Phase 4 Films -Players Network -Plum TV -PopSugar TV -Power Rangers -PPI Releasing -PRO -Pure Adrenaline -Pure History -Pure Nature -Pure Science -Questar -Quintus Media -Quiver -Rajshri Media -Raphael Saadiq -Razor & Tie -RCTV -Real Magic TV -Red Bull -Red Hour Digital -ReelAfrican -ReelzChannel -Revolver -Rick Steves' Network -RiffTrax -Right Network -Riverhorse -Roadside Attractions -Ron Hazelton Productions -RooftopComedy -Rovio -RSA -RT -RTE -S and S Entertainment -Saavn -Sachs Judah -Salient Media -Satelight -Saturday Morning TV -SBS -SBS Australia -Scholastic -Science Channel -Scott Entertainment -Screen Media -Sesame Street -Shaftesbury -Shemaroo -Shochiku -Shout! Factory -Showtime -Shree International -Sky Studios -SnagFilms -SOFA -SOMA -Sonar Entertainment -Sony Pictures Television -SoPeachi -Source Interlink Media -SpaceRip -SPEED -Speed Racer Enterprises -Spike -Spike TV -Stand Up To Cancer -Starz -Strand Releasing -Strike.TV -Sundance Channel -SunWorld Pictures -Sweet Irony -Syfy -Syndicado -Synergetic -Talking Baseball with Ed Randall -Tantao Entertainment -TasteTV -Telepictures -TenduTV -The Cannell Studios -The CW -The Democratic National Convention -The Denis Leary Podcasts -The Global Film Initiative -The Jim Henson Company -The Kitchen Diva -The LXD -The Military Network -The Morning After -The National Film Board of Canada -The New York Times -The Onion -The OnLine Network -The Orchard -The Rebound -The Situation Workout -The Sundance Institute -The Three Stooges -The Weinstein Company -The White House -The Wine Library -The Zalman King Company -This Week In Studios -Thunderbird -Tiny Island Productions -TLA Releasing -TLC -TMS Entertainment -Toei Animation -Tokyopop -Total College Sports -Total Content Digital -Touchstone Pictures -Tr3s -Transworld -Travel Channel -Troma -TV Globo -TV Land -TVF International -TVG Interactive Horseracing -TVGN -Twentieth Century Fox -Uncork'd Entertainment -UniMas -Universal Pictures -Universal Sports -Universal Television -Univision -unwrapped.tv -USA -USA Network -uStudio -Vanguard Cinema -Venevision -Venus -VH1 -Vibrant Media -Videofashion -viewster -ViKi -Virgil Films -Vision Films -Vivendi Entertainment -VIZ Media -Vogue.TV -Wall Street Journal -Warner Bros. Records -WatchMojo.com -Water.org -WCG -WE tv -Web Therapy -Well Go -WEP -Westchester Films -Wolfe Video -WWE -Yan Can Cook -Young Hollywood -YourTango -ZDF Enterprises -ZED -Zeitgeist Films -Zodiak Kids -Zodiak Rights -ZoomTV \ No newline at end of file diff --git a/MediaBrowser.Providers/Studios/thumbs.txt b/MediaBrowser.Providers/Studios/thumbs.txt new file mode 100644 index 0000000000..0d3ad46119 --- /dev/null +++ b/MediaBrowser.Providers/Studios/thumbs.txt @@ -0,0 +1,495 @@ +15 Gigs +19 Entertainment +20th Television +321 Productions +4K Media +4Kids Entertainment +A La Carte Communications +A&E +Aardman +ABC +ABC Family +ABC News +ABC Studios +Above Average +Acacia Fitness +Action Television +Advertising Age +All Channel Films +All3Media +Alli +Alliance Entertainment +Alloy +AllWarriorNetwork +American Pop Classics +Ananey +Anchor Bay Entertainment +Anderson Digital +Animal Planet +Animation Domination High-Def +Anime Network +Aniplex +Anyone But Me, LLC +Artists Den Entertainment +Asian Crush +Atlantic Records +Attention Span +Austin City Limits Music Festival +Australian Broadcasting Corporation +Australian Food TV +Avalon UK +Azteca America +Bandai +Base 79 +BBC Worldwide +Beliefnet +Believe +BET +Beta Film +Big Air Studios +BIGFlix +bio +Blame Society +Blastro Networks +Bloody Disgusting Selects +Bloomberg +Bonnier TV Group +Border Entertainment +Brain Farm +Brainstorm Media +Brave New Films +Bravo +Broadway Video +Brushfire Records +Butaca +BVTV +C3 Entertainment +Canal 13 de Chile +Candlelight Media +Candor TV +Caracol Television +Carsey Werner +CBS +CelebTV +Charlie Rose +Cheflive +CHIC.TV +Chiller +China Lion +Cine Real +Cinedigm +CINELAN +Cinema Guild +Cinema Libre Studio +Cinema Purgatorio +CineSport +Cirque du Soleil +Citizens United Productions No. 3 +CJ Entertainment +Classic Media +Clinton Global Initiative +Cloo +ClubWPT +CNBC +CODA BOOKS +CollegeHumor +Comedy Central +Comedy Time +Conde Nast Digital +Constantin Film +Content and Co +Content Family +Content Media Corporation +Contentino +Cooking Channel +Crackle +Crime & Investigation Network +Criterion Collection +CRM +Cuppa Coffee +Dark Sky Films +Dave Matthews Band +Davis Panzer +Debutante Inc +Digital Artists +Digital Rights Group +Digital Studios +Discovery Channel +Discovery +Distribber +Diva +DIY Network +DocComTV +DramaFever +Duopoly +E! Entertainment +EA Sports +Eagle Media +Eagle Rock +Echo Bridge Entertainment +Echo Pictures +EchoBoom Sports +Edmunds +ElecPlay +Electric Entertainment +Electric Sky +ELLE +EMI +Enchanted Tales +Endemol +Entertainment Rights +eOne Entertainment Distribution +Epicurious.com +Eqal +Esquire Network +Estrella TV +Everyday Edisons +Evil Global +Exclusive Media +ExerciseTV +Fanclub +Fangoria +FEARnet +Fever Dreams +Fight TV +Film Ideas on Demand +Film Movement +Film Sales Company +FilmBuff +Finley-Holiday Films +First Look Studios +First Run Features +Focus Features +Food Network +FORA.tv +Ford +FOX +Fox Business +Fox College Sports +Fox Movie Channel +Fox News +Fox Reality +Fox Sports +Fox Sports Net +Fox Television Classics +Frantic Films +FremantleMedia +FUEL TV +FUNimation +FX +FXM +FXX +G4 +Gaiam +Galavision +GameTrailers +Generate +George Dickel +Giant Ape Media +Glamour Films +GoDigital +Golf TV +Gong +Gorilla Pictures +Gravitas +Gravitas Horror +GreenLight Media +GT Media +H2 +Handmade TV +Hat Trick +HD Films, Inc +Health Science Channel +HealthiNation +HereTV +HGTV +Historic Films +History +History en Español +HitFix +Hollywood Pictures +How it Works +Howcast +Howdini +Hudsun Media +Hulu Original Series +Hype +Iconix +iCue.com +IFC +IFC Films +IGN +Image Entertainment +Imagina US +Independent Comedy Network +Independent International Pictures Corp +Indie Crush +IndieFlix +itsallinyourhands.tv +ITV +ITV1 +Janson Media +Jim Henson Family TV +K2 +KCET +Kidz Bop +Kino Lorber +KinoNation +Klown +Koan +L Studio +Lagardere +Laguna Productions +Latin Crush +Legend Fighting Championship +Legend Films +Lifetime +Link TV +Lionsgate +Liquid Comics +Litton Entertainment +LMN +Local Food Sustainable Network +Logo +lolflix +Long Way Round +Look +Lou Reda Productions +Lucha Libre USA +LXTV +MAN +Manga Entertainment +Manolin Studios +Mar Vista +Martha Stewart Living +Marvel +Maverick Entertainment +Maya +MBC America +Media Blasters +Mentorn +MGM +MHz Networks +Midnight Pulp +Military History +Millennium Media Services +Modelinia +Mojo +MoMedia +Monterey Media +Moonscoop +Moshcam +Movieola +Movies by OHM +Moving Art +MPI +MSNBC +MTV +MulticomTV +MVD Entertainment Group +My Vortexx +My Yoga +MyNetworkTV +NASA +Nat Geo Wild +National Geographic Channel +NBC +NBC News +NBC Sports +NBC Universal +NBCU TV +NCircle +Netflix +New Renaissance +NHL +Nickelodeon +NickMom +Nikki Sixx +Nirvana Films +NIS America +Novel Ruby Productions +NowThisNews +nuvoTV +O2 Media +OhmTV +Oops Doughnuts +Ora TV +Orange Lounge +ORF Universum +Oscilloscope Laboratories +Oxygen +Paley Media +Panna +Paranormal TV +Passion River +PBS Kids +Phase 4 Films +Players Network +Plum TV +PopSugar TV +Power Rangers +PPI Releasing +PRO +Pure Adrenaline +Pure History +Pure Nature +Pure Science +Questar +Quintus Media +Quiver +Rajshri Media +Raphael Saadiq +Razor & Tie +RCTV +Real Magic TV +Red Bull +Red Hour Digital +ReelAfrican +ReelzChannel +Revolver +Rick Steves' Network +RiffTrax +Right Network +Riverhorse +Roadside Attractions +Ron Hazelton Productions +RooftopComedy +Rovio +RSA +RT +RTE +S and S Entertainment +Saavn +Sachs Judah +Salient Media +Satelight +Saturday Morning TV +SBS +SBS Australia +Scholastic +Science Channel +Scott Entertainment +Screen Media +Sesame Street +Shaftesbury +Shemaroo +Shochiku +Shout! Factory +Showtime +Shree International +Sky Studios +SnagFilms +SOFA +SOMA +Sonar Entertainment +Sony Pictures Television +SoPeachi +Source Interlink Media +SpaceRip +SPEED +Speed Racer Enterprises +Spike +Spike TV +Stand Up To Cancer +Starz +Strand Releasing +Strike.TV +Sundance Channel +SunWorld Pictures +Sweet Irony +Syfy +Syndicado +Synergetic +Talking Baseball with Ed Randall +Tantao Entertainment +TasteTV +Telepictures +TenduTV +The Cannell Studios +The CW +The Democratic National Convention +The Denis Leary Podcasts +The Global Film Initiative +The Jim Henson Company +The Kitchen Diva +The LXD +The Military Network +The Morning After +The National Film Board of Canada +The New York Times +The Onion +The OnLine Network +The Orchard +The Rebound +The Situation Workout +The Sundance Institute +The Three Stooges +The Weinstein Company +The White House +The Wine Library +The Zalman King Company +This Week In Studios +Thunderbird +Tiny Island Productions +TLA Releasing +TLC +TMS Entertainment +Toei Animation +Tokyopop +Total College Sports +Total Content Digital +Touchstone Pictures +Tr3s +Transworld +Travel Channel +Troma +TV Globo +TV Land +TVF International +TVG Interactive Horseracing +TVGN +Twentieth Century Fox +Uncork'd Entertainment +UniMas +Universal Pictures +Universal Sports +Universal Television +Univision +unwrapped.tv +USA +USA Network +uStudio +Vanguard Cinema +Venevision +Venus +VH1 +Vibrant Media +Videofashion +viewster +ViKi +Virgil Films +Vision Films +Vivendi Entertainment +VIZ Media +Vogue.TV +Wall Street Journal +Warner Bros. Records +WatchMojo.com +Water.org +WCG +WE tv +Web Therapy +Well Go +WEP +Westchester Films +Wolfe Video +WWE +Yan Can Cook +Young Hollywood +YourTango +ZDF Enterprises +ZED +Zeitgeist Films +Zodiak Kids +Zodiak Rights +ZoomTV \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index 18c0079626..274be16b9f 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -1328,10 +1328,9 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi var url = userId ? "Users/" + userId + "/VirtualFolders" : "Library/VirtualFolders"; - url += "/" + name; - url = self.getUrl(url, { - refreshLibrary: refreshLibrary ? true : false + refreshLibrary: refreshLibrary ? true : false, + name: name }); return self.ajax({ @@ -1357,10 +1356,10 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi } options.refreshLibrary = refreshLibrary ? true : false; + options.name = name; var url = userId ? "Users/" + userId + "/VirtualFolders" : "Library/VirtualFolders"; - url += "/" + name; url = self.getUrl(url, options); return self.ajax({ @@ -1381,11 +1380,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi var url = userId ? "Users/" + userId + "/VirtualFolders" : "Library/VirtualFolders"; - url += "/" + name + "/Name"; + url += "/Name"; url = self.getUrl(url, { refreshLibrary: refreshLibrary ? true : false, - newName: newName + newName: newName, + name: name }); return self.ajax({ @@ -1410,11 +1410,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi var url = userId ? "Users/" + userId + "/VirtualFolders" : "Library/VirtualFolders"; - url += "/" + virtualFolderName + "/Paths"; + url += "/Paths"; url = self.getUrl(url, { refreshLibrary: refreshLibrary ? true : false, - path: mediaPath + path: mediaPath, + name: virtualFolderName }); return self.ajax({ @@ -1439,11 +1440,12 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi var url = userId ? "Users/" + userId + "/VirtualFolders" : "Library/VirtualFolders"; - url += "/" + virtualFolderName + "/Paths"; + url += "/Paths"; url = self.getUrl(url, { refreshLibrary: refreshLibrary ? true : false, - path: mediaPath + path: mediaPath, + name: virtualFolderName }); return self.ajax({ diff --git a/MediaBrowser.WebDashboard/packages.config b/MediaBrowser.WebDashboard/packages.config index e36a72adfa..4cc0c4d551 100644 --- a/MediaBrowser.WebDashboard/packages.config +++ b/MediaBrowser.WebDashboard/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file -- cgit v1.2.3