Code Monkey home page Code Monkey logo

crab-dlna's People

Contributors

gabrielmagno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

crab-dlna's Issues

Can't assign requested address (os error 49)

This is great app. I really like the idea.

list function works as expected. However, while trying to play video I got this:

crab-dlna play "test_video.mkv"  -d "http://192.168.1.105:1135/"
 INFO  crab_dlna::cli > Selecting render
 INFO  crab_dlna::devices > Render specified by location: http://192.168.1.105:1135/
 INFO  crab_dlna::cli     > Building media streaming server
 ERROR crab_dlna          > Failed to connect to remote render '192.168.1.105:0': Can't assign requested address (os error 49)

It reproduces on both macOS (M1) and GNU Linux (x86_64). My TV runs WebOS.

Fail on list if 1st device have something wrong.

During the upnp discover stage, running failed if there are several devices on net, and one of them (lets say 1st) have issues. such as:

 INFO  crab_dlna::cli > List devices
 INFO  crab_dlna::devices > Discovering devices in the network, waiting 5 seconds...
 ERROR crab_dlna          > Failed to get next device: The control point responded with status code 404 Not Found

so I suggest that modify devices.rs at line 83, from:

        while let Some(device) = devices
            .try_next()
            .await
            .map_err(Error::DevicesNextDeviceError)?
        {
            debug!("Found device: {}", format_device!(device));
            match Self::from_device(device).await {
                Some(render) => {
                    renders.push(render);
                }
                None => {}
            };
        }

to

 while let Some(result) = devices
            .next() // changed from try_next
            .await
            //.map_err(Error::DevicesNextDeviceError)?  no need
        {
            if let Ok(device) = result {
                debug!("Found device: {}", format_device!(device));
                match Self::from_device(device).await {
                    Some(render) => {
                        renders.push(render);
                    }
                    None => {}
                };
            }
        }

Device discovery fail to work on my device

I have a laptop with Kodi, and a mobile phone with BubbleUPnP, both support DLNA and can find each other inside the local network. And then I run crab_dlna example code as below in the laptop which hosts Kodi:

use crab_dlna::Render;

#[tokio::main]
async fn main() {
    let discover_timeout_secs = 5;
    let renders_discovered = Render::discover(discover_timeout_secs).await.unwrap();
    for render in renders_discovered {
        println!("{}", render);
    }
}

However, the results show none of them. Any idea for this problem? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.