mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	Merge pull request #4084 from BaronGreenback/PlayTo-url-corruption-fix
Unstable: PlayTo corruption url fix
This commit is contained in:
		
						commit
						18fe328979
					
				@ -130,25 +130,21 @@ namespace Emby.Dlna.PlayTo
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private string GetUuid(string usn)
 | 
					        private static string GetUuid(string usn)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            var found = false;
 | 
					            const string UuidStr = "uuid:";
 | 
				
			||||||
            var index = usn.IndexOf("uuid:", StringComparison.OrdinalIgnoreCase);
 | 
					            const string UuidColonStr = "::";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            var index = usn.IndexOf(UuidStr, StringComparison.OrdinalIgnoreCase);
 | 
				
			||||||
            if (index != -1)
 | 
					            if (index != -1)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                usn = usn.Substring(index);
 | 
					                return usn.Substring(index + UuidStr.Length);
 | 
				
			||||||
                found = true;
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            index = usn.IndexOf("::", StringComparison.OrdinalIgnoreCase);
 | 
					            index = usn.IndexOf(UuidColonStr, StringComparison.OrdinalIgnoreCase);
 | 
				
			||||||
            if (index != -1)
 | 
					            if (index != -1)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                usn = usn.Substring(0, index);
 | 
					                usn = usn.Substring(0, index + UuidColonStr.Length);
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if (found)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                return usn;
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return usn.GetMD5().ToString("N", CultureInfo.InvariantCulture);
 | 
					            return usn.GetMD5().ToString("N", CultureInfo.InvariantCulture);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user