Menu

#320 Minidlna fails to import Track #'s

v1.0 (example)
open
nobody
None
1
2019-02-19
2019-01-13
notacoder
No

Using v. 1.2.1 (on several systems), trying to sort mp4 files by Track number.

used forcesortcriteria=+upnp:originalTrackNumber, and dlna clients still didn't sort it correctly (roku, vlc, bubble on andriod, windows media player etc...) - confirmed track tags are in the mp4 files.

So then I "manually" opened the files.db database using DB browser for SQLite, http://sqlitebrowser.org/, track column the values for all the files were "null". Manually added track numbers to each of the files, saved the database, and clients correctly sorted by track.

minidlna/readymedia is not importing the Track field to the files.db. Can someone fix? I'd be willing to try a patch, thanks

Discussion

  • Shrimpkin

    Shrimpkin - 2019-02-18

    The mp4 file extension can be video or audio files. If minidlna finds a video stream in the mp4, it is processed as a video file. Otherwise, it is processed as audio file. Embedded coverart is viewed as a video stream, so mp4 audio file with embedded coverart is never processed as audio file.

    The easiest option is to change your mp4 audio files to m4a file extension.

     
  • notacoder

    notacoder - 2019-02-19

    Hi Skrimpkin - thanks for the response :-) These mp4 files ARE video (H264) files, TV show episodes. Coan video files be indexed with track #'s uploaded?

     
    • Shrimpkin

      Shrimpkin - 2019-02-19

      Use latest git version. Use nfo file with season/episode tags or use filename parsing by adding S01E01 format to filename. There is no support for embedded tags.

      Try this patch with latest git version to enabled embedded season/episode tags.

      diff --git a/metadata.c b/metadata.c
      index 9cd86dc..110d31b 100644
      --- a/metadata.c
      +++ b/metadata.c
      @@ -1492,6 +1492,10 @@ GetVideoMetadata(const char *path, const char *name)
                                              m.artist = escape_tag(trim(tag->value), 1);
                                      else if( strcmp(tag->key, "comment") == 0 )
                                              m.comment = escape_tag(trim(tag->value), 1);
      +                               else if( strcmp(tag->key, "season") == 0 )
      +                                       m.disc = atoi(tag->value);
      +                               else if( strcmp(tag->key, "episode") == 0 )
      +                                       m.track = atoi(tag->value);
                              }
                      }
              }
      
       

Log in to post a comment.